/* =============================================
   Reset & Base Styles
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #27ae60;
    --primary-dark: #2ecc71;
    --secondary-color: #f39c12;
    --transition-speed: 0.3s;
    --container-max: 1200px;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --bg-alt: #f4f7f6;
    --text-color: #2c3e50;
    --text-muted: #6c7a89;
    --border-color: #e5e8e8;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
    --bg-color: #121212;
    --bg-alt: #1a1a1a;
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --card-bg: #1f2937;
    --header-bg: rgba(18, 18, 18, 0.85);
}

[data-theme="beige"] {
    --bg-color: #fcefd6;
    /* Beige */
    --bg-alt: #f3e2c3;
    --text-color: #4a3e2e;
    --text-muted: #736453;
    --border-color: #e1cfb0;
    --card-bg: #fffbf2;
    --header-bg: rgba(252, 239, 214, 0.9);
}

::selection {
    background: var(--primary-color);
    color: #fff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   Typography & Utilities
   ============================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: inherit;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #333;
    transform: translateY(-3px);
}

/* =============================================
   Navigation
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-speed);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1478131143081-80f7f84ca84d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.hero .highlight {
    color: var(--primary-color);
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: #e0e0e0;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #d1d5db;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* =============================================
   About Section
   ============================================= */
.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 30%;
    height: 30%;
    background: var(--secondary-color);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.3;
}

/* =============================================
   Leadership Section
   ============================================= */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.leadership-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 25px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leadership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.leadership-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.leadership-card:hover::before {
    opacity: 0.05;
}

.member-img {
    width: 240px;
    height: 240px;
    margin: 0 auto 25px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    transition: all 0.5s ease;
}

.leadership-card:hover .member-img {
    transform: scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.15);
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.leadership-card:hover .member-img img {
    transform: scale(1.1);
}

.leadership-card h3 {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.member-role {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    max-width: 90%;
}

/* =============================================
   Activities Section
   ============================================= */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.activity-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.activity-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* =============================================
   Projects Section
   ============================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.project-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.project-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

.project-card h3 {
    margin: 15px 0;
    font-size: 1.3rem;
}

/* =============================================
   History Section (Timeline)
   ============================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
    padding-left: 30px;
    border-left: 3px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-alt);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.timeline-content h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.timeline-content ul {
    list-style: disc inside;
    color: var(--text-muted);
}

.timeline-content li {
    margin-bottom: 8px;
}

/* =============================================
   Impact Section
   ============================================= */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.impact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.impact-icon-wrapper {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.impact-text h4 {
    font-size: 1.1rem;
    margin: 0;
}

/* =============================================
   Vision Section
   ============================================= */
.vision-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.2);
}

.vision-icon {
    font-size: 2rem;
    opacity: 0.5;
    margin: 10px 0;
}

.vision-content blockquote {
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.8;
}

/* =============================================
   Contact Section
   ============================================= */
.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
}

.contact-form-wrapper {
    flex: 1;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 15px;
    background: var(--card-bg);
    padding: 0 5px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.input-group input:focus~label,
.input-group input:not(:placeholder-shown)~label,
.input-group textarea:focus~label,
.input-group textarea:not(:placeholder-shown)~label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background: var(--card-bg);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.back-to-top {
    width: 45px;
    height: 45px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--primary-color);
    color: #fff;
}

/* =============================================
   Scroll Reveal Animations
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 992px) {

    .about-content,
    .contact-container {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--header-bg);
        backdrop-filter: blur(15px);
        padding: 40px 20px;
        border-top: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .section {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .vision-content blockquote {
        font-size: 1.1rem;
    }
}

/* =============================================
   Language Dropdown Styles
   ============================================= */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 150px;
    overflow: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 5px;
    gap: 2px;
}

@media (max-width: 768px) {
    .lang-menu {
        min-width: 120px;
    }
}

.lang-dropdown:hover .lang-menu,
.lang-dropdown:focus-within .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.lang-menu li a:hover {
    background: rgba(39, 174, 96, 0.1);
    color: var(--primary-color);
}

/* =============================================
   RTL (Arabic) Support
   ============================================= */
html[dir="rtl"] {
    text-align: right;
}

@media (max-width: 768px) {
    html[dir="rtl"] .nav-links {
        flex-direction: column;
    }
}

html[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 30px;
    border-left: none;
    border-right: 3px solid var(--border-color);
}

html[dir="rtl"] .timeline-dot {
    left: auto;
    right: -40px;
}

html[dir="rtl"] .input-group label {
    left: auto;
    right: 15px;
}

html[dir="rtl"] .hero-buttons {
    flex-wrap: wrap;
    /* Ensure buttons don't overflow */
}

@media (max-width: 768px) {
    html[dir="rtl"] .lang-menu {
        right: auto;
        left: 0;
    }
}

/* =============================================
   Floating Register Button
   ============================================= */
.floating-register-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
}

html[dir="rtl"] .floating-register-btn {
    right: auto;
    left: 30px;
}

.floating-register-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background-color: var(--primary-dark);
    color: #fff;
}