/* PHASE 2: SAFE RE-DESIGN & ANIMATION - FINAL BUILD */

/* 1. Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    width: 100%;
    overflow-x: hidden;
}

/* 2. Setup Variables */
:root {
    --primary: #0a2e52;
    /* Deep Blue */
    --accent: #1CB5E0;
    /* Cyan - Changed from gold to cyan */
    --cyan: #1CB5E0;
    /* Cyan */
    --agric: #228b22;
    /* Forest Green */
    --light: #f4f4f4;
    --dark: #1a1a1a;
}

/* GLOBAL BACKGROUND LAYERS (Visible behind non-hero sections) */

/* 1. Global Breathing Layer (Deepest Background) */
#global-breathing-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #ffffff;
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0% {
        background-color: #ffffff;
    }

    50% {
        background-color: #d6f1f9;
    }

    /* Light Cyan Breath */
    100% {
        background-color: #ffffff;
    }
}

/* 2. Asteroid Canvas Layer (Sits on top of breathing, behind content) */
#asteroid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}


/* 3. Navigation - White Background */
nav {
    background: #ffffff;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(10, 46, 82, 0.1);
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-left: 10px;
    /* Reduced from 20px to move left */
    transition: transform 0.3s;
    text-decoration: none;
    background: none;
    position: relative;
    /* Restore to flow */
    height: 80px;
    /* Reserve nav height space */
    width: 140px;
    /* Reserve width space */
    z-index: 1001;
}

.logo:hover {
    transform: scale(1.03);
}

.logo img {
    position: absolute;
    /* Float the image relative to the anchor */
    top: -20px;
    /* Moved up to center vertically on the nav bar */
    left: 0;
    height: 120px;
    /* Large size */
    width: auto;
    display: block;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.logo-text {
    display: none;
    /* Ensure text is hidden as requested previously */
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #0a2e52;
    /* Deep Blue for white background */
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #0a2e52;
    /* Deep Blue for white background */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #1CB5E0;
    /* Cyan on hover */
}

/* 4. HERO SECTION - Enhanced with Particle Animation */
#hero {
    height: auto;
    /* Flexible height */
    min-height: 350px;
    padding: 60px 20px;
    /* Controlled spacing */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background-color: #0a2e52;
    /* Solid fallback to mask global BG */
    z-index: 10;
}

/* Neural Ocean Canvas Background with Breathing Gradient */
#neural-ocean {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(-45deg, #0a2e52, #1CB5E0, #0a2e52, #051428);
    background-size: 400% 400%;
    animation: breathingGradient 15s ease infinite;
}

@keyframes breathingGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Subtle Overlay for Text Readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(5, 20, 40, 0.4) 100%);
    z-index: 2;
}

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

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    font-family: 'Playfair Display', serif;
}

h1 span {
    color: var(--accent);
}

.btn-main {
    background: #228b22;
    /* Green */
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 25px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(34, 139, 34, 0.3);
    transition: transform 0.3s, background 0.3s;
}

.btn-main:hover {
    background: #1a6b1a;
    /* Darker green */
    transform: translateY(-3px);
}

/* 5. Section Styles - Transparent to show global background */
.section-padding {
    padding: 80px 5%;
}

.section-gray {
    background: transparent;
    /* Changed from var(--light) to show breathing BG */
}

#about,
#services {
    background: transparent;
    /* Ensure sections show global background */
}

#services {
    padding-bottom: 30px;
    /* Reduced from 80px to bring CTA closer */
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 50px;
}

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

/* About Section Icon */
.about-icon-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.about-3d-icon {
    font-size: 80px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(10, 46, 82, 0.3));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-text .mt-3 {
    margin-top: 15px;
}

.founder-card {
    background: rgba(255, 255, 255, 0.95);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.founder-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.founder-card img {
    max-width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

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

.service-card {
    background: rgba(255, 255, 255, 0.95);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    text-align: center;
    border-bottom: 4px solid var(--agric);
    /* Green accent instead of gold */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Service card background images with overlay */
.service-card:nth-child(1) {
    background-image:
        linear-gradient(to bottom, rgba(10, 46, 82, 0.7), rgba(10, 46, 82, 0.6)),
        url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=800&q=80');
}

.service-card:nth-child(2) {
    background-image:
        linear-gradient(to bottom, rgba(10, 46, 82, 0.7), rgba(10, 46, 82, 0.6)),
        url('https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?w=800&q=80');
}

.service-card:nth-child(3) {
    background-image:
        linear-gradient(to bottom, rgba(10, 46, 82, 0.7), rgba(10, 46, 82, 0.6)),
        url('https://images.unsplash.com/photo-1625246333195-78d9c38ad449?w=800&q=80');
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 50px;
    color: #1CB5E0;
    /* AIB Cyan for better visibility */
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Ensure service card text is white for visibility */
.service-card h3,
.service-card p {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

/* 6. Footer - Redesigned */
footer {
    background: var(--dark);
    color: white;
    padding: 30px 0 20px;
    /* Reduced from 60px to 30px */
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    /* Reduced from 40px to 20px */
    margin-bottom: 20px;
    /* Reduced from 40px to 20px */
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: #1CB5E0;
    /* Cyan */
    margin-bottom: 10px;
}

.footer-tagline {
    color: #228b22;
    /* Green */
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.footer-address {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cccccc;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #1CB5E0;
    /* Cyan */
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #cccccc;
}

.footer-contact i {
    color: #1CB5E0;
    /* Cyan */
}

/* 10. NEW SECTIONS (Video & Map) */
#video-showcase {
    background: #000;
    padding: 0;
}

#partner-cta {
    padding-top: 10px;
    /* Reduced further to 10px */
    padding-bottom: 60px;
}

.video-container {
    width: 100%;
    /* max-height: 80vh; REMOVED max-height constraint */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.video-container video {
    width: 100%;
    height: auto;
    /* max-height: 80vh; REMOVED max-height constraint */
    object-fit: contain;
    /* Ensure full video is seen */
    display: block;
    /* Remove bottom whitespace */
}

/* Map Section - Independent */
.map-section {
    width: 100%;
    max-width: 100%;
    /* Full width within container */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-section iframe {
    display: block;
    width: 100%;
}

.map-section iframe {
    border-radius: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 0.9rem;
}

/* 7. Modal (Glassmorphism & Mobile Scroll Fix) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: white;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    margin: 20px auto;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.4s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #555;
    transition: 0.3s;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-submit:hover {
    background: var(--accent);
}

/* 8. SCROLL ANIMATIONS */
[data-animate] {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

[data-animate="fadeInUp"] {
    transform: translateY(60px) scale(0.95);
    filter: blur(10px);
}

[data-animate="slideInLeft"] {
    transform: translateX(-100px);
    filter: blur(5px);
}

[data-animate="slideInRight"] {
    transform: translateX(100px);
    filter: blur(5px);
}

[data-animate="zoomIn"] {
    transform: scale(0.8);
    filter: blur(5px);
}

[data-animate].animate-active {
    opacity: 1;
    transform: translate(0) scale(1);
    filter: blur(0);
}

/* 9. Mobile Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        /* White background */
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

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

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        text-align: center;
    }

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

    h1 {
        font-size: 2rem;
    }

    #hero {
        padding: 40px 15px;
        min-height: 300px;
    }
}