/* =============================================
   Noor Educational Welfare Foundation - Global Styles
   Fully Responsive: Mobile-First Design
   ============================================= */

:root {
    --primary-color: #d32f2f;
    --primary-light: #ef5350;
    --primary-dark: #b71c1c;
    --secondary-color: #ffcc00;
    --secondary-light: #ffde4d;
    --accent-color: #ff9800;
    --text-color: #2c3e50;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --surface-light: #f1f8f1;
    --soft-green: #e8f5e9;
    --light-gray: #f9fbf9;
    --gradient-red: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    --gradient-gold: linear-gradient(135deg, #ffcc00 0%, #ff9800 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 5px;
    background: var(--gradient-gold);
    bottom: 0;
    left: 20%;
    border-radius: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.3);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.2);
}

.btn-gold:hover {
    background: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.3);
}

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
    background: var(--gradient-red);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.contact-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.top-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-social a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

.top-social a:hover {
    color: var(--secondary-color);
    transform: none;
    background: none;
}

/* Premium Admin Button */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffcc00 0%, #ff9800 100%);
    color: #1a1a1a !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(255, 204, 0, 0.45);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    animation: adminGlow 2.5s infinite;
    white-space: nowrap;
}

.admin-btn i { font-size: 0.75rem; }

.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
    transition: left 0.5s ease;
}

.admin-btn:hover::before { left: 150%; }

.admin-btn:hover {
    background: linear-gradient(135deg, #fff176 0%, #ffcc00 100%);
    color: #000 !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.65);
    animation: none;
}

@keyframes adminGlow {
    0%   { box-shadow: 0 2px 12px rgba(255, 204, 0, 0.4); }
    50%  { box-shadow: 0 2px 20px rgba(255, 204, 0, 0.75); }
    100% { box-shadow: 0 2px 12px rgba(255, 204, 0, 0.4); }
}

/* =============================================
   NAVBAR / HEADER
   ============================================= */
/* Nav overlay (mobile tap-to-close) */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.nav-overlay.active {
    display: block;
}

header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar {
    padding: 12px 0;
    position: relative;
}

.navbar > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Logo + Site Name */
.logo {
    flex-shrink: 1;
    min-width: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--primary-color), #f44336, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: normal;
    word-break: break-word;
    display: block;
    line-height: 1.2;
    max-width: 280px;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-shrink: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
    font-size: 0.92rem;
}

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

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
    width: 100%;
}

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

/* Donate Button */
.nav-links .btn-gold {
    padding: 10px 20px;
    background: var(--gradient-gold);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4);
    animation: pulse 2s infinite;
    font-size: 0.85rem;
}

@keyframes pulse {
    0%   { transform: scale(1);    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4); }
    50%  { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6); }
    100% { transform: scale(1);    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4); }
}

.nav-links .btn-gold:hover {
    animation: none;
    transform: scale(1.1);
}

/* Join Us Button */
.nav-links .btn-join {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white !important;
    padding: 9px 20px;
    border-radius: 50px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.4);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.4s ease;
    font-size: 0.85rem;
    animation: joinPulse 3s infinite;
}

.nav-links .btn-join i { font-size: 0.85rem; }

.nav-links .btn-join::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s ease;
    z-index: 1;
}

.nav-links .btn-join:hover::before { left: 150%; }

.nav-links .btn-join:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(37, 117, 252, 0.5);
    filter: brightness(1.1);
}

