/* 
   TRIDENT ROOFING & EXTERIORS - PREMIUM OVERHAUL
   Theme: Coastal Light (Logo-Derived)
   Style: UI UX PRO MAX STANDARDS (v3.1 — Light Mode)
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Lexend:wght@300;400;600;800&display=swap');

:root {
    /* Light Logo-Derived Palette */
    --primary-bg: #EDF4F7;         /* Light ice white */
    --secondary-bg: #DAEAEF;       /* Soft teal wash */
    --accent-blue: #2C4A5A;        /* Deep steel from logo ring */
    --accent-cyan: #00B4D8;        /* Pacific Cyan */
    --accent-cyan-rgb: 0, 180, 216; /* RGB equivalent for opacity handling */
    --accent-highlight: #6B8E9B;   /* Teal from logo waves */
    --accent-light: #B5CFD8;       /* Ice blue from logo sky */
    --accent-red: #DC2626;          /* Trident Performance Red */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(44, 74, 90, 0.12);
    
    /* Text */
    --text-main: #1A2D3A;          /* Dark steel charcoal */
    --text-dim: #4E7282;           /* Muted teal-grey */
    --white: #ffffff;
    
    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-glow: 0 0 20px rgba(107, 142, 155, 0.2);
    --shadow-heavy: 0 20px 40px -20px rgba(26, 45, 58, 0.15);
    
    /* Transitions */
    --transition-premium: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);

    /* Hero-specific dark palette (used via classes) */
    --hero-bg: #1A2D3A;
}

/* Base Reset & Smoothness */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px; /* Offset for sticky header on PC */
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Lexend', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Frosted Glass Header */
.main-header {
    background: rgba(237, 244, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 20px rgba(26, 45, 58, 0.06);
    height: 90px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.desktop-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 1025px) {
    .header-content {
        position: relative;
    }
    .desktop-nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        z-index: 5;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.phone-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition-premium);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition-premium);
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link:hover::after {
    width: 100%;
}

/* Premium Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-premium);
    border: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Mercury Fill Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

/* Glass Shimmer Sweep */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: skewX(-25deg);
    transition: none;
}

.btn:hover::before {
    left: 150%;
    transition: left 0.6s ease-in-out;
}

.btn-primary {
    background: var(--accent-cyan);
    color: white;
    box-shadow: 0 10px 20px -10px rgba(var(--accent-cyan-rgb), 0.5);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(var(--accent-cyan-rgb), 0.7);
}

.btn-secondary {
    background: rgba(107, 142, 155, 0.12);
    color: var(--accent-highlight);
    border: 1px solid rgba(181, 207, 216, 0.25);
}

.btn-secondary:hover {
    background: rgba(107, 142, 155, 0.22);
    border-color: var(--accent-highlight);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.65rem;
}

.text-center { text-align: center; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 2rem; }
.mt-md { margin-top: 2rem; }

/* ===== SCROLL-HIJACKED CINEMATIC HERO ===== */
.hero-runway {
    height: 450vh; /* Reduced from 800vh for a snappier scroll experience */
    position: relative;
}

.hero-sticky {
    position: sticky;
    top: 0;
    height: 100dvh; /* Use dynamic viewport height for mobile browser bars */
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-bg);
}

/* Frame Images */
.hero-frames {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center 35%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    will-change: opacity;
    background: var(--hero-bg);
}

.hero-frame.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-frame {
        object-fit: cover !important; /* Fill the tall screen */
        object-position: center 30% !important; /* Focus on the roofline */
    }
}

/* Edge-blending vignette — fades image edges into the background */
.hero-frames::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 40%, var(--hero-bg) 85%),
        linear-gradient(to bottom, var(--hero-bg) 0%, transparent 15%, transparent 85%, var(--hero-bg) 100%),
        linear-gradient(to right, var(--hero-bg) 0%, transparent 10%, transparent 90%, var(--hero-bg) 100%);
}

/* Text-side overlay for readability */
.hero-frames::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(26, 45, 58, 0.95) 0%,
        rgba(26, 45, 58, 0.8) 40%,
        rgba(26, 45, 58, 0.2) 100%
    );
    z-index: 2;
}

@media (min-width: 1024px) {
    .hero-frame {
        width: 65% !important;
        left: 35% !important;
        object-position: center 35%;
    }

    .hero-frames::after {
        background: linear-gradient(
            to right,
            var(--hero-bg) 0%,
            var(--hero-bg) 35%,
            rgba(26, 45, 58, 0.8) 50%,
            transparent 100%
        );
    }

    .hero-frames::before {
        background:
            radial-gradient(ellipse at 67.5% center, transparent 40%, var(--hero-bg) 85%),
            linear-gradient(to bottom, var(--hero-bg) 0%, transparent 15%, transparent 85%, var(--hero-bg) 100%),
            linear-gradient(to right, var(--hero-bg) 0%, var(--hero-bg) 35%, transparent 50%, transparent 90%, var(--hero-bg) 100%);
    }

    .hero-phase, .hero-static-content {
        left: 4% !important;
        max-width: 800px !important;
    }
}

/* Text Overlays */
.hero-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 100%;
    padding: 90px 4rem 0; /* Add top padding to account for header height */
    height: 100%;
}

.hero-ctas {
    margin-top: 3.5rem; /* Gap from description */
    margin-left: 3rem; /* Shift right 3rem */
}

.hero-trust {
    margin-top: 0; /* Move up 1rem (from previous 1rem) */
    margin-left: 1rem; /* Shift right 1rem */
}

