/* Interior Pages Styles */

/* Ensure body doesn't exceed viewport on interior pages */
body.interior-page {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Ensure all main content sections don't overflow */
body.interior-page #main {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Ensure all sections stay within bounds */
body.interior-page section {
    overflow-x: hidden;
    max-width: 100%;
}

/* CRITICAL: Force hamburger menu position on interior pages at all times */
body.interior-page .mobile-menu-btn {
    right: 5vw !important;
    position: fixed !important;
    margin-right: 0 !important;
    max-width: 60px;
}

/* Ensure navigation doesn't cause overflow on interior pages */
body.interior-page .nav,
body.interior-page .nav-container {
    max-width: 100%;
    overflow-x: visible;
}

/* Ensure nav elements stay within viewport */
body.interior-page .nav-logo {
    max-width: 50%;
}

/* Hide footer CTA on interior pages */
body.interior-page .footer-cta {
    display: none;
}

/* Interior Hero - Shorter Height */
.hero-interior {
    min-height: 50vh;
    height: 50vh;
    overflow: hidden;
}

/* Stronger overlay for interior heroes to improve text/logo visibility */
.hero-interior .hero-shade {
    background: linear-gradient(135deg, rgba(13, 31, 45, 0.5) 0%, rgba(13, 31, 45, 0.3) 100%);
    z-index: 1;
}

.hero-interior .hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
}

/* Interior Introduction Section */
.interior-intro {
    padding: 80px 0 60px 0;
    background-color: #0d1f2d;
}

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

.interior-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.interior-label {
    color: #d9c7bd;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.interior-headline {
    margin-bottom: 32px;
    color: #ffffff;
}

/* Desktop/Mobile headline visibility */
.headline-mobile {
    display: none;
}

.headline-desktop {
    display: inline;
}

.interior-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 24px;
}

.interior-text:last-child {
    margin-bottom: 0;
}

/* Hairline only for build page intro */
.intro-with-hairline .interior-text:last-child {
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Content Section */
.content-section {
    padding: 100px 0;
    background-color: #112739;
    overflow-x: hidden;
}

/* Features Section */
.features-section {
    padding: 36px 0 80px 0;
    background-color: #0d1f2d;
}

.features-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px;
}

.feature-column {
    padding: 0 20px;
}

.feature-heading {
    font-family: 'haboro-contrast-normal', 'Georgia', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 300;
    color: #d9c7bd;
    margin-bottom: 16px;
    line-height: 1.2;
}

.feature-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1.125rem;
}

.features-closing {
    max-width: 900px;
    margin: 60px auto 0;
    text-align: center;
    padding: 40px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.features-closing-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.125rem;
    font-style: italic;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: hidden;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.content-grid:last-child {
    margin-bottom: 0;
}

.content-grid-reverse {
    direction: rtl;
}

.content-grid-reverse > * {
    direction: ltr;
}

.content-text {
    padding: 0 20px;
}

.content-heading {
    margin-bottom: 32px;
    color: #ffffff;
    text-transform: none;
    font-family: 'haboro-contrast-normal', 'Georgia', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.01em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-text p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
    line-height: 1.8;
}

.content-text p:last-child {
    margin-bottom: 0;
}

.content-visual {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.content-visual.animate-in {
    opacity: 1;
}

.content-visual img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.content-visual:hover img {
    transform: scale(1.05);
}

/* Parallax Section - Optimized for Performance */
.parallax-section {
    position: relative;
    height: 80vh;
    overflow: hidden;
    will-change: transform;
    margin: 0;
    padding: 0;
    background-color: #0d1f2d;
}

.parallax-image {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.parallax-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Process Section */
.process-section {
    padding: 100px 0;
    background-color: #0d1f2d;
}

.process-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.process-intro {
    text-align: center;
    margin-bottom: 80px;
}

.process-headline {
    color: #ffffff;
}

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

.process-step {
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.process-step:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.step-number {
    font-family: 'haboro-contrast-normal', 'Georgia', serif;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    line-height: 1;
}

.step-title {
    color: #ffffff;
    margin-bottom: 16px;
}

.step-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 120px 0;
    background-color: #112739;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.cta-heading {
    margin-bottom: 24px;
    color: #ffffff;
}
.cta-section .cta-heading > br {display: none;}
.cta-text {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 80px;
    }
    
    .content-grid-reverse {
        direction: ltr;
    }
    
    .content-text {
        padding: 0;
    }
    
    /* Only add negative margin when text comes after image (reversed sections) */
    .content-visual + .content-text {
        margin-top: -24px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Features section mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .feature-column {
        padding: 0;
    }
    
    .interior-intro,
    .content-section,
    .process-section {
        padding: 60px 0;
    }
    
    /* Features section needs minimal top padding to reduce space below hairline on mobile */
    .features-section {
        padding: 0 0 60px 0;
    }
    
    .cta-section {
        padding: 80px 0;
    }
    
    .parallax-section {
        height: 60vh;
    }
    
    .content-text {
        padding: 0;
    }
    
    /* Center content headings on mobile */
    .content-heading {
        text-align: center;
        margin-top: 0;
        margin-bottom: 40px;
    }
    
    /* Center text-medium paragraphs in content section on mobile */
    .content-text .text-medium {
        text-align: center;
    }
    
    /* Reduce space below process headline on mobile */
    .process-intro {
        margin-bottom: 60px;
    }
    
    /* Force hamburger menu to stay within viewport on interior pages */
    body.interior-page .mobile-menu-btn {
        position: fixed !important;
        right: 5vw !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 640px) {
    .hero-interior {
        min-height: 40vh;
        height: 40vh;
    }
    
    /* Move hero title down below the logo */
    .hero-interior .hero-title {
        position: absolute !important;
        top: calc(50% + 60px) !important;
        left: 0 !important;
        transform: translatey(-50%) !important;
        width: 90%;
        right: 0;
        margin: 0 auto;
    }
    
    /* Show mobile headline, hide desktop headline */
    .headline-desktop {
        display: none;
    }
    
    .headline-mobile {
        display: inline;
    }
    
    .process-step {
        padding: 30px;
    }
    
    .step-number {
        font-size: 2.5rem;
    }
    
    .parallax-section {
        height: 50vh;
    }
    
    /* Disable parallax effect on mobile for better performance and stability */
    .parallax-image {
        top: 0 !important;
        height: 100% !important;
        transform: none !important;
    }
    
    /* Force hamburger menu to stay within viewport on interior pages */
    body.interior-page .mobile-menu-btn {
        position: fixed !important;
        right: 5vw !important;
        margin-right: 0 !important;
    }
    .cta-section .cta-heading > br {display: block;}
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .parallax-section {
        height: 70vh;
    }
    
    .parallax-image {
        transform: none !important;
    }
}

@media (max-width: 391px) {
    .hero-interior .hero-title {
        top: calc(50% + 58px) !important;}
}
