/* Modern Subpage Design */
:root {
    --primary: #0a4a6d;
    /* Matched to Header Navy */
    --secondary: #0d8b8b;
    --accent: #ff7a45;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --success: #10b981;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

/* Base Overrides */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent);
    color: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #ff5c1f;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #0a6d6d;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 74, 109, 0.9), rgba(10, 74, 109, 0.95)), url('../images/water_extraction.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.badge {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.badge i {
    color: var(--accent);
    font-size: 1.5rem;
}

/* Local Services */
.local-services {
    padding: 80px 0;
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--gray);
}

.local-intro {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 60px;
}

.local-intro h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.local-intro p {
    margin-bottom: 20px;
    color: var(--gray);
}

/* Service Locations */
.service-locations {
    padding: 80px 0;
    background-color: white;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.location-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.location-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.location-header {
    background-color: var(--primary);
    color: white;
    padding: 20px;
}

.location-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.location-content {
    padding: 25px;
}

.location-content p {
    margin-bottom: 15px;
    color: var(--gray);
}

.location-subareas {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.subareas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.subarea-tag {
    background-color: var(--light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark);
}

.location-services {
    margin-top: 15px;
}

/* Location Cards - Grid Layout */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.location-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.location-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.location-card p {
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.location-card a {
    background-color: #ff7f50;
    /* Matching screenshot orange */
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.location-card a:hover {
    background-color: #e66a3c;
    /* Slightly darker orange on hover */
    transform: translateY(-2px);
}


/* Map Section */
.map-section {
    padding: 80px 0;
    background-color: var(--light);
}

.map-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.map-text h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.map-text p {
    color: var(--gray);
    margin-bottom: 20px;
}

#serviceMap {
    height: 400px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid #ddd;
}

/* Additional Areas */
.additional-areas {
    padding: 80px 0;
    background-color: white;
}

.areas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.area-item {
    background-color: var(--light);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.area-item:hover {
    background-color: #e2e8f0;
    transform: translateY(-5px);
}

.area-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.area-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Emergency CTA */
.emergency-cta {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.emergency-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.emergency-cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.phone-number {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 20px 0;
    color: var(--accent);
    letter-spacing: 2px;
}

.cta-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.cta-badge {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.3rem;
    }

    .phone-number {
        font-size: 2.2rem;
    }

    .map-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .locations-grid {
        grid-template-columns: 1fr;
    }

    .map-text {
        order: 2;
    }

    #serviceMap {
        order: 1;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 70px 0;
    }
}

/* Service Card Refactor */
.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    text-align: left;
    /* Reset from possible center alignment */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-header {
    background-color: var(--primary);
    /* Navy Blue Header */
    padding: 30px 20px;
    text-align: center;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-header i {
    font-size: 2.5rem;
    color: white;
}

.service-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.service-body h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.4rem;
}

.service-body p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.service-body .btn {
    align-self: flex-start;
    background-color: #ff7f50;
    /* Orange Button */
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    margin-top: auto;
}

.service-body .btn:hover {
    background-color: #e66a3c;
}


/* Hero Slider Styles */
/* Video Background Styles */
.hero {
    position: relative;
    overflow: hidden;
    /* Ensure hero has height to show video */
    min-height: 600px;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-foreground,
.video-background iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Aspect Ratio Fix for YouTube specific */
@media (min-aspect-ratio: 16/9) {
    .video-foreground {
        height: 300%;
        top: -100%;
    }
}

@media (max-aspect-ratio: 16/9) {
    .video-foreground {
        width: 300%;
        left: -100%;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(13, 59, 102, 0.7); Removed per user request to make video sharp */
    background: transparent;
    z-index: 1;
}

/* Ensure content sits above video */
.hero-content {
    position: relative;
    z-index: 2;
}


/* Rebuilt Hero Styles */
#home-hero {
    /* Fallback color (black) instead of blue gradient */
    background: #000;
    position: relative;
    /* Ensure z-index context */
    z-index: 1;
}

/* Ensure video background stays behind */
#home-hero .video-background {
    z-index: -1;
}

/* Ensure content stays on top */
#home-hero .hero-content {
    z-index: 2;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Styles for Local Video Tag */
#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
}


/* 
   NUCLEAR FIX FOR MOBILE MENU
   Overrides all previous header styles to ensure text is visible on mobile 
*/
@media (max-width: 1100px) {

    /* Force Container to be White */
    body .header .main-nav {
        background-color: white !important;
    }

    /* Force Links to be Navy Blue */
    body .header .main-nav a,
    body .header .main-nav .sub a,
    body .header:not(.scrolled) .main-nav a,
    body .header:not(.scrolled) .main-nav .sub a {
        color: #003366 !important;
        /* Navy Blue */
        text-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Force Hover State */
    body .header .main-nav a:hover,
    body .header .main-nav .sub a:hover {
        color: #ff7f50 !important;
        /* Orange on hover */
        background-color: #f0f0f0 !important;
    }
}