@media (max-width: 768px) {
    .hero-overlay {
        justify-content: center; 
        padding: 70px 2rem 0; /* Header is roughly 70-80px on mobile */
    }
    
    .hero-phase h1 {
        font-size: 2.4rem !important;
        margin-bottom: 0.5rem !important;
    }
    .hero-phase p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    .phase-tag {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    .hero-ctas {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    .hero-ctas .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

}

.hero-phases-area {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .hero-phases-area {
        height: 280px; /* Further reduced */
    }
}

.hero-phase {
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    max-width: 600px;
}

.hero-phase.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-static-content {
    position: relative;
    margin-top: 1.5rem;
    z-index: 20;
    max-width: 600px;
    width: 100%;
}

@media (max-width: 768px) {
    .hero-static-content {
        margin-top: 0.5rem;
    }
}

.phase-tag {
    display: inline-block;
    background: rgba(var(--accent-cyan-rgb), 0.2);
    color: var(--accent-cyan);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
}

.hero-phase h1 {
    font-size: 3.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.1; /* Increased to prevent descender clipping */
    padding-bottom: 0.2em; /* Extra space for 'g', 'y', 'p' */
    background: linear-gradient(to bottom right, #fff 50%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.hero-phase p {
    font-size: 1.25rem;
    color: #8AAAB7;  /* Light teal text on dark hero bg */
    margin-bottom: 0.25rem;
    max-width: 375px !important;
    padding-right: 2rem;
    line-height: 1.6;
}

.text-accent {
    -webkit-text-fill-color: var(--accent-cyan);
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-ctas .btn {
    padding: 0.75rem 1.75rem; /* Added padding for PC */
    font-size: calc(0.85rem * 0.75); /* Reduced by 25% to increase breathing room */
}

.hero-trust {
    display: flex;
    gap: 2rem;
    color: #8AAAB7;  /* Light teal on dark hero */
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-trust {
        transform: translateY(-65px); /* Increased lift to clear the now-larger trust bar */
        gap: 1rem;
        flex-wrap: wrap;
    }
}

.hero-trust i {
    color: var(--accent-light);
    margin-right: 0.4rem;
}

/* Progress Bar */
.hero-progress {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    z-index: 20;
}

.hero-progress-bar {
    width: 100%;
    height: 0%;
    background: var(--accent-cyan);
    border-radius: 3px;
    transition: height 0.15s linear;
}

/* Phase Dots */
.hero-phase-dots {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 20;
}

.phase-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-premium);
}

.phase-dot.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
    transform: scale(1.4);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: bounce 2s ease-in-out infinite;
    transition: opacity 0.5s ease;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(15px); }
}

/* Responsive */



/* Premium Sections */
.section-padding {
    padding: 100px 0;
}

.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

.mt-sm { margin-top: 0.75rem !important; } /* 12px */
.mt-md { margin-top: 1.25rem !important; } /* 20px */
.mt-lg { margin-top: 2.5rem !important; }  /* 40px */
.mt-xl { margin-top: 4rem !important; }    /* 64px */
.mb-lg { margin-bottom: 2.5rem !important; }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Feature Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.card-premium {
    background: var(--white);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition-premium);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(26, 45, 58, 0.06);
}

.card-premium:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

.card-premium i {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

/* Comparison Table (Premium) */
.comparison-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Reverted to 50/50 */
    gap: 2rem;
    margin: 2.5rem auto 0;
    max-width: 950px; /* Constrained width for better focus */
}

.comp-box {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--glass-border);
}

.comp-box li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.comp-box li i {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.trident-box {
    background: linear-gradient(135deg, rgba(107, 142, 155, 0.08) 0%, var(--white) 100%);
    border: 1px solid rgba(44, 74, 90, 0.15);
}

/* Animation Classes */
/* Staggered Reveal Engine */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-group .reveal {
    transition-delay: calc(var(--stagger-index, 0) * 0.3s);
}

/* Engineering Standard / Blueprint Section */
.engineering-standard {
    background: rgba(107, 142, 155, 0.03);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(181, 207, 216, 0.1);
}

.standard-header h3, .standard-header p {
    text-align: center;
}





.standard-header .section-title {
    color: #1A2D3A; /* High contrast navy */
    font-weight: 800;
}
@media (min-width: 992px) {
    .engineering-standard {
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 6rem;
        align-items: flex-start;
        padding: 5rem 4rem;
    }
    .standard-header .section-title, .standard-header p {
        text-align: left;
    }
    .standard-desc {
        font-size: 1.25rem;
        line-height: 1.5;
        margin-top: 1.5rem;
    }
    .blueprint-outer {
        max-width: 550px; /* Slightly larger to balance the expanded text */
        margin-left: auto; 
        margin-right: 0;
    }
}
.standard-header .text-dim {
    color: #4A5568; /* Darker gray for readability */
    font-weight: 500;
}

.blueprint-outer {
    max-width: 800px; /* Restored width, but height is constrained via aspect-ratio */
    margin: 0 auto;
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible; /* Allow labels to pop out */
    box-shadow: 0 30px 60px -20px rgba(26, 45, 58, 0.15);
}

.blueprint-container {
    position: relative;
    width: 100%;
    background: #1A2D3A; 
    line-height: 0;
    border-radius: var(--radius-md);
    overflow: visible; /* CRITICAL: Allow hotspots to overflow */
}

.blueprint-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-md);
    display: block;
    opacity: 0.95;
}

/* Hotspots */
/* Blueprint Hotspots - Micro-Dots (10px) */
.hotspot {
    position: absolute;
    width: 100%;
    max-width: 10px; 
    height: 10px;
    background: var(--accent-cyan);
    border-radius: 50%;
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(var(--accent-cyan-rgb), 0.6);
    border: 1px solid white;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.hotspot:hover {
    transform: translate(-50%, -50%) scale(2.5);
    background: var(--accent-red);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.8);
}

.hotspot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; 
    height: 40px;
    border: 1.5px solid var(--accent-cyan);
    border-radius: 50%;
    animation: h-pulse 2s infinite;
    pointer-events: none;
    display: block !important;
}

