@import url('variables.css');

/* ================= GLOBAL ================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text);
    background: #f8fafc;
    overflow-x: hidden;
}

.section {
    padding: 100px 0;
}

.section-subtitle {
    max-width: 600px;
}

/* ================= NAVBAR ================= */
.glass-nav {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.glass-nav.scrolled {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    font-weight: 500;
    color: var(--text) !important;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--dark) !important;
    font-size: 1.4rem;
    text-decoration: none;
}

.navbar-logo {
    height: 48px;
    width: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(13, 110, 253, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.navbar-brand-text {
    line-height: 1.2;
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 40px;
        width: 40px;
    }

    .navbar-brand-text {
        font-size: 1.1rem;
    }
}

.btn-donate {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
    border-radius: 50px;
    padding: 8px 20px;
    border: none;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: white;
}

/* ================= FLYING NGO ICONS ================= */
.flying-icons,
.flying-icons-global {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.flying-icons-global {
    position: fixed;
    z-index: 0;
    opacity: 0.35;
}

.flying-icons i,
.flying-icons-global i {
    position: absolute;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.6rem;
    opacity: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    animation: iconFly linear infinite;
    will-change: transform, opacity;
}

.section-flying-icons i {
    color: rgba(13, 110, 253, 0.18);
    font-size: 1.4rem;
    filter: none;
}

.flying-icons-global i {
    color: rgba(13, 110, 253, 0.12);
    font-size: 1.2rem;
}

/* Hero icons — staggered positions & timing */
.hero-flying-icons i:nth-child(1)  { left: 8%;  animation-duration: 14s; animation-delay: 0s;   font-size: 1.4rem; }
.hero-flying-icons i:nth-child(2)  { left: 22%; animation-duration: 18s; animation-delay: 2s;   font-size: 2rem; }
.hero-flying-icons i:nth-child(3)  { left: 38%; animation-duration: 16s; animation-delay: 4s;   font-size: 1.6rem; }
.hero-flying-icons i:nth-child(4)  { left: 55%; animation-duration: 20s; animation-delay: 1s;   font-size: 1.8rem; }
.hero-flying-icons i:nth-child(5)  { left: 72%; animation-duration: 15s; animation-delay: 3s;   font-size: 1.5rem; }
.hero-flying-icons i:nth-child(6)  { left: 88%; animation-duration: 17s; animation-delay: 5s;   font-size: 1.7rem; }

/* Section icons — gentle drift */
.section-flying-icons {
    z-index: 0;
}

.section-flying-icons i:nth-child(1) { left: 5%;  top: 15%; animation: iconDrift 12s ease-in-out infinite; animation-delay: 0s; }
.section-flying-icons i:nth-child(2) { left: 85%; top: 20%; animation: iconDrift 14s ease-in-out infinite reverse; animation-delay: 1.5s; }
.section-flying-icons i:nth-child(3) { left: 15%; top: 70%; animation: iconDrift 13s ease-in-out infinite; animation-delay: 3s; }
.section-flying-icons i:nth-child(4) { left: 75%; top: 65%; animation: iconDrift 15s ease-in-out infinite reverse; animation-delay: 0.5s; }
.section-flying-icons i:nth-child(5) { left: 45%; top: 10%; animation: iconDrift 11s ease-in-out infinite; animation-delay: 2s; }
.section-flying-icons i:nth-child(6) { left: 60%; top: 80%; animation: iconDrift 16s ease-in-out infinite reverse; animation-delay: 4s; }

.section-flying-icons i {
    opacity: 1;
    bottom: auto;
}

/* Global background icons */
.flying-icons-global i:nth-child(1)  { left: 3%;  animation-duration: 25s; animation-delay: 0s; }
.flying-icons-global i:nth-child(2)  { left: 12%; animation-duration: 30s; animation-delay: 4s; }
.flying-icons-global i:nth-child(3)  { left: 25%; animation-duration: 22s; animation-delay: 8s; }
.flying-icons-global i:nth-child(4)  { left: 40%; animation-duration: 28s; animation-delay: 2s; }
.flying-icons-global i:nth-child(5)  { left: 52%; animation-duration: 26s; animation-delay: 6s; }
.flying-icons-global i:nth-child(6)  { left: 63%; animation-duration: 24s; animation-delay: 10s; }
.flying-icons-global i:nth-child(7)  { left: 74%; animation-duration: 29s; animation-delay: 3s; }
.flying-icons-global i:nth-child(8)  { left: 82%; animation-duration: 23s; animation-delay: 7s; }
.flying-icons-global i:nth-child(9)  { left: 90%; animation-duration: 27s; animation-delay: 1s; }
.flying-icons-global i:nth-child(10) { left: 18%; animation-duration: 31s; animation-delay: 9s; }
.flying-icons-global i:nth-child(11) { left: 48%; animation-duration: 21s; animation-delay: 5s; }
.flying-icons-global i:nth-child(12) { left: 68%; animation-duration: 32s; animation-delay: 11s; }

/* Float up from bottom — hero */
@keyframes iconFly {
    0% {
        transform: translateY(110vh) translateX(0) rotate(0deg) scale(0.6);
        opacity: 0;
    }
    8% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(45vh) translateX(30px) rotate(15deg) scale(1);
        opacity: 0.85;
    }
    85% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-15vh) translateX(-20px) rotate(-10deg) scale(0.8);
        opacity: 0;
    }
}

