/* ============================================
   SPLIT-PANEL HERO — DESIGN / BUILD
   Inspired by Dowbuilt's dual-panel approach
   Adapted for Alto Builders brand
   ============================================ */

/* --- Navbar transparent state for hero pages --- */
body:has(.split-hero) .navbar:not(.scrolled) {
    background-color: transparent;
    box-shadow: none;
}

/* --- Hero Container --- */
section.split-hero {
    display: flex !important;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    position: relative;
    margin-top: -155px; /* Pull hero fully under the transparent navbar */
    padding: 0 !important; /* Override responsive.css section padding */
}

/* --- Individual Panels --- */
.split-hero__panel {
    position: relative;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 60px 48px;
    transition: flex 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.split-hero__panel:hover {
    flex: 1.15;
}

/* --- Panel Images --- */
.split-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.split-hero__panel:hover .split-hero__image {
    transform: scale(1.03);
}

/* DESIGN panel: grayscale with slight warm tint */
.split-hero__panel--design .split-hero__image {
    filter: grayscale(100%) brightness(0.75) contrast(1.1);
}

.split-hero__panel--design:hover .split-hero__image {
    filter: grayscale(100%) brightness(0.8) contrast(1.1);
}

/* BUILD panel: full color, slight darken */
.split-hero__panel--build .split-hero__image {
    filter: brightness(0.8);
}

.split-hero__panel--build:hover .split-hero__image {
    filter: brightness(0.85);
}

/* --- Panel Overlays --- */
.split-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.split-hero__panel--design .split-hero__overlay {
    background: linear-gradient(
        to top,
        rgba(21, 46, 71, 0.7) 0%,
        rgba(21, 46, 71, 0.2) 40%,
        transparent 70%
    );
}

.split-hero__panel--build .split-hero__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.35) 35%,
        rgba(0, 0, 0, 0.1) 60%,
        transparent 80%
    );
}

/* --- Panel Divider --- */
.split-hero__divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
    pointer-events: none;
}

/* --- Panel Content --- */
.split-hero__content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.split-hero__label {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin: 0 0 16px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: splitHeroFadeUp 0.8s ease forwards;
}

.split-hero__panel--design .split-hero__label {
    animation-delay: 0.2s;
}

.split-hero__panel--build .split-hero__label {
    animation-delay: 0.35s;
}

.split-hero__cta {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(12px);
    animation: splitHeroFadeUp 0.7s ease forwards;
}

.split-hero__panel--design .split-hero__cta {
    animation-delay: 0.4s;
}

.split-hero__panel--build .split-hero__cta {
    animation-delay: 0.55s;
}

.split-hero__cta:hover {
    color: #fff;
}

.split-hero__cta::after {
    content: '→';
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.split-hero__cta:hover::after {
    transform: translateX(4px);
}

/* --- Logo Watermark (centered across both panels) --- */
.split-hero__logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    pointer-events: none;
    opacity: 0;
    animation: splitHeroLogoFade 1.2s ease forwards;
    animation-delay: 0.6s;
}

.split-hero__logo img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* --- Headline Banner below hero --- */
.split-hero__headline {
    width: 100%;
    background: var(--primary-color, #1c3f60);
    padding: 28px 48px;
    text-align: center;
}

.split-hero__headline p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
}

/* --- Animations --- */
@keyframes splitHeroFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splitHeroLogoFade {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    to {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (max-width: 1024px) {
    .split-hero__panel {
        padding: 48px 36px;
    }

    .split-hero__label {
        font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    }

    .split-hero__logo img {
        height: 40px;
    }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 768px) {
    section.split-hero {
        display: flex !important;
        flex-direction: column !important;
        height: 100svh;
        min-height: 500px;
        margin-top: -100px; /* Adjust for mobile navbar height */
        padding: 0 !important;
    }

    .split-hero__panel {
        flex: 1;
        padding: 24px 28px;
        align-items: flex-end;
        justify-content: flex-start;
    }

    .split-hero__panel:hover {
        flex: 1; /* Disable expand on mobile */
    }

    .split-hero__panel:hover .split-hero__image {
        transform: none; /* Disable zoom on mobile */
    }

    /* On mobile, position BUILD image to show the interesting lower portion */
    .split-hero__panel--build .split-hero__image {
        object-position: center 70%;
    }

    .split-hero__divider {
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
    }

    .split-hero__label {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .split-hero__cta {
        font-size: 0.75rem;
    }

    .split-hero__logo {
        display: none; /* Hide center logo on mobile — it's in the navbar */
    }

    .split-hero__headline {
        padding: 18px 24px;
    }

    .split-hero__headline p {
        font-size: 0.75rem;
        letter-spacing: 0.12em;
    }
}

/* ============================================
   RESPONSIVE — Small Mobile
   ============================================ */
@media (max-width: 480px) {
    .split-hero__panel {
        padding: 24px 20px;
    }

    .split-hero__label {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
}