@keyframes h-pulse {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* Technical Deep Dive Styles for Hotspot Modals */
.technical-deep-dive {
    text-align: left;
}

.technical-deep-dive p {
    margin-bottom: 0.6rem !important;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tech-list {
    list-style: none !important;
    padding: 0 !important;
    margin-bottom: 1rem !important;
}

.tech-list li {
    padding: 0.3rem 0 !important;
    border-bottom: 1px solid rgba(26, 45, 58, 0.05);
    font-size: 0.9rem !important;
    color: var(--text-dim) !important;
}

.tech-list li strong {
    color: var(--accent-blue);
}

.tech-benefit {
    font-style: italic;
    color: var(--accent-cyan) !important;
    font-weight: 600;
    border-top: 1.5px solid rgba(0, 242, 255, 0.1);
    padding-top: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

/* Aggressive Wide Modal to Eliminate Scrolling */
.service-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 880px; /* Further increased to spread text thin */
    width: 95%;
    max-height: 98vh; /* Use almost full height if needed */
    overflow-y: auto;
    padding: 1.5rem 2.5rem; /* Tightened padding */
    position: relative;
    box-shadow: 0 30px 70px rgba(26, 45, 58, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.service-modal h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--accent-blue);
}

.hotspot-label h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hotspot-label p {
    color: #2D3748;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    white-space: normal;
}

/* Mobile Blueprint Optimization */
@media (max-width: 768px) {
    .engineering-standard { padding: 3rem 1.5rem 1rem; }
    .standard-header .section-title { 
        font-size: 2.2rem; 
        margin-bottom: 1rem !important;
    }
    .standard-desc {
        margin-bottom: 1rem !important;
    }
    
    .blueprint-outer {
        max-width: 75%;
        margin: 0 auto;
        overflow: visible;
    }
    
    .blueprint-container {
        width: 100%;
    }
    
    .hotspot {
        width: 10px;
        height: 10px;
    }
    
    .hotspot-label {
        width: 160px;
        padding: 0.8rem;
        font-size: 0.8rem;
        bottom: 30px;
    }
    
    .hotspot-label h4 { font-size: 0.85rem; }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 4rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-ctas { justify-content: center; }
    .grid-3 { grid-template-columns: 1fr; }
    .comparison-wrapper { grid-template-columns: 1fr; }
}

/* Floating Review Carousel */
.reviews-marquee {
    background: transparent;
    padding: 3rem 0;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 2rem;
    animation: marquee 40s linear infinite;
    width: max-content;
}

.review-card-mini {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    width: 300px;
    flex-shrink: 0;
}

.review-card-mini .stars { color: #fbbf24; margin-bottom: 1rem; }
.review-card-mini p { font-size: 0.95rem; color: #2C4A5A; font-style: italic; line-height: 1.6; }
.review-card-mini h4 { margin-top: 1rem; font-size: 1rem; color: var(--text-main); font-weight: 700; }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Footer — Dark anchor for contrast */
.main-footer {
    background: #1A2D3A;
    padding: 100px 0 50px;
    border-top: 1px solid rgba(181, 207, 216, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.footer-col.logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (max-width: 1024px) {
    .main-footer {
        padding: 50px 0 40px; /* Reduced padding above logo on mobile */
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { 
    color: rgba(255, 255, 255, 0.7); 
    transition: var(--transition-premium); 
    text-decoration: none; 
    font-size: 1.05rem;
}
.footer-links a:hover { color: var(--white); padding-left: 5px; }

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(181, 207, 216, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.main-footer p {
    color: rgba(255, 255, 255, 0.7);
}

/* Premium Service Cards */
.service-card-premium {
    position: relative;
    overflow: visible;
    margin-top: 4rem; /* More space for the 'hat' */
    display: flex;
    flex-direction: column;
    transition: var(--transition-premium);
    background: transparent; /* Background handled by ::before */
}

/* The 'House Body' Background */
.service-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    clip-path: polygon(0% 100%, 100% 100%, 100% 60px, 50% 0%, 0% 60px);
    z-index: -1;
    transition: var(--transition-premium);
    box-shadow: 0 4px 15px rgba(26, 45, 58, 0.06);
}

.service-card-premium:hover::before {
    background: var(--primary-bg);
}

/* The 'Hat' (Roof Ridge) — Uniform SVG Silhouette */
.service-card-premium::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 60px); /* Sits right on the 60px peak */
    left: 0;
    right: 0;
    height: 60px; 
    background: var(--accent-blue);
    /* High-fidelity SVG mask with solid integrated chimney */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M2,38 L18,26 L50,2 L98,38' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18,26 L18,8 L32,8 L32,15.5' fill='black' stroke='black' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M2,38 L18,26 L50,2 L98,38' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18,26 L18,8 L32,8 L32,15.5' fill='black' stroke='black' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    z-index: 10;
    pointer-events: none;
    transition: var(--transition-premium);
}

.service-card-premium:hover::after {
    background: var(--accent-cyan);
    transform: translateY(-15px) scale(1.05); /* Extra lift but synced transition */
}

/* Global Spotlight Support for Multiple Card Types */
.service-card-premium,
.logo-showcase-card,
.contact-info-panel,
.contact-form-panel {
    position: relative;
    overflow: visible; /* CRITICAL: Allow badges/labels to overflow */
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: var(--transition-premium);
}

.service-card-premium:hover,
.logo-showcase-card:hover,
.contact-info-panel:hover,
.contact-form-panel:hover {
    transform: translateY(-12px);
    z-index: 20;
}

/* Dynamic Spotlight for Cinematic Effect */
.card-spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(44, 74, 90, 0.25),
        transparent 80%
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit; /* Matches parent radius (e.g. for logo card) */
}

/* For cards with custom shapes (the House cards) */
.service-card-premium .card-spotlight {
    clip-path: polygon(0% 100%, 100% 100%, 100% 60px, 50% 0%, 0% 60px);
}

.service-card-premium:hover .card-spotlight,
.logo-showcase-card:hover .card-spotlight,
.contact-info-panel:hover .card-spotlight,
.contact-form-panel:hover .card-spotlight {
    opacity: 1;
}

.service-card-premium .content-box,
.service-card-premium .image-box,
.logo-showcase-card > *,
.contact-info-panel > *,
.contact-form-panel > * {
    position: relative;
    z-index: 1;
}

.service-card-premium .image-box {
    height: 250px;
    margin-top: 0;
    padding: 0 2.25rem;
    overflow: hidden;
    clip-path: polygon(0% 100%, 100% 100%, 100% 60px, 50% 0%, 0% 60px);
}

.service-card-premium .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-premium);
}

.service-card-premium:hover .image-box img {
    transform: scale(1.1);
}

.service-card-premium .content-box {
    padding: 1.25rem 2.5rem 2.5rem; /* Reduced top padding by 50% for PC */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card-premium h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.service-card-premium p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    padding: 0 0.75rem;
}

.service-card-premium .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto;
    padding: 0.5rem 1.2rem;
    background: var(--accent-cyan);
    border-radius: 100px;
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.service-card-premium .nav-link:hover {
    background: var(--accent-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-cyan-rgb), 0.3);
}

/* Emergency Button Positioning Fixed */
.emergency-toggle-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

/* Before/After Slider Premium Overlay */
.slider-outer {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: visible; /* CRITICAL: Allow pins to overflow */
}

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    max-height: 550px;
    overflow: hidden; /* Clips the images */
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

.slider-container img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.img-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 50% 0 0); /* Start at 50% revealed */
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--white);
    z-index: 30; /* Set above portfolio-pins (z-index 20) to ensure smooth dragging */
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.slider-handle::after {
    content: '\f337';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bg);
    border: 2px solid var(--accent-blue);
    font-size: 1.2rem;
}