/* Gentle side-to-side drift — sections */
@keyframes iconDrift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(25px, -20px) rotate(8deg);
    }
    50% {
        transform: translate(-15px, -35px) rotate(-5deg);
    }
    75% {
        transform: translate(20px, -15px) rotate(6deg);
    }
}

/* Pulse glow on hero icons */
.hero-flying-icons i {
    animation-name: iconFly, iconGlow;
    animation-duration: inherit, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes iconGlow {
    0%, 100% { filter: drop-shadow(0 4px 12px rgba(0, 194, 255, 0.3)); }
    50%      { filter: drop-shadow(0 4px 20px rgba(0, 194, 255, 0.7)); }
}

.about-section,
.services-section {
    position: relative;
    overflow: hidden;
}

.about-section .container,
.services-section .container {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .flying-icons i,
    .flying-icons-global i {
        animation: none;
        opacity: 0.3;
    }

    .section-flying-icons i {
        opacity: 0.15;
    }
}

@media (max-width: 768px) {
    .flying-icons-global {
        display: none;
    }

    .hero-flying-icons i {
        font-size: 1.2rem !important;
    }

    .hero-flying-icons i:nth-child(5),
    .hero-flying-icons i:nth-child(6) {
        display: none;
    }
}

/* ================= HERO ================= */
.hero-slide {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.75));
}

.hero-glass {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    padding: 50px;
    border-radius: 24px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 800px;
    width: 90%;
    z-index: 2;
}

.hero-glass h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-glass p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-main {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.btn-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary);
}

/* ================= STATS ================= */
.stats-bar {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 50px 0;
    margin-top: -1px;
}

.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-number::after {
    content: "+";
    font-size: 1.5rem;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ================= TITLES ================= */
.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: var(--dark);
}

.section-title.text-start::after {
    margin-left: 0;
}

.section-title::after {
    content: "";
    width: 70px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: block;
    margin: 12px auto;
    border-radius: 5px;
}

/* ================= ABOUT ================= */
.about-section {
    background: #fff;
}

.about-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.about-list {
    list-style: none;
    padding: 0;
    margin-top: 24px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.about-list i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* ================= SECTIONS BG ================= */
.services-section {
    background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
}

.projects-section {
    background: #fff;
}

.contact-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e8f4fd 100%);
}

/* ================= CARDS ================= */
.card-box,
.program-card,
.project-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.card-box:hover,
.program-card:hover,
.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.program-card i {
    font-size: 44px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.program-card h4 {
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

/* ================= PROJECTS ================= */
.project-img-wrap {
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 16px;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 14px;
    transition: 0.4s;
    display: block;
}

.project-card:hover img {
    transform: scale(1.08);
}

.project-card h5 {
    font-weight: 700;
    color: var(--dark);
}

/* ================= CONTACT ================= */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.contact-info-item i {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid #ddd;
    margin-bottom: 0;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.contact-form button {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.3);
}

/* ================= CUSTOM PAGES ================= */
.custom-page-section {
    background: #fff;
}

.custom-page-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text);
}

.custom-page-content p {
    margin-bottom: 1rem;
}

.custom-page-content h3,
.custom-page-content h4 {
    color: var(--dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.custom-page-content ul,
.custom-page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* ================= FOOTER ================= */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0;
    text-align: center;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ================= ANIMATIONS ================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .hero-glass h1 {
        font-size: 2.2rem;
    }

    .hero-glass {
        padding: 30px;
    }

    .hero-glass p {
        font-size: 1rem;
    }

    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .about-img {
        height: 280px;
    }
}
