/* ===================================================
    ClassMate - Advanced About Page Stylesheet
    
    =================================================== */

/* ----------------------------
    Root Variables (Final Color Palette)
---------------------------- */
:root {
    /* --- FINAL COLOR PALETTE --- */
    --clr-primary-dark: #243B55;   /* Deep Slate Blue: For trust, focus, and main text. */
    --clr-primary-medium: #3A5A78; /* Muted Slate Blue: For secondary elements. */
    --clr-primary-light: #607D8B;   /* Lighter Slate: For secondary text and accents. */
    
    --clr-accent-saffron: #FCA311; /* Vibrant Saffron: For CTAs, highlights, and energy. */
    --clr-accent-teal: #14B8A6;     /* Bright Teal: For success indicators and growth. */
    
    --clr-bg-light: #FDFEFF;       /* Pearl White: A very light, clean background. */
    --clr-bg-card: #FFFFFF;        /* Pure White: For cards and elevated surfaces. */
    
    --clr-text-primary: #1A202C;   /* Nearly Black: For maximum readability on light backgrounds. */
    --clr-text-secondary: #718096; /* Muted Gray: For paragraphs and less important text. */
    --clr-text-on-dark: #E2E8F0;   /* Light Gray/White: For text on dark backgrounds. */

    /* Existing variables */
    --radius: 16px;
    --shadow-light: 0 4px 12px rgba(36, 59, 85, 0.08);
    --shadow-heavy: 0 15px 40px rgba(36, 59, 85, 0.15);
    --transition: 0.4s ease-in-out;
    --font-primary: 'Cairo', sans-serif;
}

/* ----------------------------
    Global Reset & Typography
---------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--clr-bg-light);
    color: var(--clr-text-primary);
    line-height: 1.7;
    font-size: 1rem;
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 700;
    color: var(--clr-primary-dark);
}

p {
    color: var(--clr-text-secondary);
}

/* ----------------------------
    Containers
---------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------
    Header - ADJUSTED FOR LARGE LOGO
---------------------------- */
.main-header {
    background-color: var(--clr-bg-card);
    padding: 15px 30px;
    height: 90px;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    /* تم التعديل: إزالة justify-content: center للسماح برابط الرجوع */
    justify-content: space-between; /* للسماح بوجود عناصر على الجانبين */
    position: relative;
}

/* رابط الرجوع في الهيدر */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    color: var(--clr-primary-medium);
    transition: color var(--transition);
}
.back-link:hover {
    color: var(--clr-primary-dark);
}
.back-link i {
    font-size: 0.9em;
}


.header-logo {
    position: absolute;
    top: -25px; /* --- ADJUSTED POSITION: Lifted up significantly --- */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.header-logo img {
    max-height: 150px;
    transition: transform var(--transition);
    filter: drop-shadow(0px 10px 15px rgba(36, 59, 85, 0.15));
}

.header-logo img:hover {
    transform: scale(1.05);
}

/* ----------------------------
    Hero Section - ADJUSTED FOR LARGE LOGO
---------------------------- */
.about-hero {
    background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary-medium));
    color: var(--clr-text-on-dark);
    text-align: center;
    padding: 155px 20px 80px; /* --- Adjusted padding to match new logo position --- */
    position: relative;
    overflow: hidden;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--clr-bg-card);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.about-hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.6;
    color: var(--clr-text-on-dark);
}

/* ----------------------------
    Mission Section
---------------------------- */
.mission-section {
    padding: 80px 20px;
    background-color: var(--clr-bg-light);
    text-align: center;
}

.mission-section h2 {
    font-size: 2.5rem;
    color: var(--clr-primary-dark);
    margin-bottom: 30px;
    position: relative;
}

.mission-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--clr-accent-saffron);
    margin: 10px auto 0;
    border-radius: 2px;
}

.mission-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--clr-text-primary);
    max-width: 850px;
    margin: 0 auto;
}

.mission-text strong {
    color: var(--clr-accent-teal);
    font-weight: 700;
}

/* ----------------------------
    Team Photo Section
---------------------------- */
.team-photo-section {
    padding: 100px 20px;
    background-color: var(--clr-bg-card);
    text-align: center;
}

