/* ========================================
   CW Custom Works - Main Stylesheet
   Mobile-first, performance-optimized
   ======================================== */

/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
:root {
    /* ========================================
       PRIMARY GREEN PALETTE (Olive Green)
       ======================================== */
    --primary-green-50: #f7faf4;
    --primary-green-100: #e8f3db;
    --primary-green-200: #d1e7b7;
    --primary-green-300: #a9d070;
    --primary-green-400: #8bb94a;
    --primary-green-500: #6B8E23; /* Primary brand color */
    --primary-green-600: #556B2F; /* Dark green */
    --primary-green-700: #435822;
    --primary-green-800: #2f3d17;
    --primary-green-900: #1c240e;

    /* Legacy aliases for backwards compatibility */
    --primary-green: var(--primary-green-500);
    --primary-dark: var(--primary-green-600);
    --primary-green-dark: var(--primary-green-600);
    --accent-lime: #9ACD32;
    --accent-olive: #808000;

    /* ========================================
       EARTH TONES (Complementary Palette)
       ======================================== */
    --earth-brown-50: #faf7f4;
    --earth-brown-100: #f0e9df;
    --earth-brown-200: #e0d2be;
    --earth-brown-300: #c8b099;
    --earth-brown-400: #a88c6f;
    --earth-brown-500: #8B7355; /* Warm brown */
    --earth-brown-600: #6f5c46;
    --earth-brown-700: #574638;
    --earth-brown-800: #3d312a;
    --earth-brown-900: #2a211c;

    --earth-tan-50: #fdfcfa;
    --earth-tan-100: #f9f6f1;
    --earth-tan-200: #f1ebe0;
    --earth-tan-300: #e5d9c5;
    --earth-tan-400: #d4c2a3;
    --earth-tan-500: #C4A574; /* Warm tan */
    --earth-tan-600: #a6895f;
    --earth-tan-700: #876e4c;
    --earth-tan-800: #635139;
    --earth-tan-900: #433829;

    --earth-stone-50: #fafaf9;
    --earth-stone-100: #f0f0ef;
    --earth-stone-200: #e2e1df;
    --earth-stone-300: #cecdca;
    --earth-stone-400: #b3b1ad;
    --earth-stone-500: #908E8A; /* Warm gray */
    --earth-stone-600: #75736f;
    --earth-stone-700: #5d5b58;
    --earth-stone-800: #454442;
    --earth-stone-900: #2e2d2c;

    /* ========================================
       TEXT COLORS
       ======================================== */
    --text-primary: #1a1a1a;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --text-white: #ffffff;

    /* ========================================
       BACKGROUND COLORS
       ======================================== */
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f9fafb; /* Alias for bg-gray */
    --bg-warm: #faf8f5;
    --bg-dark: #2F4F2F;
    --bg-earth: var(--earth-tan-50);

    /* ========================================
       BORDER COLORS
       ======================================== */
    --border-light: #e5e7eb;
    --border-color: #e5e7eb; /* Alias for border-light */
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;

    /* ========================================
       SEMANTIC COLORS
       ======================================== */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: var(--primary-green-500);

    /* ========================================
       TYPOGRAPHY - Fluid & Responsive
       ======================================== */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Base Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;

    /* Fluid Typography with clamp() - fallbacks first for older browsers */
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.75rem;
    --text-4xl: 2.125rem;
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
    --section-padding-fallback: 4rem;
    --container-padding-fallback: 1.5rem;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* ========================================
       SPACING SYSTEM
       ======================================== */
    --section-padding: 4rem;
    --container-padding: 1.5rem;
    --container-max-width: 1280px;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;

    /* ========================================
       ADVANCED SHADOW SYSTEM (XLB-inspired)
       ======================================== */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Professional Shadow Collection */
    --shadow-soft: 6px 6px 9px rgba(0, 0, 0, 0.1);
    --shadow-bold: 8px 8px 20px rgba(0, 0, 0, 0.15);
    --shadow-crisp: 6px 6px 0px rgba(107, 142, 35, 0.3); /* Offset shadow using primary green */
    --shadow-deep: 12px 12px 50px rgba(0, 0, 0, 0.2);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* ========================================
       TRANSITIONS & ANIMATIONS
       ======================================== */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* ========================================
       BORDER RADIUS
       ======================================== */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* ========================================
       Z-INDEX SCALE
       ======================================== */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    overflow-x: hidden;
}

