/* ============================================
   MAKENI ISLAMIC SOCIETY TRUST - MAIN STYLES
   Modern & Clean with Islamic Accents
   ============================================ */

/* --- CSS Variables (Theme) --- */
:root {
    /* Primary Colors */
    --primary-green: #1B5E20;
    --primary-green-light: #2E7D32;
    --primary-green-dark: #0D3B0F;
    --accent-gold: #C8A951;
    --accent-gold-light: #E0C97A;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --near-black: #1A1A2E;

    /* Status Colors */
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;

    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 80px 0;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.16);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-gray);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

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

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-green { color: var(--primary-green); }
.text-gold { color: var(--accent-gold); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* --- Islamic Geometric Pattern (SVG Background) --- */
.islamic-pattern {
    position: relative;
}

.islamic-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: bold;
    border: 3px solid var(--accent-gold);
}

.navbar-brand .brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    line-height: 1.2;
}

.navbar-brand .brand-text span {
    font-size: 0.75rem;
    color: var(--medium-gray);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
    padding: 4px 0;
}

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

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

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

.nav-links .btn-login {
    background: var(--primary-green);
    color: var(--white);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links .btn-login:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.nav-links .btn-login::after {
    display: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--dark-gray);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 50%, var(--primary-green-light) 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--accent-gold-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-content h1 span {
    color: var(--accent-gold);
}

.hero-content p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--near-black);
}

.btn-primary:hover {
    background: var(--accent-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200,169,81,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

/* Hero Visual / Stats Card */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stats-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.stats-card h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.stats-card .subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.stat-row .stat-value {
    color: var(--accent-gold-light);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Decorative Circles */
.hero-decoration {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

.hero-decoration.circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
}

.hero-decoration.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
}

.hero-decoration.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 20%;
    border-color: rgba(200,169,81,0.1);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    padding: var(--section-padding);
    background: var(--off-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .tag {
    display: inline-block;
    background: rgba(27,94,32,0.1);
    color: var(--primary-green);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--near-black);
    margin-bottom: 16px;
}

.section-header p {
    color: var(--medium-gray);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
}

.about-card .icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--white);
}

.about-card h3 {
    font-size: 1.2rem;
    color: var(--near-black);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   DEPARTMENTS SECTION
   ============================================ */
.departments {
    padding: var(--section-padding);
    background: var(--white);
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.dept-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--light-gray);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dept-card:hover::before {
    transform: scaleX(1);
}

.dept-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.dept-card .dept-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(27,94,32,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

.dept-card:hover .dept-icon {
    background: var(--primary-green);
    color: var(--white);
    transform: scale(1.1);
}

.dept-card h3 {
    font-size: 1rem;
    color: var(--near-black);
    margin-bottom: 8px;
}

.dept-card p {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* ============================================
   IMPACT / STATS SECTION
   ============================================ */
.impact {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-green-dark), var(--primary-green));
    position: relative;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.impact-item .number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 8px;
}

.impact-item .label {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

/* ============================================
   TIMELINE / HISTORY SECTION
   ============================================ */
.history {
    padding: var(--section-padding);
    background: var(--off-white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-green), var(--accent-gold));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 45%;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
}

.timeline-item:nth-child(even) {
    margin-left: 55%;
}

.timeline-item .year {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-item h3 {
    font-size: 1.05rem;
    color: var(--near-black);
    margin-bottom: 8px;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ============================================
   CONTACT / CTA SECTION
   ============================================ */
.contact {
    padding: var(--section-padding);
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--near-black);
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--medium-gray);
    margin-bottom: 30px;
    line-height: 1.7;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-detail .icon-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(27,94,32,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-green);
}

.contact-detail h4 {
    font-size: 0.95rem;
    color: var(--near-black);
    margin-bottom: 4px;
}

.contact-detail p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    background: var(--off-white);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--light-gray);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease;
    background: var(--white);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--near-black);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-green);
    color: var(--white);
}

.footer h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        gap: 16px;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: calc(100% - 50px);
        margin-left: 50px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .impact-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}