@keyframes joinPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 117, 252, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(37, 117, 252, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 117, 252, 0); }
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--primary-color);
    padding: 5px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: rgba(211, 47, 47, 0.08);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    min-height: 70vh;
    background: linear-gradient(rgba(26, 93, 26, 0.7), rgba(26, 93, 26, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 60px 0;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   CARDS & ACTIVITIES
   ============================================= */
.activity-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.activity-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.activity-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.activity-card .content {
    padding: 20px;
}

.activity-card h3 { margin-bottom: 12px; }

/* Key Activities Section */
.activities-section {
    padding: 80px 0;
    background-color: var(--soft-green);
}

/* Stats Section */
.stats {
    padding: 70px 0;
    background: var(--primary-color);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 28px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 70px 0 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, #d32f2f, #ffcc00, #ff9800);
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    margin-bottom: 50px;
    align-items: flex-start;
}

.footer-col {
    flex: 1 1 220px;
    min-width: 0;
}

.footer-col:first-child {
    flex: 1 1 280px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: #ffcc00;
    border-radius: 2px;
}

.footer-col p {
    line-height: 1.8;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.footer-col ul li a::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #ffcc00;
}

.footer-col ul li a:hover {
    color: #fff;
    transform: translateX(8px);
}

.footer-col ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.contact-item i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffcc00;
    font-size: 0.85rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.contact-item:hover i {
    background: #ffcc00;
    color: #0f172a;
    transform: rotate(10deg);
}

.contact-item span {
    flex: 1;
    font-size: 0.9rem;
    color: #94a3b8;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-links a {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.4s;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-links a:hover {
    background: #ffcc00;
    color: #0f172a;
    transform: translateY(-6px);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    height: 180px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.map-container iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: 25px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* ---- 1200px: Large tablets / small desktops ---- */
@media (max-width: 1200px) {
    .site-name {
        font-size: 1rem;
        max-width: 220px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a:not(.btn) {
        font-size: 0.88rem;
    }
}

/* ---- 992px: Tablet — hamburger kicks in ---- */
@media (max-width: 992px) {
    .navbar > .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 5px 0;
    }

    .mobile-menu-btn {
        display: block;
        order: 2; /* Ensure it stays on the right */
        margin-left: auto; /* Push to the right */
    }


    .nav-links {
        /* Hidden by default — use max-height for smooth open/close, NO opacity:0 on items */
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 15px 25px rgba(0,0,0,0.12);
        padding: 10px 0 18px;
        border-top: 3px solid var(--primary-color);
        z-index: 999;
        /* Slide-in animation on the container only */
        transform-origin: top center;
    }

    .nav-links.active {
        display: flex;
        animation: navSlideDown 0.28s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    }

    /* li items are ALWAYS fully visible — no opacity tricks, no blink */
    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 1;
        transform: none;
    }

    .nav-links a {
        display: block;
        padding: 13px 20px;
        font-size: 0.95rem;
        border-bottom: 1px solid #f0f0f0;
        color: var(--text-color);
        font-weight: 600;
        transition: background 0.2s, color 0.2s;
    }

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

    .nav-links li:last-child a { border-bottom: none; }

    .nav-links a:not(.btn)::after { display: none; }
    .nav-links a.active {
        background: var(--surface-light);
        color: var(--primary-color);
    }

    /* Mobile action buttons — full width, no pulse animation */
    .nav-links .btn-join,
    .nav-links .btn-gold {
        display: flex;
        justify-content: center;
        margin: 8px 20px 0;
        width: calc(100% - 40px);
        border-radius: 10px;
        animation: none !important;
        padding: 12px 20px;
    }

    .section-title h2 { font-size: 2rem; }
}

/* ---- 768px: Mobile landscape / large phones ---- */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    /* Top Bar */
    /* Top Bar Phone/Email/Admin row */
    .top-bar .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 6px 16px;
        gap: 8px;
    }

    .contact-info {
        flex-direction: row !important;
        gap: 12px !important;
        align-items: center !important;
        flex: 1;
    }

    .contact-info span:last-child {
        display: flex !important; /* Show email */
        order: 1; /* Email on left */
    }

    .contact-info span:first-child {
        order: 2; /* Phone in middle */
    }

    .top-bar-right {
        order: 3; /* Admin on right */
        justify-content: flex-end;
    }

    .top-social {
        display: none; /* Hide socials in top bar on mobile to fit row */
    }

    /* Logo */
    .logo img {
        height: 36px;
    }

    .site-name {
        font-size: clamp(1.2rem, 8vw, 1.8rem);
        max-width: none;
        letter-spacing: 0.2px;
        line-height: 1.1;
        font-weight: 700;
    }

    /* Hero */
    .hero {
        min-height: 60vh;
        padding: 50px 0;
    }

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

    .hero-content p {
        font-size: 1rem;
    }

    .hero-content .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    /* Sections */
    .activities-section,
    .stats {
        padding: 60px 0;
    }

    .section-title h2 { font-size: 1.8rem; }
    .section-title { margin-bottom: 35px; }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* About preview */
    .about-preview > .container > div {
        flex-direction: column !important;
    }

    /* Footer */
    .footer-grid {
        flex-direction: column;
        gap: 30px;
    }

    .footer-col,
    .footer-col:first-child {
        flex: 1 1 100%;
    }
}

/* ---- 480px: Small phones ---- */
@media (max-width: 480px) {
    .container { padding: 0 14px; }

    /* Top bar: phone only */
    .top-bar {
        font-size: 0.78rem;
    }

    .top-social { gap: 8px; }

    .admin-btn span {
        display: none; /* icon only on very small screens */
    }

    /* Navbar */
    .navbar {
        padding: 10px 0;
    }

    .logo img {
        height: 32px;
    }

    .site-name {
        font-size: 0.8rem;
        max-width: 150px;
        letter-spacing: 0;
    }

    /* Hero */
    .hero {
        min-height: 55vh;
        padding: 40px 0;
    }

    .hero-content h1 { font-size: 1.5rem; }
    .hero-content p  { font-size: 0.92rem; }

    /* Activity cards */
    .activity-card img { height: 180px; }

    /* Stats 2 col */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-item { padding: 20px 12px; }

    /* Footer */
    .footer-col h3 { font-size: 1.05rem; }

    /* Section titles */
    .section-title h2 { font-size: 1.5rem; }
}

/* =============================================
   ANIMATIONS
   ============================================= */

/* Mobile nav container slide-down — only animates the ul, not individual li */
@keyframes navSlideDown {
    from {
        opacity: 0;
        transform: scaleY(0.92) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scaleY(1) translateY(0);
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
}