/* Responsive images by default */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
    color: white;
}

.window-icon {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    margin: 0 auto 1.5rem;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.window-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
}

.window-cross::before,
.window-cross::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
}

.window-cross::before {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 3px;
}

.window-cross::after {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.loader p {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* ========================================
   Emergency Banner
   ======================================== */
.emergency-banner {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 0.75rem 0;
    position: relative;
    z-index: 100;
    animation: slideDown var(--transition-base);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.emergency-banner.hidden {
    display: none;
}

.emergency-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 14px;
}

.emergency-icon {
    font-size: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.emergency-call {
    color: white;
    text-decoration: none;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.emergency-call:hover {
    background: rgba(255, 255, 255, 0.3);
}

.close-banner {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.close-banner:hover {
    opacity: 1;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
}

.header.scrolled .logo img {
    height: 136px;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    position: relative;
}

.logo img {
    height: 150px;
    width: auto;
    transition: height var(--transition-base);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 60;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-green);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-green);
}

.nav-phone {
    color: var(--primary-green) !important;
    font-weight: 600 !important;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .logo img {
        height: 80px;
    }

    .header.scrolled .logo img {
        height: 60px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        gap: 1.5rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a.active::after {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-green);
    border-color: white;
}

.btn-white:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 16px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
}

.hero-content-frosted {
    position: relative;
    padding: 3rem 3rem;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    background: rgba(15, 23, 42, 0.65) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-content-frosted {
        padding: 2rem 1.5rem;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.badge-icon {
    background: var(--success);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-trust-badges {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-trust-badges .trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-icon {
    font-size: 28px;
}

.trust-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.trust-text strong {
    font-size: 15px;
    font-weight: 600;
}

.trust-text span {
    font-size: 13px;
    opacity: 0.85;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.hero-scroll-indicator span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin: 0 auto;
}

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

/* ========================================
   Sections
   ======================================== */
.section {
    padding: var(--section-padding) 0;
}

.section-gray {
    background: var(--bg-gray);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 700px;
}

.text-center {
    text-align: center;
}

.text-center .section-subtitle {
    margin: 0 auto;
}

.section-cta {
    margin-top: 3rem;
}

/* ========================================
   Problem/Solution Section
   ======================================== */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .two-column-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.problem-card,
.solution-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.problem-card {
    border-left: 4px solid var(--error);
}

.solution-card {
    border-left: 4px solid var(--success);
}

.problem-image-placeholder,
.solution-image-placeholder {
    width: 100%;
    height: 648px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.problem-image-placeholder img,
.solution-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 991px) {
    .problem-image-placeholder,
    .solution-image-placeholder {
        height: 432px;
    }
}

.problem-card h3,
.solution-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.problem-card p,
.solution-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* ========================================
   Services Grid
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    font-size: 48px;
    text-align: center;
    padding: 1.5rem 0 1rem;
}

.service-image-placeholder {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-card:hover .service-image-placeholder img {
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.25rem;
    padding: 0 1.5rem;
    margin: 1rem 0 0.75rem;
    color: var(--text-primary);
}

.service-card p {
    padding: 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-link {
    display: inline-block;
    padding: 0 1.5rem 1.5rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.service-link:hover {
    color: var(--primary-dark);
}

/* ========================================
   Why Choose Us
   ======================================== */
.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.why-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-lime));
}

.why-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.why-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.why-image {
    margin: -2rem -2rem 1.5rem -2rem;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.why-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 300px;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.testimonial-stars {
    color: var(--accent-lime);
    font-size: 18px;
}

.testimonial-text {
    color: var(--text-secondary);
    line-height: 1.7;
    flex-grow: 1;
    font-style: italic;
}

.testimonial-author strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 14px;
}

/* ========================================
   Stats Counter
   ======================================== */
.stats {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: white;
}

.cta-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-card h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.cta-subtext {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 2rem !important;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cta-trust {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: 0.9;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
}

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

@media (min-width: 640px) and (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    }
}

.footer-logo {
    margin-bottom: 1rem;
    max-width: 240px;
    height: auto;
    display: block;
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cert-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 13px;
}

.footer h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: white;
}

.footer-contact p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.footer-tagline {
    opacity: 0.7;
    font-style: italic;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========================================
   Animations & Utilities
   ======================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays for multiple elements */
[data-delay="0"] { transition-delay: 0ms; }
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }

.phone-icon {
    font-size: 18px;
}

/* ========================================
   Responsive Tweaks
   ======================================== */
@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats-grid {
        gap: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

/* ========================================
   Page Hero (Internal Pages)
   ======================================== */
.page-hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
}

.page-hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.page-hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.about-hero {
    background-image: url('../images/about-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 12rem 0 8rem;
    min-height: 60vh;
    margin-top: -100px;
    padding-top: calc(12rem + 100px);
}

.about-hero .page-hero-content {
    margin-top: -20px;
}

.about-hero .page-hero-content h1 {
    margin-bottom: 0.7rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.about-hero .page-hero-content p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .about-hero {
        padding: 8rem 0 6rem;
        min-height: 50vh;
        margin-top: -80px;
        padding-top: calc(8rem + 80px);
    }

    .about-hero .page-hero-content {
        margin-top: -60px !important;
        position: relative;
        top: -30px;
    }
}

/* ========================================
   Service Detail Pages
   ======================================== */
.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 992px) {
    .service-detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .service-detail-grid.reverse {
        direction: rtl;
    }

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

.service-badge {
    display: inline-block;
    background: var(--accent-lime);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.service-badge.emergency-badge {
    background: var(--error);
    animation: pulse 2s ease-in-out infinite;
}

.service-detail-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-intro {
    font-size: 1.125rem;
    color: var(--primary-green);
    font-weight: 500;
    margin-bottom: 2rem;
}

.service-detail-content h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.service-detail-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.service-features {
    background: var(--bg-gray);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.service-features h3 {
    margin-top: 0;
}

.service-features ul {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.service-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.service-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* ========================================
   About Page Styles
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 400px 1fr;
    }
}

.about-image-placeholder {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-stat {
    background: var(--primary-green);
    color: white;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-stat .stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.about-stat .stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.about-content .lead {
    font-size: 1.125rem;
    color: var(--primary-green);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
}

.about-content h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-image-side {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-main-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-credentials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.credential-item {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.credential-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.25rem;
}

.credential-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.story-highlight {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.story-highlight:first-of-type {
    margin-top: 1.5rem;
}

.story-highlight h3 {
    margin-top: 0;
}

.values-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.value-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.value-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.value-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.cert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cert-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.cert-badge-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge-large img {
    max-width: 100%;
    height: auto;
}

.cert-icon {
    font-size: 64px;
}

.cert-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.cert-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.personal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .personal-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.personal-content .lead {
    font-size: 1.125rem;
    color: var(--primary-green);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.personal-image-placeholder {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.personal-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personal-quote {
    background: var(--primary-green);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

.personal-quote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    opacity: 0.9;
}

/* ========================================
   Contact Page Styles
   ======================================== */
.contact-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .contact-options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-option {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.contact-option-icon {
    font-size: 64px;
    margin-bottom: 1rem;
}

.contact-option h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contact-option p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.quote-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.quote-form-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.quote-form-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
}

.quote-form {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

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

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 15px;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--error);
}

.form-help {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 0.5rem;
}

.success-message {
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.form-note {
    margin-top: 1rem;
    font-size: 14px;
    color: var(--text-light);
}

.form-note a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.quote-form-footer {
    background: var(--bg-gray);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.quote-form-footer p {
    font-weight: 600;
    margin-bottom: 1rem;
}

.quote-form-footer ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.service-area-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.service-area-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 1rem;
}

.service-area-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .cities-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.city-item {
    background: var(--bg-white);
    padding: 1rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.service-note {
    font-size: 14px;
    color: var(--text-light);
}

.service-note a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.emergency-cta {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   Image Gallery Lightbox
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: var(--shadow-xl);
}

.lightbox-caption {
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    opacity: 0.9;
}

.lightbox-counter {
    color: white;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
    transition: transform var(--transition-fast);
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: background var(--transition-fast);
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }

    .lightbox-nav {
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* Newsletter Signup */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
}

.footer-newsletter h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-newsletter p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input-group input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 15px;
}

.newsletter-input-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input-group input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-input-group .btn {
        width: 100%;
    }
}
/* ========================================
   ENHANCED COMPONENT SYSTEM (XLB-Inspired)
   Professional, reusable components
   ======================================== */

/* ========================================
   Enhanced Buttons with Hover Effects
   ======================================== */
.btn-enhanced {
    transition: all var(--transition-base);
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-bold);
}

.btn-enhanced:active {
    transform: translateY(0);
}

/* ========================================
   FlipCard Component (3D Card Flip)
   ======================================== */
.flip-card-container {
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-slow);
    transform-style: preserve-3d;
}

.flip-card-container.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.flip-card-front {
    background: white;
    border: 2px solid var(--border-light);
    transition: border-color var(--transition-base);
}

.flip-card-front:hover {
    border-color: var(--primary-green-500);
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-green-500) 0%, var(--primary-green-700) 100%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Flip Card Helper Text */
.flip-card-hint {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--primary-green-500);
    margin-top: 1rem;
    text-align: center;
}

.flip-card-back .flip-card-hint {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Photo Carousel Component
   ======================================== */
.project-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--bg-gray);
    box-shadow: var(--shadow-soft);
}

.carousel-track {
    display: flex;
    transition: transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 100%;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 1000px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .carousel-image {
        height: 600px;
    }
}

/* Carousel Caption with Backdrop Blur */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(107, 142, 35, 0.2);
}

.carousel-caption h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--primary-green-700);
    margin-bottom: 0.25rem;
}

.carousel-caption p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.carousel-nav:hover {
    background: white;
    box-shadow: var(--shadow-bold);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 1rem;
}

.carousel-nav.next {
    right: 1rem;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-green-600);
    stroke-width: 2.5;
}

/* Carousel Dot Navigation */
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
    background: var(--primary-green-500);
    width: 24px;
    border-color: var(--primary-green-500);
}

/* ========================================
   Service Showcase - Side-by-Side Layout
   ======================================== */
.service-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .service-showcase {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    /* Alternate layout - even items reverse */
    .service-showcase:nth-child(even) {
        direction: rtl;
    }

    .service-showcase:nth-child(even) > * {
        direction: ltr;
    }
}

.showcase-content {
    padding: 1rem 0;
}

.showcase-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--primary-green-700);
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .showcase-content h3 {
        font-size: var(--text-3xl);
    }
}

.showcase-content p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.showcase-content .btn {
    margin-top: 0.5rem;
}

/* Showcase Carousel Container with Aspect Ratio */
.showcase-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--bg-gray);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 4 / 3;
    max-height: 400px;
    width: 100%;
    min-width: 0; /* Prevent grid blowout */
}