/* Portfolio Pins */
.portfolio-pins {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}

.p-pin {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: auto;
    cursor: help;
    opacity: 1; /* Always visible in this new 4-pin mode */
    visibility: visible;
    transition: transform 0.3s ease;
    z-index: 5;
}

.p-pin:hover {
    transform: scale(1.2);
}

.p-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    animation: p-pulse-ring 2s infinite;
    background: rgba(220, 38, 38, 0.4); /* Default Risk Red */
    border: 2px solid #dc2626;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.p-pin.is-success .p-pulse {
    background: rgba(34, 197, 94, 0.4); /* Success Green */
    border-color: #22c55e;
}

.p-pin .content-success,
.p-pin.is-success .content-risk {
    display: none;
}

.p-pin.is-success .content-success {
    display: grid;
}

.p-pin .content-risk h4 { color: #f87171; }
.p-pin.is-success .content-success h4 { color: #4ade80; }

.p-pin::after {
    content: '';
    position: absolute;
    inset: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.p-risk::after { border: 3px solid #dc2626; }
.p-success::after { border: 3px solid #10b981; }

@keyframes p-pulse-ring {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.p-label {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 220px;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 30;
    pointer-events: none;
}

.p-pin:hover .p-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.p-label h4 { font-size: 0.95rem; margin-bottom: 0.3rem; color: #1A2D3A; font-weight: 700; line-height: 1.2; }
.p-label p { font-size: 0.85rem; margin: 0; color: #4A5568; line-height: 1.5; white-space: normal; }

.p-risk .p-label { border-top: 4px solid #dc2626; }
.p-success .p-label { border-top: 4px solid #10b981; }

/* Portfolio Grid Overhaul */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 split */
    gap: 4rem;
    align-items: center;
    margin: 2rem auto 0;
    max-width: 1300px; /* Expanded for larger portfolio visual */
}

.portfolio-info h3 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.feature-list i {
    color: var(--accent-cyan);
}

.pc-only { display: inline-flex; }
.mobile-only { display: none !important; }

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .portfolio-info {
        display: none; /* Hidden on mobile, shown via modal */
    }
    .pc-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    .slider-container {
        aspect-ratio: 4 / 3; /* Slightly wider for mobile usability */
    }
    
    .portfolio-grid {
        margin-top: 0.5rem; /* Reduced margin above slider on mobile */
    }
}


/* Active state for Estimate Tool */
.active-option {
    border-color: var(--accent-cyan) !important;
    background: rgba(var(--accent-cyan-rgb), 0.1) !important;
    box-shadow: 0 0 15px rgba(var(--accent-cyan-rgb), 0.2) !important;
}

/* Fix for Step Transitions */
.step {
    display: none;
}

.step.active {
    display: grid;
    animation: fadeIn 0.5s ease-out;
}

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

/* Better Slider Handle */
.slider-handle {
    transition: left 0.1s ease-out;
}

/* Emergency Mode Override (Vibrant Red) */
body.emergency-mode {
    --primary-bg: #2d0a0a;
    --secondary-bg: #3d1010;
    --accent-cyan: #ff4d4d;
    --accent-cyan-rgb: 255, 77, 77;
    --accent-blue: #ff8080;
    --accent-highlight: #ffb3b3;
    --glass-bg: rgba(45, 10, 10, 0.75);
    --glass-border: rgba(255, 77, 77, 0.2);
}

/* ===== SERVICES GRID (4 columns on PC) ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.service-card-emergency {
    grid-column: 1 / -1; /* Spans full width area */
    max-width: 750px; /* Reduced width by 25% for contrast */
    margin: 3rem auto 0; /* Centered in the grid */
    display: flex;
    justify-content: center;
}

.emergency-banner {
    display: flex;
    flex-direction: column; /* Vertical stack for perfect centering */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem 1rem; /* Reduced by 50% */
    max-width: 600px; 
    width: 100%;
    margin: 0 auto; /* Centers the banner within the card */
}

.emergency-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(var(--accent-cyan-rgb), 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.emergency-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-cyan);
    text-align: center;
}

.emergency-content p {
    color: var(--text-dim);
    font-size: 0.95rem;
    text-align: center;
}

.service-modal-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* ===== SERVICE DETAIL MODAL ===== */
.service-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 45, 58, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.service-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.service-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(26, 45, 58, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.service-modal-overlay.active .service-modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--secondary-bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1rem;
    transition: var(--transition-premium);
}

.modal-close:hover {
    background: var(--accent-cyan);
    color: var(--white);
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.modal-body .modal-subtitle {
    color: var(--accent-highlight);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.modal-body ul li {
    padding: 0.6rem 0;
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.modal-body ul li i {
    color: var(--accent-cyan);
    margin-top: 3px;
    flex-shrink: 0;
}

.modal-body .modal-cta {
    display: inline-flex;
    margin-top: 1rem;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: grid;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-premium);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-content {
        padding: 0 1rem;
        position: relative;
    }

    .logo img {
        height: 45px;
    }

    .phone-link {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .desktop-nav {
        display: none;
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(26, 45, 58, 0.1);
        z-index: 999;
    }

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

    .hamburger {
        display: flex;
    }

    .phone-text {
        display: inline;
    }

    .header-cta {
        display: none;
    }

    .header-actions {
        gap: 1rem;
    }

    /* Services 2x2 layout preserved on mobile as requested */
    .services-grid {
        grid-template-columns: 1fr 1fr; /* Reverted to 50/50 */
        gap: 0.75rem;
        row-gap: 2.5rem;
    }

    .service-card-premium {
        margin-top: 0;
        clip-path: none;
        overflow: visible;
    }
    .service-card-premium .content-box { padding: 2rem; }
    .service-card-premium p { margin-bottom: 1rem; }

    .service-card-premium::before {
        clip-path: polygon(0% 100%, 100% 100%, 100% 45px, 50% 0%, 0% 45px);
    }

    .service-card-premium::after {
        bottom: calc(100% - 45px);
        height: 45px;
        left: 0;
        right: 0;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M2,38 L18,26 L50,2 L98,38' fill='none' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18,26 L18,8 L32,8 L32,15.5' fill='black' stroke='black' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M2,38 L18,26 L50,2 L98,38' fill='none' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18,26 L18,8 L32,8 L32,15.5' fill='black' stroke='black' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .hero-phase h1 {
        font-size: 2.1rem;
    }

    .service-card-premium .image-box {
        height: 140px;
        padding: 0 0.5rem;
        clip-path: polygon(0% 100%, 100% 100%, 100% 45px, 50% 0%, 0% 45px);
    }

    .service-card-premium .content-box {
        padding: 1rem;
    }

    .emergency-banner {
        flex-direction: column;
        text-align: center;
        padding: 0 1.5rem;
        gap: 1rem;
        max-width: 100%;
    }

    .emergency-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-col:last-child {
        grid-column: 1 / -1;
        text-align: center;
        border-top: 1px solid rgba(181, 207, 216, 0.1);
        padding-top: 2rem;
        margin-top: 1rem;
    }

    .footer-col:last-child .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero-phases-area {
        height: 380px; /* Reduced for mobile side-by-side */
        width: 100%;
    }

    .hero-static-content {
        position: relative;
        margin-top: 1.5rem;
        padding: 0;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        z-index: 20;
    }

    .hero-static-content .hero-ctas {
        display: flex;
        flex-direction: row; /* Side by side on mobile */
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-static-content .hero-ctas .btn {
        flex: 1;
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
        white-space: nowrap;
        justify-content: center;
    }

    .hero-static-content .hero-trust {
        display: flex !important;
        flex-direction: row !important; /* Strictly horizontal */
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        margin-top: 1rem;
    }

    .hero-static-content .hero-trust span {
        display: flex;
        align-items: center;
        gap: 0.2rem;
    }

    /* Sections */
    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .comparison-wrapper {
        grid-template-columns: 1fr;
    }

    /* Modal mobile */
    .service-modal {
        padding: 2rem;
        max-height: 90vh;
    }

    .service-modal h2 {
        font-size: 1.5rem;
    }
}

/* ===== CONTACT PAGE ===== */
.contact-page {
    background: var(--white);
    color: #1A2D3A; /* Substantially darker main text */
}

.contact-page .section-subtitle {
    color: #cbd5e1; /* Maintain light for dark hero section only */
}

.contact-page main .text-dim {
    color: #334155; /* Deep slate for secondary text in main content only */
}

.contact-page .service-area-box p {
    color: #1e293b; /* Strong contrast for service details */
}

.contact-hero {
    background: #f8fafc;
    color: #1A2D3A;
    text-align: center;
    padding-top: 140px; /* More breathable hero */
    padding-bottom: 50px;
    border-bottom: 1px solid #e2e8f0;
}

.map-container {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(26, 45, 58, 0.05);
    position: relative; /* Support absolute overlay ring */
}

.map-range-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    border: 3px dashed var(--accent-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.15), inset 0 0 25px rgba(0, 242, 254, 0.15);
    background: rgba(0, 242, 254, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-range-ring .range-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-bg);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--accent-cyan);
    box-shadow: var(--shadow-premium);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .map-range-ring {
        width: 180px !important;
        height: 180px !important;
    }
    .map-range-ring .range-label {
        bottom: 10px !important;
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(0.2) contrast(1.1); /* Subtle premium toning */
}

.contact-hero h1 {
    color: #1A2D3A;
}

.contact-hero .section-subtitle {
    color: #475569;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0; /* Remove inherited large margin */
}

.hero-text-center {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-carousel {
    position: relative;
    width: 100%;
}

.portfolio-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.portfolio-slide.active {
    display: block;
}

.portfolio-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(26, 45, 58, 0.15);
    border: 1px solid var(--glass-border);
}

.portfolio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem; /* Tightened padding as requested */
    position: relative;
    z-index: 100; /* Ensure it's above other elements */
}

.carousel-btn {
    background: var(--accent-blue);
    border: none;
    color: var(--white);
    width: 42px; /* Slightly smaller for precision */
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(44, 74, 90, 0.2);
}

.carousel-btn:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(var(--accent-cyan-rgb), 0.3);
}

.carousel-dots {
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(44, 74, 90, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-cyan);
    transform: scale(1.3);
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
    margin-top: 50px;
    position: relative;
    z-index: 20;
}

.contact-info-panel {
    background: var(--white); /* Match form side */
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(26, 45, 58, 0.05);
    color: #1A2D3A;
}

.info-group {
    margin-bottom: 2rem;
}

.info-group .label {
    display: grid;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1A2D3A; /* Dark by default */
    text-decoration: none;
    transition: var(--transition-premium);
}

.info-link:hover {
    color: var(--accent-blue); /* Blue on hover */
    transform: translateX(5px);
}

.service-area-box h3 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.map-placeholder {
    height: 150px;
    background: rgba(44, 74, 90, 0.3);
    border: 1px dashed var(--accent-blue);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--accent-blue);
    font-weight: 500;
}

.map-placeholder i {
    font-size: 2.5rem;
}

/* Premium Form */
.contact-form-panel {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
}

.premium-form .form-group {
    margin-bottom: 1.5rem;
}

.premium-form label {
    display: grid;
    margin-bottom: 0.5rem;
    font-weight: 700; /* Bolder */
    color: #000; /* Solid black */
    font-size: 0.95rem;
}

.premium-form input,
.premium-form textarea,
.premium-form select {
    width: 100%;
    padding: 1.1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-premium);
}

.premium-form input:focus,
.premium-form textarea:focus,
.premium-form select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(44, 74, 90, 0.05);
}

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

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 40px; /* Symmetrical gap for mobile */
    }
    
    .contact-info-panel,
    .contact-form-panel {
        padding: 2rem;
    }
    
    .info-link {
        font-size: 1.2rem;
    }
    
    .contact-hero {
        padding-top: 90px; /* Offset for 70px sticky header + spacing */
        padding-bottom: 40px;
    }
}

/* About Section Styles */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr; /* 75/25 split */
    gap: 3rem;
    align-items: center;
}

.logo-showcase-card {
    background: var(--white);
    padding: 3.5rem 1rem; /* Tightened for more text space */
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(26, 45, 58, 0.08);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--glass-border);
}

.about-logo {
    width: 100%;
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.exp-badge-premium {
    position: absolute;
    bottom: -25px;
    right: -25px;
    background: var(--accent-cyan);
    color: var(--white);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(var(--accent-cyan-rgb), 0.4);
    border: 4px solid var(--white);
    z-index: 5;
}

.exp-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

@media (max-width: 1024px) {
    html { scroll-padding-top: 70px; } /* Offset for sticky header on mobile */
    .hero-phase h1 { font-size: 2.5rem; }
    .hero-phase p { font-size: 1.05rem; max-width: 280px !important; }
    .hero-phase .phase-tag { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
    .hero-phase { left: 1.5rem; max-width: 92%; }
    .hero-frame { object-position: center 30% !important; }
    .hero-overlay { padding: 0 1.5rem; height: 100%; }
    .hero-static-content { 
        display: flex; 
        flex-direction: column; 
        align-items: center;
        position: static !important; 
    }
    .hero-trust { 
        position: static !important; 
        display: flex !important; 
        flex-direction: row !important; 
        justify-content: center !important;
        gap: 1rem !important; 
        width: 100% !important;
        margin-top: 1rem !important;
        z-index: 50;
    }
    .hero-ctas { flex-direction: column; gap: 0.8rem; margin-bottom: 1.25rem; }
    
    /* Sleeker Mobile Header */
    .main-header { height: 70px; }
    .header-content { padding: 0 1rem; }
    .logo img { height: 45px !important; width: auto; }
    .header-actions { gap: 1rem; }
    .phone-text { display: inline; font-size: 0.8rem; } /* Restored and shrunk */
    
    .hero-progress { display: none; }
    .hero-phases-area { height: 450px; }
    .section-subtitle { margin-bottom: 1rem; }
    .portfolio-grid { margin-top: 0rem; grid-template-columns: 1fr; gap: 1rem; }
    .portfolio-info { display: none; }
    .pc-only { display: none !important; }
    .mobile-only { display: block !important; }
    .slider-container { aspect-ratio: 4 / 3; }
    .service-modal { padding: 2rem 1.5rem; max-height: 95vh; }
    .modal-body h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .modal-body p { font-size: 0.9rem; margin-bottom: 0.75rem; }
    .feature-list li { margin-bottom: 0.2rem; font-size: 0.85rem; }
    .portfolio-grid { padding: 1.5rem; gap: 1.5rem; }
    .portfolio-controls { gap: 1rem; margin-top: 2rem; }
    .carousel-btn { width: 40px; height: 40px; font-size: 0.8rem; }

    /* Compact Estimate Section for Mobile */
    .section-padding { padding: 40px 0; }
    .estimate-tool { padding: 0 1.5rem; margin-top: 1.5rem; }
    .estimate-progress { margin-bottom: 1.25rem; }
    .estimate-options { gap: 0.8rem; grid-template-columns: 1fr; }
    .option-card { padding: 1rem; }
    .option-card i { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .option-card h4 { font-size: 1rem; margin-bottom: 0.25rem; }
    .estimate-navigation { margin-top: 1.5rem; }
    .section-title { font-size: 2.2rem; margin-bottom: 0.5rem; }

    /* Trident Edge Mobile Optimization — Narrower & Tighter */
    .comparison-wrapper { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem; }
    .comp-box { padding: 1.25rem; width: 90%; margin: 0 auto; }
    .comp-box h3 { font-size: 1.1rem !important; margin-bottom: 1rem !important; }
    .comp-box li { font-size: 0.85rem !important; margin-bottom: 0.75rem !important; }
    .comp-box .clickable-edge { padding: 6px 10px; margin-bottom: 0.2rem !important; }
    
    .grid-3 { grid-template-columns: 1fr 1fr; /* Reverted to 50/50 */ gap: 0.75rem; margin-top: 1.5rem; }
    .card-premium { padding: 1.5rem 1rem; text-align: center; }
    .card-premium i { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .card-premium h3 { font-size: 1rem; margin-bottom: 0.25rem; }
    .card-premium p { font-size: 0.75rem; line-height: 1.3; }
    
    /* Center and widen the 3rd card (Warranty) */
    .grid-3 .card-premium:nth-child(3) {
        grid-column: 1 / -1;
        width: 80%;
        margin: 0.5rem auto 0;
    }

    /* About Section Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem; /* Reduced by 50% */
        text-align: center;
    }
    
    .about-logo {
        max-width: 140px; /* Reduced by 50% */
        margin: 0 auto;
    }
    
    .about-content h2, .about-content .section-subtitle {
        text-align: center !important;
    }
    
    .logo-showcase-card {
        padding: 1.5rem 1rem; /* Reduced by 50% */
        max-width: 320px;
        margin: 0 auto;
    }
    
    .exp-badge-premium {
        width: 100px;
        height: 100px;
        bottom: -15px;
        right: -15px;
    }
    
    .exp-num { font-size: 1.5rem; }

    /* Fix for contact hero overlap on mobile */
    .contact-hero { padding-top: 120px !important; }

    /* Ultra-Compact Mobile Footer */
    .main-footer { padding: 40px 0 20px !important; }
    .footer-grid { 
        grid-template-columns: 1fr 1fr; /* Reverted to 50/50 */ 
        gap: 2rem 1rem; 
        margin-bottom: 2rem;
        text-align: center;
    }
    .footer-col.logo-col { grid-column: 1 / -1; margin-bottom: 1rem; }
    .footer-col.logo-col img { margin-bottom: 0.25rem !important; }
    .footer-col.logo-col p { display: none; } /* Hide long text for vertical space */
    .footer-col:last-child { grid-column: 1 / -1; margin-top: 1rem; }
    .footer-col h4 { margin-bottom: 0.2rem; font-size: 1.25rem; color: var(--white); }
    .footer-links li { margin-bottom: 0.2rem; font-size: 0.95rem; }
    .footer-bottom { 
        flex-direction: column; 
        gap: 0.35rem; 
        padding-top: 15px; 
        font-size: 0.75rem; 
        text-align: center;
    }
}

/* ==========================================================================
   Infinite Trust Scroll (Option 5)
   ========================================================================== */
.trust-bar {
    background: var(--primary-bg);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.trust-scroll-container {
    display: flex;
    white-space: nowrap;
    width: 200%;
}

.trust-track {
    display: flex;
    align-items: center;
    gap: 80px;
    animation: trust-scroll 40s linear infinite;
    padding-right: 80px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease, filter 0.3s ease;
    filter: grayscale(1) opacity(0.5);
}

@media (max-width: 768px) {
    .trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
        font-size: 1rem; /* Reduced by 20% */
        gap: 15px;
    }
    .trust-item i {
        font-size: 2rem !important; /* Scaled up from 1.35rem */
    }
}

.trust-item:hover {
    color: var(--white);
    filter: grayscale(0) opacity(1);
}

.trust-item i {
    font-size: 1.5rem;
    color: var(--accent-red);
}

@keyframes trust-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Mobile Floating Action Hub (Option 1)
   ========================================================================== */
.mobile-hub {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

@media (max-width: 992px) {
    .mobile-hub {
        display: flex;
    }
}

.floating-cta {
    background: rgba(30, 30, 35, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                inset 0 0 10px rgba(220, 38, 38, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

@media (max-width: 768px) {
    .floating-cta {
        padding: 8px 18px;
        font-size: 0.85rem;
        gap: 8px;
    }
    .mobile-hub {
        bottom: 15px;
        right: -12px;
    }
}

.floating-cta:active {
    transform: scale(0.95);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
    animation: p-pulse-ring 2s infinite;
}

@keyframes p-pulse-ring {
    0% { transform: scale(0.5); opacity: 0.8; }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}

/* ==========================================================================
   3D Estimate Polish (Option 2) & Parallax (Option 3)
   ========================================================================== */


.option-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.option-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-red);
}

.estimate-result-box {
    position: relative;
    overflow: hidden;
}

.estimate-result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.parallax-bg {
    transition: background-position 0.1s ease-out;
    will-change: background-position;
}

/* Hero Trust Overlay (Option 5 - Global Anchor) */
.pc-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.95), transparent);
    border-bottom: none;
    border-top: none;
    padding: 12px 0; /* Middle ground for desktop scaling */
    z-index: 100;
}

@media (max-width: 768px) {
    .pc-hero-overlay {
        padding: 16px 0; /* Reduced by 20% */
    }
    .btn i.fa-chevron-right {
        display: none; /* Remove arrow to declutter mobile text */
    }
}

@media (min-width: 993px) {
    .pc-hero-overlay {
        padding: 20px 0;
    }
}

/* Mobile Hub Visibility (Option 1 Refinement) */
@media (max-width: 992px) {
    .mobile-hub {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
        transform: translateY(20px);
    }
    
    .mobile-hub.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}


/* Scroll Indicator */

.scroll-indicator {
    position: absolute;
    bottom: 6rem; /* Reduced by 25% */
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: bounce-glide 2s ease-in-out infinite;
    transition: opacity 0.5s ease;
}


.scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes bounce-glide {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.scroll-text {
    font-weight: 600;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .service-card-premium .image-box {
        height: 150px; /* smaller height for mobile 2 column */
        padding: 0 1.25rem;
    }
    .service-card-premium h3 {
        font-size: 1.1rem;
    }
    .service-card-premium p {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
}

/* Custom Dropdown for Contact Form */
.custom-dropdown {
    position: relative;
    width: 100%;
}
.custom-dropdown-header {
    background: var(--white);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    padding: 1rem;
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-heavy);
}
.custom-dropdown-content.open {
    display: flex;
}

.custom-dropdown-content label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 0.5rem !important;
    margin: 0 !important;
    width: 100% !important;
    white-space: nowrap !important;
}
.custom-dropdown-content input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    transform: scale(1.2);
}
/* temporary marker */
.custom-dropdown-content-label-old {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0;
}

.reviews-marquee {
    overflow: hidden;
    width: 100%;
    padding: 2rem 0;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 2rem;
    animation: reviews-scroll 40s linear infinite;
    width: max-content;
}

.review-card-mini {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-heavy);
    width: 320px;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.review-card-mini .stars {
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.review-card-mini p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-style: italic;
}

.review-card-mini h4 {
    font-size: 0.95rem;
    color: var(--text-main);
}

@keyframes reviews-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.reviews-marquee:hover .marquee-content,
.reviews-marquee:active .marquee-content {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .phone-link {
        font-size: 1.2rem !important;
        font-weight: 800 !important;
    }
    .phone-link i {
        font-size: 1.3rem !important;
    }
    .hero-ctas .btn-secondary {
        font-size: calc(1.1rem * 0.75) !important; /* Reduced by 25% */
        padding: 1.2rem 2.5rem !important;
    }
}

/* AGGRESSIVE MOBILE HERO FIX */
@media (max-width: 768px) {
    .hero-overlay {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Center the whole stack vertically */
        align-items: flex-start !important; /* Default to left alignment */
        padding: 90px 2rem 2rem !important; 
        height: 100% !important;
        gap: 1.2rem; /* Balanced gap */
        text-align: left !important;
    }
    .hero-phases-area {
        height: auto !important;
        min-height: 180px;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: center !important;
        width: 100% !important;
    }
    .hero-phase {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .hero-static-content {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Center the buttons and trust badges */
        position: static !important;
    }
    .hero-trust {
        position: static !important;
        margin-top: 1rem !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .scroll-hint {
        position: static !important;
        transform: none !important;
        left: auto !important; /* Remove the 50% offset */
        margin: 1.5rem auto !important; /* Center via auto margins */
        display: flex !important;
        flex-direction: column;
        align-items: center;
        align-self: center !important; /* Explicitly center this block */
    }
    .hero-ctas {
        margin-top: 0.5rem !important;
    }
    .hero-phase h1 {
        font-size: 2.1rem !important;
        line-height: 1.1 !important;
    }
    .hero-phase p {
        font-size: 0.95rem !important;
        margin-top: 0.5rem !important;
    }
    .hero-trust {
        position: absolute !important;
        bottom: 1.5rem !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        width: 100% !important;
        z-index: 100 !important;
    }
    .hero-trust span {
        font-size: 0.7rem !important;
        white-space: nowrap;
    }
    .hero-trust {
        position: absolute !important;
        bottom: 1.5rem !important; /* Anchored to bottom of screen */
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        width: 100% !important;
        z-index: 100 !important;
        padding-bottom: 5px;
    }
    .hero-ctas .btn {
        padding: 0.4rem 1.8rem !important;
        font-size: calc(0.85rem * 0.75) !important; /* Consistent 25% reduction */
    }
}

/* Trust Logo Styling */






@media (max-width: 768px) {
    .trust-logo {
        max-height: 22px;
    }
}



@media (max-width: 768px) {
    .trust-logo {
        max-height: 25px; /* Smaller on mobile */
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 9rem !important;
        font-size: 0.7rem !important;
    }
}



/* Click Badge for Comparison Table */
.trident-box { position: relative; }

.click-badge {
    position: absolute;
    bottom: -12px;
    right: -12px;
    font-size: 0.65rem;
    color: var(--white);
    background: var(--accent-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(26, 45, 58, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

@media (max-width: 768px) {
    .click-badge {
        bottom: 10px;
        right: 10px;
        font-size: 0.6rem;
    }
}

/* Clickable Edge Interaction Styles */
.clickable-edge {
    cursor: pointer;
    padding: 8px 15px; /* Matches 1rem margin of left side */
    margin-left: -15px; /* Offset the padding to keep text aligned */
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.clickable-edge:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(26, 45, 58, 0.05);
    border-color: rgba(26, 45, 58, 0.1);
}

.clickable-edge:active {
    transform: scale(0.97) translateX(5px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 6px rgba(26, 45, 58, 0.1);
}

.clickable-edge i {
    transition: transform 0.3s ease;
}

.clickable-edge:hover i {
    transform: scale(1.2);
}

/* DEFINITIVE MOBILE HERO OVERRIDES */
@media (max-width: 768px) {
    .hero-runway {
        height: 450vh !important; /* Keep the runway scroll height for scroll-hijacking */
        position: relative !important;
        background: var(--hero-bg) !important; /* Preclude any white gap exposure during scrolling */
    }
    .hero-sticky {
        position: sticky !important; /* Lock the sticky context */
        top: 0 !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamically expand to full lvh as address bar retracts, preventing white bars */
        width: 100% !important;
        overflow: hidden !important;
        background: var(--hero-bg) !important;
    }
    .hero-progress {
        display: none !important; /* Hide progress bar on mobile */
    }
    
    /* Aligned on the right edge, vertically centered */
    .hero-phase-dots {
        position: absolute !important;
        right: 1.2rem !important;
        top: 45% !important;
        left: auto !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        z-index: 40 !important;
    }
    
    /* Overlay uses flex column layout stretching to full height */
    .hero-overlay {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important; /* Align content towards the bottom above the trust brand carousel */
        align-items: stretch !important;
        text-align: left !important;
        padding: 85px 1.5rem calc(50px + 1.5rem) !important; /* Keep clear of the brand carousel (approx 50px tall) */
        height: 100% !important;
        box-sizing: border-box !important;
        z-index: 10 !important;
    }
    
    /* Order 1: Text element area (aligned LEFT) */
    .hero-phases-area {
        order: 1 !important;
        position: relative !important;
        height: 240px !important; /* Stable static height to prevent the rest of elements from shifting when text length changes */
        width: 100% !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }
    .hero-phase {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        opacity: 0 !important;
        pointer-events: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        transition: opacity 0.5s ease-in-out !important;
    }
    .hero-phase.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .hero-phase h1 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
        align-self: flex-start !important;
    }
    .hero-phase p {
        font-size: 0.92rem !important;
        line-height: 1.4 !important;
        max-width: 85% !important; /* Avoid hitting the dots on the right */
        text-align: left !important;
        align-self: flex-start !important;
    }
    .hero-phase .phase-tag {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.6rem !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
        align-self: flex-start !important;
    }
    
    /* Order 2: CTA buttons (Centered) */
    .hero-ctas {
        order: 2 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.7rem !important;
        margin-left: 0 !important; /* Revert global 3rem right-shift on mobile! */
        margin-top: 0 !important;
        margin-bottom: 1.2rem !important;
    }
    .hero-ctas .btn {
        width: 85% !important; /* Unified button width on mobile for consistency */
        max-width: 300px !important;
        text-align: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }
    
    /* Order 3: Scroll hint (Centered) */
    .scroll-hint {
        order: 3 !important;
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 0 auto 1.2rem !important; /* Spacing below to separate from certifications */
        animation: mobile-pulse 2s ease-in-out infinite !important; /* Premium breathing/pulsating glow */
        left: auto !important;
    }
    
    /* Order 4: 3 Certifications (Centered) */
    .hero-trust {
        order: 4 !important;
        position: relative !important; /* Revert absolute positioning to participate in flex flow! */
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-left: 0 !important; /* Revert global 1rem right-shift on mobile! */
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
        bottom: auto !important; /* Cancel absolute positioning values */
        left: auto !important;
        right: auto !important;
        transform: none !important; /* Cancel global translateY(-65px) mobile lift that was causing overlapping! */
        gap: 15px !important;
        z-index: 15 !important;
    }
    .hero-trust span {
        font-size: 0.75rem !important;
        color: var(--text-dim) !important;
        white-space: nowrap !important;
    }
    
    /* Brand carousel at the absolute bottom */
    .pc-hero-overlay {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 25 !important;
    }
}

@keyframes mobile-pulse {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(0.95);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Small Mobile Sizing & Overflow Prevention */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem !important; /* Optimizes padding for mobile screens */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem !important; /* Maximizes screen real estate on tiny viewports */
    }
    
    .contact-hero .section-title {
        font-size: 1.8rem !important; /* Ensures long title fits on small screens */
    }
    
    .contact-info-panel,
    .contact-form-panel {
        padding: 1.5rem !important; /* Breathing room without spilling */
    }
    
    .info-link {
        font-size: 1rem !important;
        word-break: break-all !important; /* Forces the long email address to break cleanly instead of overflowing */
        overflow-wrap: break-word !important;
    }
}
