/* 
   Dr. Asmaa Al Fares - Professional Website
   Theme: Luxury (Black & Gold)
   Font: Cairo
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    --color-bg: #0a0a0a;
    --color-bg-light: #151515;
    --color-text: #f0f0f0;
    --color-text-muted: #aaaaaa;
    --color-text-bright: #e0e0e0;
    /* New brighter muted text */
    --color-gold: #C69C3A;
    --color-gold-hover: #D6AC4A;
    --color-border: #333333;

    --font-main: 'Cairo', sans-serif;

    --transition-speed: 0.3s;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    direction: rtl;
    /* Arabic Direction */
    /* overflow-x: hidden; removed to fix mobile header sticky/fixed issues */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--color-gold);
}

.text-muted {
    color: var(--color-text-muted);
}

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.gap-20 {
    gap: 20px;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-gap {
    gap: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-gold), #bfa13a);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #e5c352, #d4af37);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.btn-outline:hover {
    background: var(--color-gold);
    color: #000;
}

/* Header */
header {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 65px;
}

.logo-text {
    font-size: 1.4rem;
    /* Slightly larger text */
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1.2;
}


.logo-text span {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 400;
    margin-top: 5px;
    /* Added spacing between Arabic and English name */
}


.footer-logo {
    max-width: 110px;
    /* Slightly larger footer logo too */
    margin: 0 auto 20px;
    /* Center aligned */
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-gold);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg-placeholder.jpg');
    /* Apply a dark overlay */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 150px;
    /* Adjusted to prevent header overlap */
    overflow: hidden;
}

.hero-content {
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--color-gold);
}

.hero p {
    font-size: 1.2rem;
    color: var(--color-text-bright);
    /* Improved Contrast */
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image-container {
    position: relative;
    right: auto;
    bottom: auto;
    height: auto;
    z-index: 1;
    flex: 0 0 50%;
    /* Increased from 45% for better balance */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom */
}

.hero-image-container img {
    height: auto;
    max-height: 500px;
    /* Reduced from 550px to prevent overlap */
    width: auto;
    max-width: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    /* Masking for smooth blend at bottom */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Section Basics */
.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Course Cards */
.course-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 30px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    text-align: center;
    /* Center all text */
    min-height: 320px;
    /* Ensure uniform height perception */
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-gold);
    border-color: var(--color-gold);
}

.course-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center title vertically and horizontally in its block */
}

.course-card p {
    margin-bottom: 25px;
    flex-grow: 1;
    /* Allow description to take available space */
}

.course-card .btn {
    margin-top: auto;
    /* Push button to bottom */
    align-self: center;
    /* Center button horizontally */
    width: auto;
    min-width: 150px;
}

/* Testimonial Cards */
.testimonial-card {
    background: var(--color-bg-light);
    padding: 30px;
    border-radius: 10px;
    border-right: 3px solid var(--color-gold);
}

/* Feature Items */
.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.7rem;
    /* Reduced from 2.2rem */
    color: var(--color-gold);
    min-width: 40px;
    /* Ensure alignment */
    text-align: center;
}

/* Features/Icons (Why Choose Us) - targeting the section with grid-2 */
/* Obsolete rule removed */

.feature-item h4 {
    color: #fff;
    margin-bottom: 5px;
}

/* Utility for links */
.hover-gold {
    transition: color var(--transition-speed);
}

.hover-gold:hover {
    color: var(--color-gold);
}

/* Footer */
footer {
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--color-gold);
    margin-bottom: 25px;
    font-size: 1.4rem;
    text-align: center;
    /* Explicitly center titles */
}

.footer-col {
    text-align: center;
    /* Center column text */
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--color-text-muted);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center links globally */
    gap: 10px;
}

/* Ensure icons have spacing even if gap fails */
.footer-col i {
    margin-left: 10px;
}

.icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center contact details globally */
    gap: 10px;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.footer-col p,
.footer-col a {
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: block;
}

.footer-col a:hover {
    color: var(--color-gold);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    /* Center social links globally */
    margin-top: 25px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    color: #fff;
    font-size: 1.2rem;
}

/* Fix for social icons being pushed by global footer icon margin */
.social-links a i {
    margin: 0 !important;
}

.social-links a:hover {
    border-color: var(--color-gold);
    background-color: var(--color-gold);
    color: #000;
    transform: translateY(-3px);
    /* Subtle lift effect */
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.course-card {
    /* Existing transition is good, just ensuring it's smooth */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}



@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {

    /* Stable Mobile Header - Fixed */
    header {
        position: fixed;
        width: 100%;
        z-index: 1000;
        background-color: rgba(10, 10, 10, 0.95) !important;
        padding: 15px 0 !important;
        min-height: 90px;
        border-bottom: 1px solid var(--color-border);
        top: 0;
        left: 0;
        right: 0;
        transform: none !important;
        /* Keep transition for smooth menu open if needed */
        backdrop-filter: blur(10px) !important;
    }

    /* Refactored Hero for Mobile */
    .hero {
        height: auto !important;
        min-height: 85vh;
        padding-top: 130px;
        /* Push content down below fixed header */
        padding-bottom: 60px;
        align-items: center;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        /* Align perfectly with bottom of relative header */
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: 0;
        border-bottom: 1px solid var(--color-border);
        /* Animation properties */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease;
        z-index: 1000;
        /* Ensure it stays above hero content */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        max-height: 400px;
        /* Adjust based on content */
        opacity: 1;
        visibility: visible;
        padding: 20px;
    }

    /* Prevent body scroll when menu is open is handled in JS usually, 
       but for this simple request, z-index and overlay look is key */

    .menu-toggle {
        display: block;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    /* Mobile Feature Items */
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-buttons .btn i {
        font-size: 1.3rem;
    }

    .hero-content {
        margin-top: 30px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        /* Larger on mobile */
        margin-bottom: 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-col ul li a,
    .footer-col .icon-text {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    /* .footer-logo margin handled by flex parent alignment now */

    /* Mobile Hero Modifications */
    .hero {
        padding-bottom: 60px;
        border-bottom: 1px solid var(--color-border);
        margin-bottom: 40px;
    }

    .hero .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-container {
        display: flex;
        order: 1;
        width: 100%;
        margin-bottom: 20px;
        justify-content: center;
    }

    .hero-image-container img {
        max-width: 85%;
        /* Increased from 70% for better mobile presence */
        max-height: 400px;
        /* Increased from 350px */
    }
}

/* --- About Page Specifics --- */
.about-image-frame {
    border: 2px solid var(--color-gold);
    padding: 10px;
    border-radius: 10px;
    max-height: 550px;
    /* Desktop constraint */
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.about-image-frame img {
    border-radius: 5px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Utility to force top alignment */
.items-start {
    align-items: flex-start !important;
}

@media (max-width: 768px) {
    .about-image-frame {
        max-height: 350px;
        /* Phone specific crop */
    }
}