.showcase-carousel .carousel-track {
    height: 100%;
}

.showcase-carousel .carousel-slide {
    height: 100%;
}

.showcase-carousel .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Smaller nav buttons for showcase carousels */
.showcase-carousel .carousel-nav {
    width: 40px;
    height: 40px;
}

.showcase-carousel .carousel-nav svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Photo Grid Component
   ======================================== */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.photo-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.photo-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   Projects Grid Component
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-bold);
    text-decoration: none;
}

.project-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-gray);
}

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

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(107, 142, 35, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-card-content {
    padding: 1.5rem;
}

.project-card-content h3 {
    color: var(--primary-green-700);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.project-card-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-green-600);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

.project-card:hover .project-card-link {
    color: var(--primary-green-500);
    transform: translateX(4px);
}

/* ========================================
   Full Width Project Carousel
   ======================================== */
.project-carousel-fullwidth {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.project-carousel-fullwidth .carousel-image {
    width: 100%;
    height: auto;
    min-height: 500px;
    max-height: 700px;
    object-fit: contain;
    background: var(--bg-gray);
}

@media (max-width: 768px) {
    .project-carousel-fullwidth .carousel-image {
        min-height: 300px;
        max-height: 500px;
    }
}

.project-details {
    background: var(--bg-warm);
    padding: 3rem 0;
}

.project-details-content {
    max-width: 800px;
    margin: 0 auto;
}

.project-details h2 {
    font-size: var(--text-3xl);
    color: var(--primary-green-700);
    margin-bottom: 1rem;
}

.project-details p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ========================================
   Services Carousel
   ======================================== */
.services-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.services-carousel {
    width: 100%;
}

.service-card-carousel {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-image-large {
    width: 100%;
    height: 700px;
    overflow: hidden;
    background: var(--bg-gray);
}

.service-image-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-gray);
}

.service-content {
    padding: 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-content .service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-content h3 {
    font-size: var(--text-2xl);
    color: var(--primary-green-700);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-content p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.service-content .service-link {
    margin-top: auto;
}

@media (max-width: 768px) {
    .service-image-large {
        height: 500px;
    }

    .service-content {
        padding: 1.5rem;
    }

    .service-content h3 {
        font-size: var(--text-xl);
    }

    .service-content p {
        font-size: var(--text-base);
    }
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.project-stat {
    text-align: center;
}

.project-stat-value {
    display: block;
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--primary-green-600);
    margin-bottom: 0.5rem;
}

.project-stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Section Component Utilities
   ======================================== */
.section {
    padding: var(--section-padding) 0;
}

.section-sm {
    padding: calc(var(--section-padding) * 0.5) 0;
}

.section-lg {
    padding: calc(var(--section-padding) * 1.5) 0;
}

/* Section Backgrounds */
.section-white {
    background: var(--bg-white);
}

.section-gray {
    background: var(--bg-gray);
}

.section-warm {
    background: var(--bg-warm);
}

.section-earth {
    background: var(--bg-earth);
}

.section-green {
    background: var(--primary-green-500);
    color: white;
}

.section-dark {
    background: var(--primary-green-900);
    color: white;
}

.section-gradient {
    background: linear-gradient(135deg, var(--primary-green-500) 0%, var(--primary-green-700) 100%);
    color: white;
}

/* ========================================
   Enhanced Card Components
   ======================================== */
.card-enhanced {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 2px solid var(--border-light);
    transition: all var(--transition-base);
}

.card-enhanced:hover {
    border-color: var(--primary-green-500);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.card-earth {
    background: linear-gradient(135deg, var(--earth-tan-50) 0%, white 100%);
}

.card-crisp {
    box-shadow: var(--shadow-crisp);
}

.card-crisp:hover {
    box-shadow: var(--shadow-bold);
    transform: translate(-2px, -2px);
}

/* ========================================
   Backdrop Blur Utilities
   ======================================== */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ========================================
   Scroll Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* Stagger animations for lists */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Enhanced Typography Utilities
   ======================================== */
.text-fluid-lg {
    font-size: var(--text-lg);
}

.text-fluid-xl {
    font-size: var(--text-xl);
}

.text-fluid-2xl {
    font-size: var(--text-2xl);
}

.text-fluid-3xl {
    font-size: var(--text-3xl);
}

.text-fluid-4xl {
    font-size: var(--text-4xl);
}

.text-fluid-5xl {
    font---size: var(--text-5xl);
}

/* ========================================
   Gradient Text Effect
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-green-500) 0%, var(--primary-green-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-earth-gradient {
    background: linear-gradient(135deg, var(--earth-brown-500) 0%, var(--earth-tan-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Parallax Effect Support
   ======================================== */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    /* Disable parallax on mobile for performance */
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ========================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   Thorough mobile-first responsive design
   ======================================== */

/* Mobile Base - Under 640px */
@media (max-width: 640px) {
    /* ========================================
       Global Mobile Adjustments
       ======================================== */
    :root {
        --section-padding: 2.5rem;
        --container-padding: 1rem;
    }

    body {
        font-size: 15px;
    }

    .container {
        padding: 0 1rem;
    }

    /* ========================================
       Hero Section Mobile
       ======================================== */
    .hero {
        min-height: 85vh;
        min-height: 85dvh; /* Dynamic viewport height for mobile browsers */
    }

    .hero-content-frosted {
        padding: 1.5rem 1rem !important;
        max-width: 100% !important;
    }

    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        justify-content: center;
    }

    /* Emergency banner mobile */
    .hero-emergency-banner {
        padding: 0.75rem !important;
        margin-top: 1rem !important;
    }

    .hero-emergency-banner span {
        font-size: 0.9rem !important;
        display: block;
        text-align: center;
        line-height: 1.4;
    }

    /* Trust badges mobile - stack vertically */
    .hero-trust-badges {
        flex-direction: column;
        gap: 0.75rem !important;
        align-items: center;
        margin-top: 1rem !important;
    }

    .trust-badge {
        background: rgba(255, 255, 255, 0.1);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .trust-icon {
        font-size: 24px;
    }

    .trust-text strong {
        font-size: 14px;
    }

    .trust-text span {
        font-size: 12px;
    }

    /* ========================================
       Problem Section (Sound Familiar) Mobile
       ======================================== */
    .problem-section .section-title {
        font-size: 1.5rem;
    }

    .problem-grid {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .problem-card {
        padding: 1.25rem !important;
    }

    .problem-card h3 {
        font-size: 1.15rem !important;
        line-height: 1.3;
        margin-bottom: 0.5rem !important;
    }

    .problem-card p {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }

    .problem-section .text-center p {
        font-size: 1rem !important;
        margin-top: 1.5rem !important;
        padding: 0 0.5rem;
    }

    /* ========================================
       Guide Section Mobile
       ======================================== */
    .guide-section .two-column-grid {
        gap: 1.5rem;
    }

    .guide-image {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .guide-image img {
        height: auto !important;
        width: 100%;
    }

    .guide-content .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .guide-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .guide-content ul {
        margin: 1rem 0 !important;
    }

    .guide-content ul li {
        padding: 0.5rem 0 !important;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .guide-content ul li span {
        margin-right: 0.5rem !important;
        font-size: 0.85rem;
    }

    /* ========================================
       Services Carousel Mobile
       ======================================== */
    .services-overview .section-title {
        font-size: 1.5rem;
    }

    .service-image-large {
        height: 300px !important;
    }

    .service-content {
        padding: 1.25rem !important;
    }

    .service-content .service-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .service-content h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }

    .service-content p {
        font-size: 0.9rem !important;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .carousel-nav {
        width: 36px !important;
        height: 36px !important;
    }

    .carousel-nav svg {
        width: 18px !important;
        height: 18px !important;
    }

    .carousel-nav.prev {
        left: 0.5rem !important;
    }

    .carousel-nav.next {
        right: 0.5rem !important;
    }

    /* ========================================
       Plan Section Mobile
       ======================================== */
    .plan-section .section-title {
        font-size: 1.5rem;
    }

    .plan-grid {
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .plan-step {
        padding: 1.5rem !important;
    }

    .plan-step > div:first-child {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .plan-step h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .plan-step p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }

    /* ========================================
       Emergency Section Mobile
       ======================================== */
    .emergency-section {
        padding: 2.5rem 0 !important;
    }

    .emergency-section .two-column-grid {
        gap: 2rem;
    }

    .emergency-section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3;
    }

    .emergency-section > .container > .two-column-grid > div:first-child p {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
    }

    .emergency-section ul {
        margin: 1rem 0 !important;
    }

    .emergency-section ul li {
        padding: 0.4rem 0 !important;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .emergency-section ul li span {
        margin-right: 0.75rem !important;
    }

    .emergency-section .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .emergency-image img {
        border-radius: 8px !important;
        max-height: 250px;
        object-fit: cover;
    }

    /* ========================================
       Stakes Table Mobile
       ======================================== */
    .stakes-section .section-title {
        font-size: 1.5rem;
    }

    .stakes-table {
        margin: 1.5rem auto !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stakes-table table {
        min-width: 100%;
    }

    .stakes-table th {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
    }

    .stakes-table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
    }

    .stakes-table td strong {
        font-size: 0.85rem;
    }

    .stakes-section .text-center p {
        font-size: 0.95rem !important;
        padding: 0 0.5rem;
    }

    /* ========================================
       Testimonials Mobile
       ======================================== */
    .testimonials .section-title {
        font-size: 1.5rem;
    }

    .testimonials-grid {
        gap: 1rem;
    }

    .testimonial-card {
        padding: 1.25rem;
    }

    .testimonial-stars {
        font-size: 14px;
    }

    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .testimonial-author strong {
        font-size: 0.9rem;
    }

    .testimonial-author span {
        font-size: 12px;
    }

    /* ========================================
       Stats Section Mobile
       ======================================== */
    .stats {
        padding: 2.5rem 0;
    }

    .stats-grid {
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    .stat-label {
        font-size: 11px !important;
        letter-spacing: 0.5px;
    }

    /* ========================================
       CTA Section Mobile
       ======================================== */
    .cta-section {
        padding: 2.5rem 0;
    }

    .cta-card h2 {
        font-size: 1.35rem !important;
        line-height: 1.3;
        padding: 0 0.5rem;
    }

    .cta-card p {
        font-size: 0.95rem;
    }

    .cta-card > div {
        padding: 1rem !important;
        margin: 1.5rem 0 !important;
    }

    .cta-card > div p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .cta-trust {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 13px;
    }

    /* ========================================
       Sticky CTA Mobile
       ======================================== */
    .sticky-cta {
        padding: 0.5rem 0.75rem !important;
    }

    .sticky-cta .container {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .sticky-cta .container > div:first-child {
        display: none; /* Hide text on very small screens */
    }

    .sticky-cta .container > div:last-child {
        width: 100%;
        justify-content: center;
    }

    .sticky-cta a.btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    /* ========================================
       Footer Mobile
       ======================================== */
    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-logo {
        max-width: 180px;
    }

    .footer h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-newsletter {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .footer-newsletter h4 {
        font-size: 1rem;
    }

    .footer-newsletter p {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    /* ========================================
       Back to Top - Position above sticky CTA
       ======================================== */
    .back-to-top {
        bottom: 5rem; /* Above sticky CTA */
        right: 1rem;
        width: 44px;
        height: 44px;
    }

    /* ========================================
       Button Touch Targets
       ======================================== */
    .btn {
        min-height: 48px;
        min-width: 48px;
        padding: 0.875rem 1.25rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .btn-secondary {
        padding: 0.75rem 1.25rem;
    }

    /* ========================================
       Section Spacing
       ======================================== */
    .section {
        padding: 2.5rem 0;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-cta {
        margin-top: 2rem;
    }

    /* ========================================
       Two Column Grid - Stack on mobile
       ======================================== */
    .two-column-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

/* Tablet adjustments - 641px to 768px */
@media (min-width: 641px) and (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-trust-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem !important;
    }

    .trust-badge {
        width: auto;
    }

    .problem-card h3 {
        font-size: 1.25rem !important;
    }

    .guide-image {
        grid-template-columns: 1fr 1fr !important;
    }

    .guide-image img {
        height: auto !important;
    }

    .service-image-large {
        height: 400px !important;
    }

    .emergency-section h2 {
        font-size: 1.75rem !important;
    }

    .sticky-cta .container > div:first-child {
        display: block;
    }

    .sticky-cta .container > div:last-child {
        width: auto;
    }
}

/* Medium screens - 769px to 991px */
@media (min-width: 769px) and (max-width: 991px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-trust-badges {
        gap: 1.5rem;
    }

    .guide-image img {
        height: auto !important;
    }

    .service-image-large {
        height: 500px;
    }
}

/* ========================================
   iOS Safari Specific Fixes
   ======================================== */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari's 100vh issue */
    .hero {
        min-height: -webkit-fill-available;
    }

    /* Prevent rubber-band scrolling issues */
    .sticky-cta {
        -webkit-transform: translateY(100%);
        transform: translateY(100%);
    }

    .sticky-cta.visible {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* ========================================
   Safe Area Insets for notched devices
   ======================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .sticky-cta {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .back-to-top {
        bottom: calc(5rem + env(safe-area-inset-bottom));
    }

    /* Mobile nav safe area */
    @media (max-width: 768px) {
        .nav-menu {
            padding-bottom: calc(2rem + env(safe-area-inset-bottom));
            padding-left: calc(2rem + env(safe-area-inset-left));
            padding-right: calc(2rem + env(safe-area-inset-right));
        }
    }
}

/* ========================================
   Reduced Motion for accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sticky-cta {
        transition: none;
    }

    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   High contrast mode support
   ======================================== */
@media (prefers-contrast: high) {
    .problem-card {
        border-left-width: 6px !important;
    }

    .btn-primary {
        border: 2px solid white;
    }

    .sticky-cta a.btn {
        border: 2px solid white;
    }
}

/* ========================================
   3D Transform Utilities
   ======================================== */
.preserve-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

/* ========================================
   Hover Scale Effects
   ======================================== */
.hover-scale {
    transition: transform var(--transition-base);
}

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

.hover-scale-sm:hover {
    transform: scale(1.02);
}

.hover-scale-lg:hover {
    transform: scale(1.1);
}

/* ========================================
   Professional Image Overlays
   ======================================== */
.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(47, 79, 47, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.image-overlay:hover::after {
    opacity: 1;
}

.image-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: white;
    transform: translateY(100%);
    transition: transform var(--transition-base);
    z-index: 10;
}

.image-overlay:hover .image-overlay-content {
    transform: translateY(0);
}

/* ========================================
   Utility: Smooth Transitions
   ======================================== */
.transition-all {
    transition: all var(--transition-base);
}

.transition-fast {
    transition: all var(--transition-fast);
}

.transition-slow {
    transition: all var(--transition-slow);
}

.transition-bounce {
    transition: all var(--transition-bounce);
}

/* ========================================
   Browser Compatibility - Safari & Chrome
   ======================================== */

/* clamp() support - override fallbacks for modern browsers */
@supports (font-size: clamp(1rem, 2vw, 3rem)) {
    :root {
        --text-lg: clamp(1.125rem, 0.9688rem + 0.5vw, 1.25rem);
        --text-xl: clamp(1.25rem, 0.9375rem + 1vw, 1.5rem);
        --text-2xl: clamp(1.5rem, 1.1875rem + 1vw, 1.75rem);
        --text-3xl: clamp(1.75rem, 1.2813rem + 1.5vw, 2.125rem);
        --text-4xl: clamp(2.125rem, 0.8125rem + 3vw, 2.5rem);
        --text-5xl: clamp(2.5rem, 1.0313rem + 3.5vw, 3rem);
        --text-6xl: clamp(3rem, 1.0938rem + 4.5vw, 3.625rem);
        --section-padding: clamp(3rem, 8vw, 6rem);
        --container-padding: clamp(1rem, 4vw, 2rem);
    }
}

/* Flexbox gap fallbacks for Safari < 14.1 */
@supports not (gap: 1rem) {
    .hero-cta > * + * {
        margin-left: 1rem;
    }

    .hero-trust-badges > * + * {
        margin-left: 2rem;
    }

    .hero-badge > * + * {
        margin-left: 0.5rem;
    }

    .trust-badge > * + * {
        margin-left: 0.75rem;
    }

    .trust-text > * + * {
        margin-top: 0.15rem;
    }

    .nav-menu > * + * {
        margin-left: 2rem;
    }

    .footer-certifications > * + * {
        margin-left: 0.5rem;
        margin-top: 0.5rem;
    }

    .btn-group > * + * {
        margin-left: 1rem;
    }

    .services-grid > * + * {
        margin-top: 2rem;
    }

    .why-grid > * + * {
        margin-top: 2rem;
    }

    .testimonials-grid > * + * {
        margin-top: 2rem;
    }

    .stats-grid > * + * {
        margin-top: 2rem;
    }

    .two-column-grid > * + * {
        margin-top: 3rem;
    }

    .cert-grid > * + * {
        margin-top: 2rem;
    }
}

/* aspect-ratio fallbacks for Safari < 15 */
@supports not (aspect-ratio: 4 / 3) {
    .project-card-image {
        padding-top: 75%; /* 4:3 ratio */
        position: relative;
        height: 0;
        overflow: hidden;
    }

    .project-card-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .gallery-image {
        padding-top: 75%;
        position: relative;
        height: 0;
        overflow: hidden;
    }

    .gallery-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Touch action for iOS Safari - eliminates 300ms tap delay */
a,
button,
input,
select,
textarea,
.btn,
.nav-link,
.mobile-menu-toggle,
.service-card,
.project-card,
.faq-item {
    touch-action: manipulation;
}

/* Ensure clickable elements have proper touch targets (44x44px minimum) */
@media (pointer: coarse) {
    .nav-link,
    .btn,
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for Safari's handling of 100vh on mobile */
    .hero {
        min-height: -webkit-fill-available;
    }

    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
    }
}
