/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700&display=swap');

:root {
    --primary-hsl: 141, 51%, 36%;
    --primary-color: hsl(var(--primary-hsl));
    --primary-light: hsl(141, 51%, 46%);
    --primary-dark: hsl(141, 51%, 26%);
    
    --accent-hsl: 38, 44%, 54%;
    --accent-color: #ffd700; /* Gold for highlights */
    --brown-accent: #4A3E38;
    
    --text-dark: #0F172A;
    --text-light: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    --max-width: 1280px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

p {
    margin-bottom: 1.5rem;
}

.justify-long-text, .missions-desc, .footer-desc {
    text-align: justify;
    text-justify: inter-word;
}

h1, h2, h3, h4, .hero-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Base Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}


.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-brown {
    background-color: var(--brown-accent);
    color: var(--white);
}

.btn-brown:hover {
    background-color: #3d332e;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    padding: 15px 0;
    background: var(--white);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 70px; /* Slightly larger for PNG impact */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .brand-logo {
    height: 55px; /* Adjusting scrolled height */
}

nav ul {
    display: flex;
    gap: 45px;
    align-items: center;
}

nav ul li a {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--white);
    letter-spacing: 1.5px;
    position: relative;
    padding: 5px 0;
}

header.scrolled nav ul li a {
    color: var(--text-dark);
}

/* If background becomes light on scroll, we might need dark text. 
   But let's aim for a premium dark-themed transparency. 
   If user wants it pro, let's make it consistent. */
header.scrolled .nav-links ul li a {
    color: var(--text-dark);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    border-radius: 2px;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.nav-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1100; /* Keep buttons above the fixed menu if needed */
}

/* Profile Icon Removed */

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)), url(../assets/images/edmbg1.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.hero-subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 24px;
    color: var(--accent-color);
    display: inline-block;
    animation: fadeInDown 1s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1;
    margin-bottom: 32px;
    font-weight: 800;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 48px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    text-justify: inter-word;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-btns {
    display: flex;
    gap: 24px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

/* Page Header (for subpages like mission.html) */
.page-header {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    text-align: center;
    color: var(--white);
}

.page-header .hero-title {
    opacity: 1;
    animation: none;
    margin-bottom: 20px;
}

.page-header .hero-description {
    opacity: 0.9;
    animation: none;
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.view-all {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Fundamental Missions Section */
.fundamental-missions {
    background-color: var(--white);
    padding: 100px 0;
}

.section-subtitle-top {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.section-title-center {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 25px;
    color: var(--text-dark);
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 60px;
    border-radius: 2px;
}

.mission-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mission-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    border-color: rgba(45, 138, 78, 0.2);
}

.mission-card:hover::before {
    transform: scaleX(1);
}

.m-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 30px;
    transition: var(--transition);
}

.mission-card:hover .m-icon-box {
    transform: scale(1.1) rotate(5deg);
}

/* Ajustement des couleurs selon screenshot */
.m-icon-green { background-color: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }
.m-icon-brown { background-color: #fafaf9; color: #78350f; border: 1px solid #f5f5f4; }
.m-icon-teal { background-color: #f0fdfa; color: #0d9488; border: 1px solid #ccfbf1; }

.mission-card h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--text-dark);
    font-weight: 700;
}

.mission-card-list {
    display: grid;
    gap: 15px;
}

.mission-card-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

.mission-card-list li i {
    color: #22c55e;
    font-size: 0.8rem;
    margin-top: 5px;
    flex-shrink: 0;
}

/* Teaching Cards */
.teachings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    justify-content: center;
}

.teaching-card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.teaching-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.teaching-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 700;
}

.teaching-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.teaching-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.teaching-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Missions Section Refined */
.missions-section {
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.missions-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 138, 78, 0.03) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    z-index: 0;
}

