/* Base Imports */
@import url('variables.css');
@import url('base.css');
@import url('layout.css');
@import url('components.css');

html {
    background-color: #000;
}

/* ==============================
   CONSULTING BRAND OVERRIDE
   Override group red with consulting orange
   ============================== */
:root {
    --color-accent: #ff7f2a;
    --color-accent-dark: #e06018;
}

/* NO SCROLL LAYOUT */
body.no-scroll-layout {
    overflow-x: hidden;
    overflow-y: auto; /* Allow body to scroll so footer is reachable */
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('../consult_background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Fix navbar so it's always at top */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: var(--z-navbar);
}

.view-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: calc(100vh - 80px);
    /* Remove fixed height and hidden overflow to allow body scroll to reach footer */
    height: auto;
    overflow: visible;
}

/* Sections - relative positioned so they stack naturally for the body scroll */
.view-section {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out;
}

.view-section.active {
    height: auto;
    opacity: 1;
    visibility: visible;
    padding: 6rem 5% 4rem; /* Top padding to clear sticky navbar */
    overflow: visible;
}

/* SPLIT LAYOUT (Home / About) */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.split-layout.reverse .split-content {
    order: 2;
}

.split-layout.reverse .split-image {
    order: 1;
}

.split-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.split-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.strategy-subtitle {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.split-content p {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.split-image img {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border-bottom: 5px solid var(--color-accent);
}

/* SERVICES SECTION */
.section-inner {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

.services-grid-scroller {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.service-card p {
    color: #e0e0e0;
    line-height: 1.6;
}

/* CONTACT SECTION */
.centered-content {
    align-items: center;
}

.section-desc {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.contact-box {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row input, .form-row select {
    flex: 1;
    padding: 1rem;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    font-family: inherit;
}

.form-row input::placeholder, .form-row textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-row select option {
    background: #222;
    color: white;
}

.form-row textarea {
    flex: 1;
    padding: 1rem;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
}

.submit-btn {
    width: 100%;
    border: none;
}

/* ==============================
   RESPONSIVE — TABLET (≤1024px)
   ============================== */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        height: auto;
        padding: 2rem 0;
        gap: 2rem;
    }

    /* Hide the image on tablets to save space */
    .split-image {
        display: none;
    }

    .view-section {
        overflow-y: auto;
        height: 100%;
        padding: 2rem 4%;
    }

    .split-content h1 {
        font-size: 2.6rem;
    }

    .split-content h2 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

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

    .form-row {
        flex-direction: column;
    }

    .contact-box {
        padding: 2rem;
    }
}

/* ==============================
   RESPONSIVE — MOBILE (≤768px)
   ============================== */
@media (max-width: 768px) {
    /* iOS Safari fix: background-attachment: fixed causes glitches */
    body.no-scroll-layout {
        background-attachment: scroll;
        background-size: cover;
        /* Keep full-screen height using dvh (dynamic viewport height) with px fallback */
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        overflow-y: auto;
    }

    .view-container {
        height: calc(100dvh - 70px);
    }

    /* Mobile nav: when hamburger is open, nav overlays full screen */
    .nav-links.open {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 10, 10, 0.97);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 999;
    }

    .nav-links.open .nav-link {
        font-size: 1.5rem;
    }

    .split-content h1 {
        font-size: 2rem;
        text-align: center;
    }

    .split-content h1 span {
        text-align: center !important;
    }

    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .hero-ctas {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
    }

    .split-content h2 {
        font-size: 1.8rem;
    }

    .strategy-subtitle {
        font-size: 1.1rem;
    }

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

    .services-grid-scroller {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem !important;
        text-align: center;
    }

    .section-desc {
        font-size: 1rem;
    }

    .contact-box {
        padding: 1.5rem;
        border-radius: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}