.team-photo-section h2 {
    font-size: 2.5rem;
    color: var(--clr-primary-dark);
    margin-bottom: 40px;
}

.team-photo-section figure {
    margin: 0 auto;
    max-width: 1000px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.team-photo-section img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.team-photo-section figcaption {
    font-style: italic;
    margin-top: 15px;
    color: var(--clr-text-secondary);
}

/* ----------------------------
    Team Wall
---------------------------- */
.team-wall {
    padding: 120px 20px;
    background-color: var(--clr-bg-light);
}

.team-wall h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 70px;
    color: var(--clr-primary-dark);
}

.team-category {
    margin-bottom: 120px;
}

.team-category h3 {
    font-size: 2rem;
    margin-bottom: 100px;
    display: inline-block;
    border-bottom: 4px solid var(--clr-accent-saffron);
    padding-bottom: 8px;
    color: var(--clr-primary-medium);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 120px 80px;
}

/* ----------------------------
    Team Card
---------------------------- */
.team-card {
    position: relative;
    background-color: var(--clr-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    padding: 140px 25px 50px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.team-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-heavy);
}

.team-card img {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--clr-bg-card);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: transform var(--transition);
    background: linear-gradient(45deg, var(--clr-primary-medium), var(--clr-accent-saffron));
}

.team-card:hover img {
    transform: translateX(-50%) scale(1.1);
}

.team-card h4 {
    font-size: 1.5rem;
    color: var(--clr-text-primary);
    margin-top: 10px;
    margin-bottom: 6px;
}

.team-card .role {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-accent-teal);
    margin-bottom: 15px;
}

.team-card .contribution {
    font-size: 0.95rem;
    color: var(--clr-text-secondary);
    line-height: 1.6;
    padding: 0 10px;
}

.team-card .social-links {
    position: absolute;
    left: 50%;
    bottom: -25px;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.team-card .social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--clr-primary-light);
    color: var(--clr-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--clr-bg-card);
    transition: all var(--transition);
}

.team-card .social-links a:hover {
    transform: scale(1.1);
    background-color: var(--clr-accent-saffron);
}

/* ----------------------------
    CTA Section
---------------------------- */
.cta-section {
    padding: 80px 20px;
    background-color: var(--clr-primary-medium);
    color: var(--clr-text-on-dark);
    text-align: center;
    border-radius: var(--radius);
    margin: 50px auto;
    max-width: 1200px; /* لضمان تطابق العرض مع الكونتينر */
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--clr-bg-card);
}

.cta-section p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 30px;
    color: var(--clr-text-on-dark);
}

.cta-button-whatsapp,
.cta-button-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--clr-accent-saffron);
    color: var(--clr-primary-dark);
    font-weight: 700;
    padding: 16px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-light);
    transition: all var(--transition);
}
.cta-button-email {
     background-color: var(--clr-accent-teal);
     color: var(--clr-bg-card);
}

.cta-button-whatsapp:hover {
    transform: scale(1.05);
    background-color: var(--clr-accent-saffron); /* يبقى كما هو أو يصبح أفتح قليلاً */
    box-shadow: var(--shadow-heavy);
}