.missions-container {
    display: flex;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.missions-images {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-bottom: 60px;
}

.mission-img-main {
    width: 65%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    border: 10px solid var(--white);
    transition: var(--transition);
}

.mission-img-sub {
    width: 55%;
    border-radius: 20px;
    position: absolute;
    right: 0;
    bottom: 0;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    border: 10px solid var(--white);
    transition: var(--transition);
}

.mission-img-main:hover {
    transform: translateY(-10px) rotate(-2deg);
    z-index: 3;
}

.mission-img-sub:hover {
    transform: translateY(-10px) rotate(2deg);
    z-index: 3;
}

.missions-content {
    flex: 1;
}

.missions-tag {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    display: inline-block;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.missions-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.missions-desc {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.mission-list {
    margin-bottom: 45px;
    display: grid;
    gap: 20px;
}

.mission-list li {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.6;
    text-align: left; /* Disable justification for list items to avoid weird gaps */
    text-justify: none;
}

.mission-list li i {
    width: 28px;
    height: 28px;
    background-color: rgba(45, 138, 78, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px; /* Align icon with first line of text */
}

/* Quote Section */
.quote-section {
    background-color: #fcfcfc;
    text-align: center;
    padding: 80px 0;
}

.quote-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    opacity: 0.3;
}

.quote-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

.quote-ref {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Newsletter Section */
.newsletter-section {
    padding-bottom: 100px;
}

.newsletter-card {
    background: var(--primary-color);
    border-radius: 20px;
    padding: 60px;
    color: var(--white);
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a5e35 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.newsletter-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.newsletter-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 1rem;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: #BBB;
    padding: 80px 0 30px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-desc {
    margin-bottom: 25px;
    line-height: 1.8;
    text-align: left; /* Default to left for footer short texts */
}

.footer-desc.long {
    text-align: justify;
    text-justify: inter-word;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Teaching Cards Refined */
.teachings {
    background-color: var(--bg-light);
}

.teaching-card {
    border-radius: 16px;
    background: var(--white);
    padding: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.teaching-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.teaching-img {
    height: 240px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.teaching-info {
    padding: 8px 12px 12px;
}

.teaching-info h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

/* Newsletter Refined */
.newsletter-card {
    padding: 80px 40px;
    box-shadow: 0 25px 50px -12px rgba(45, 138, 78, 0.4);
}

.newsletter-form input {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

/* Footer Refined */
footer {
    padding: 100px 0 40px;
}

.footer-bottom {
    margin-top: 60px;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* --- FULL RESPONSIVENESS & MOBILE MENU --- */

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
    z-index: 1100; /* Ensure it stays above everything */
}

header.scrolled .mobile-toggle {
    color: var(--text-dark);
}

@media (max-width: 1200px) {
    :root {
        --max-width: 95%;
    }
}

@media (max-width: 1024px) {
    .teachings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .missions-container {
        flex-direction: column;
        text-align: center;
        gap: 60px;
    }
    
    .missions-images {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .mission-list li {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95); /* Deep slate for pro look */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s cubic-bezier(0.85, 0, 0.15, 1);
        z-index: 1000;
        visibility: hidden;
        pointer-events: none;
    }
    
    .nav-links.active {
        right: 0;
        visibility: visible;
        pointer-events: all;
    }
    
    .nav-links ul {
        flex-direction: column;
        gap: 25px;
        width: 100%;
        text-align: center;
    }
    
    .nav-links ul li a,
    header.scrolled .nav-links ul li a {
        color: var(--white) !important;
        font-size: 1.5rem;
        font-weight: 600;
        display: block;
        padding: 15px;
        letter-spacing: 3px;
    }

    .nav-links ul li a:hover {
        color: var(--accent-color) !important;
    }

    .nav-links ul li a.nav-disabled {
        opacity: 0.4;
        filter: brightness(0.8);
    }
    
    .mobile-toggle {
        display: block;
        color: var(--white);
        background: rgba(255, 255, 255, 0.1);
        width: 45px;
        height: 45px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    header.scrolled .mobile-toggle {
        color: var(--text-dark);
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }

    /* Fixed selector: style toggle when nav is active */
    .nav-links.active ~ .nav-right .mobile-toggle {
        color: var(--white) !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }

    /* Removed broken selector */
    
    .hero-title {
        font-size: 2.6rem; /* Slightly smaller for better fit */
        padding: 0 10px;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
        padding: 0 30px;
    }

    .btn {
        width: 100%; /* Full width buttons on mobile */
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    /* .missions-desc text-align: center removed to maintain justification */

    .mission-cards-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .mission-card {
        padding: 35px 25px;
    }
    
    .teachings-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .newsletter-card {
        padding: 60px 20px;
        border-radius: 0;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-form input {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-contact li {
        justify-content: center;
    }
    
    .d-none-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero {
        background-attachment: scroll; /* Better performance on mobile */
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .missions-images {
        height: 280px;
        width: 100%;
    }
    
    .mission-img-main {
        width: 75%;
        border-width: 6px;
    }
    
    .mission-img-sub {
        width: 65%;
        border-width: 6px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 10px;
    }
}
