/* Project Nethsuwa - Core Design System */

:root {
    /* Colors - Matched to Logo */
    --primary: #f15a24;
    /* Core Orange */
    --primary-light: #fff5f2;
    /* Soft Peach */
    --primary-dark: #d44b1c;
    /* Deep Orange */
    --secondary: #ed1c24;
    /* Logo Red */
    --accent: #f7941d;
    /* Logo Yellow/Orange */
    --accent-hover: #e67e00;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-main: #ffffff;
    --bg-alt: #fffcfb;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1240px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    padding: 0 24px;
    margin: 0 auto;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-heading);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(241, 90, 36, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(241, 90, 36, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(241, 90, 36, 0.2);
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 90px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

header .container {
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 55px; /* Clean fit in 80px header */
    width: auto;
    object-fit: contain;
}

.footer-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    height: 80px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

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

.active-link {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.menu-btn {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px; /* Match new header height */
    overflow: hidden;
    background: linear-gradient(135deg, #fffcfb 0%, #fff5f2 100%);
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-flex {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    min-width: 0;
}

.hero-content,
.hero-image {
    min-width: 0;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    position: relative;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 70%;
    height: 70%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.hero-blob {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(241, 90, 36, 0.1) 0%, rgba(241, 90, 36, 0) 70%);
    z-index: 0;
}

/* About Section */
.about {
    padding: var(--section-padding);
    background: var(--white);
}

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

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

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    padding: 30px;
    text-align: center;
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary-dark);
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Initiatives Section */
.initiatives {
    padding: var(--section-padding);
    background: var(--bg-alt);
}

.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.initiative-card {
    padding: 40px;
    text-align: center;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.initiative-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.icon-box.has-image {
    background: none;
    padding: 0;
    border: 2px solid var(--primary-light);
}

.initiative-card h3 {
    margin-bottom: 15px;
}

.initiative-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-ongoing {
    background: #fef9c3;
    color: #854d0e;
}

.locations-list {
    text-align: left;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-main);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    position: relative;
    text-align: center;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary);
}

.modal-header h2 {
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.modal-body p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Vision Modal Expansion */
#vision-modal-content {
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.iframe-wrapper {
    width: 100%;
    height: 85vh;
    min-height: 600px;
    margin-top: 20px;
    border-radius: 15px;
    overflow: hidden;
    background: #f8fafc;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Resource Grid Update */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.resource-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-card .condition-details {
    margin-top: auto;
}

.locations-list h4 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locations-list ul li {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.locations-list ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.phase-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.phase-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.phase-img:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* Video Section */
.project-video {
    padding: var(--section-padding);
    background: var(--bg-main);
}

.video-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
    transition: max-width 0.5s ease;
}

.video-container.portrait {
    max-width: 450px; /* Standard portrait width */
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 85vh; /* Keep video within viewport height */
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: 0.3s;
}

.video-container:hover .video-overlay {
    background: rgba(0, 0, 0, 0.1);
}

/* Phases Layout Refinement */
.phases-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    width: 100%;
    margin: 0 auto;
}

.phase-step {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.phase-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.8;
    font-family: var(--font-heading);
    line-height: 1.2;
    min-width: 120px;
    text-align: right;
    padding-top: 15px;
    letter-spacing: 2px;
}

.phase-card {
    flex: 1;
    padding: 50px;
    position: relative;
    text-align: left !important;
}

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

.phase-card .icon-box {
    margin: 0 0 25px 0 !important;
}

@media (max-width: 768px) {
    .phase-step {
        flex-direction: column;
        gap: 15px;
    }

    .phase-number {
        text-align: left;
        min-width: auto;
        font-size: 1.2rem;
        padding-top: 0;
    }

    .phase-card {
        padding: 30px;
    }
}

/* Resource & Partner Styles */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.resource-card {
    padding: 30px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.resource-card h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.resource-card p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.partner-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.partner-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-alt);
    border-radius: 15px;
    align-items: center;
}

.partner-info h4 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.partner-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Contact Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    font-family: inherit;
    transition: 0.3s;
    background: white;
    color: var(--text-main);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(241, 90, 36, 0.1);
}

/* CTA Section */
.cta {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.cta .btn-white {
    background: white;
    color: var(--primary-dark);
}

.cta .btn-white:hover {
    background: #f1f5f9;
}

/* Contact & Footer */
footer {
    padding: 80px 0 40px;
    background: var(--bg-main);
    border-top: 1px solid #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-about h3 {
    margin-bottom: 20px;
}

.footer-links h4 {
    margin-bottom: 25px;
}

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

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

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e293b; /* Dark slate matching the text color */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.social-icon i,
.social-icon svg {
    width: 20px;
    height: 20px;
    font-size: 1.1rem;
    line-height: 1;
    display: block;
}

.social-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(241, 90, 36, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding-top: 80px;
        padding-bottom: 60px;
    }

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

    .hero-image {
        margin-top: 40px;
        width: 100%;
        height: auto;
        min-height: 300px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: auto; /* Fix: Override fixed height from desktop */
        background: var(--white);
        padding: 40px 20px;
        gap: 20px;
        text-align: center;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f1f5f9;
        z-index: 1000;
        animation: slideDown 0.4s ease-out;
    }

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

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

    .menu-btn {
        display: block;
        font-size: 1.5rem;
        color: var(--primary-dark);
    }

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