.cta-button-email:hover {
     transform: scale(1.05);
     background-color: #10a392; /* أغمق قليلاً من التييل */
     box-shadow: var(--shadow-heavy);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


/* ---------------------------------
    Keyframes for Animations
--------------------------------- */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glowEffect {
    0%, 100% {
        box-shadow: 0 0 15px rgba(252, 163, 17, 0.4), 0 0 30px rgba(252, 163, 17, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(252, 163, 17, 0.6), 0 0 50px rgba(252, 163, 17, 0.3);
    }
}


/* ---------------------------------
    Footer - ARTISTIC & CENTERED LOGO OVERHAUL
--------------------------------- */
.site-footer {
    background-color: var(--clr-primary-dark);
    color: var(--clr-text-on-dark);
    padding: 0 20px; 
    position: relative;
    /* Adjusted margin-top to account for the footer design */
    margin-top: 100px;
}

.site-footer .footer-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* --- The top section of the footer, acting as a background for the logo oval --- */
.footer-top-section {
    background: linear-gradient(180deg, var(--clr-primary-medium), var(--clr-primary-dark));
    padding: 100px 20px 60px; /* Adjust top padding to create space for the oval */
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center;
    gap: 25px;
}

/* --- The Oval Container for the Logo --- */
.footer-logo-oval-container {
    position: absolute;
    top: 0; /* Position at the very top of footer-top-section */
    left: 50%;
    transform: translate(-50%, -50%); /* Center horizontally and half-way out vertically */
    z-index: 10;
    width: 250px; /* Width of the oval */
    height: 125px; /* Height of the oval (half of width for perfect oval) */
    background: var(--clr-bg-card); /* White background for the oval */
    border-radius: 50% / 100%; /* Makes it a perfect half-oval */
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Added a subtle, continuous glow animation for the oval container itself */
    animation: glowEffect 4s ease-in-out infinite; 
}


/* --- The Logo inside the Oval --- */
.footer-logo {
    position: relative; /* Relative to its oval container */
    z-index: 11; /* Ensure logo is above any pseudo-elements */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Removed padding and background from here, it's handled by the oval container */
}

.footer-logo img {
    max-height: 150px; /* Adjust size as needed, should fit within the oval */
    transition: transform var(--transition);
    display: block;
    /* No border or box-shadow here, the oval container provides the visual depth */
}

/* --- Hover effect for the logo itself --- */
.footer-logo:hover img {
    transform: scale(1.1); /* Enlarge the logo on hover */
}


.footer-description p {
    max-width: 600px; /* Increased max-width for better readability */
    font-size: 1.05rem; /* Slightly larger font */
    line-height: 1.7;
    text-align: center;
    margin: 0 auto;
    color: var(--clr-text-on-dark); /* Ensure text is visible on dark background */
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 40px auto;
    width: 100%;
}

.footer-nav a {
    color: var(--clr-text-on-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--clr-accent-saffron);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background-color: var(--clr-primary-dark);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--clr-primary-light);
    text-align: center;
}


/* ----------------------------
    Responsive Design
---------------------------- */
@media(max-width: 991px){
    .team-card { padding-top: 130px; }
    .team-card img { width: 150px; height: 150px; top: -75px; }
    .team-grid { 
        gap: 100px 60px;
     }
}

@media(max-width: 768px){
    .main-header { justify-content: flex-end; } /* دفع الرابط لليمين */
    .back-link { padding-right: 15px; } /* إضافة مسافة من الحافة */
    .header-logo { top: -15px; } /* تصغير المسافة العلوية للشعار */
    .header-logo img { max-height: 120px; }

    .about-hero { padding-top: 160px; }
    .about-hero h1 { font-size: 2.5rem; }
    .about-hero p { font-size: 1.1rem; }
    .team-card { padding-top: 120px; }
    .team-card img { width: 140px; height: 140px; top: -70px; }
    .cta-section h2 { font-size: 2.2rem; }
    .footer-logo-oval-container { width: 200px; height: 100px; } /* Adjust oval size */
    .footer-logo img { max-height: 120px; }
}

@media(max-width: 480px){
    .header-logo { top: -15px; }
    .header-logo img { max-height: 120px; }
    .about-hero { padding-top: 140px; }
    .about-hero h1 { font-size: 2rem; }
    .about-hero p { font-size: 1rem; }
    .team-card { padding-top: 100px; }
    .team-card img { width: 120px; height: 120px; top: -60px; }
    .cta-button-whatsapp, .cta-button-email { padding: 14px 28px; font-size: 1.1rem; }
    .footer-logo-oval-container { width: 180px; height: 90px; } /* Further adjust oval size */
    .footer-logo img { max-height: 100px; }
    .footer-top-section { padding-top: 80px; } /* Adjust padding for smaller screens */
}

@media(max-width: 400px){
    .about-hero h1 { font-size: 1.8rem; }
    .about-hero p { font-size: 0.95rem; }
    .team-card img { width: 100px; height: 100px; top: -50px; }
    .footer-logo-oval-container { width: 160px; height: 80px; }
    .footer-logo img { max-height: 90px; }
}
