/*
Theme Name: America HVAC Child
Template: astra
Version: 1.0.0
Description: Child theme for America Heating & Air Conditioning with Premium HVAC Design System
*/

:root {
    /* Brand Colors */
    --color-primary: #0056b3;
    /* Reliable Blue */
    --color-primary-dark: #003d80;
    --color-secondary: #e31e24;
    /* Action Red */
    --color-accent: #00a8e8;
    /* Cool Air Blue */

    /* Neutrals */
    --color-text-main: #1f2937;
    --color-text-light: #6b7280;
    --color-bg-light: #f3f4f6;
    --color-white: #ffffff;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* Base Typography Enhancements */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary-dark);
}

/* =========================================
   Utility Classes for Elementor
   ========================================= */

/* Glassmorphism Card (Use class: glass-card) */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

/* Gradient Text (Use class: text-gradient) */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Primary Button Override (Use class: btn-primary) */
.btn-primary,
.elementor-button {
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark)) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease !important;
}

.btn-primary:hover,
.elementor-button:hover {
    filter: brightness(110%);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Hero Section Overlay */
.hero-overlay {
    position: relative;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.service-card:hover {
    border-top-color: var(--color-secondary);
    box-shadow: var(--shadow-lg);
}

/* Testimonial Box */
.testimonial-box {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent);
    position: relative;
}

.testimonial-box::before {
    content: '“';
    font-size: 5rem;
    color: var(--color-bg-light);
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: serif;
}

/* =========================================
   Layout Fixes (Moved from Inline)
   ========================================= */

.trust-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

/* =========================================
   SPLIT HERO DESIGN - Modern Industry Standard
   Text on light background (left), Image accent (right)
   ========================================= */
.hero-bg {
    display: flex;
    flex-direction: column;
    /* Stack content vertically */
    align-items: flex-start;
    justify-content: center;
    min-height: 450px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    position: relative;
    padding: 60px 50px;
    padding-right: 55%;
    /* Leave space for the image on the right */
}

/* Right Side - Image Area */
.hero-bg::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: url('../../uploads/2024/12/home_picture.jpg');
    background-size: cover;
    background-position: center;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

/* Gradient overlay on image for subtle blend */
.hero-bg::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(248, 250, 252, 1) 0%, rgba(248, 250, 252, 0) 40%);
    z-index: 2;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

/* All direct children of hero get proper z-index */
.hero-bg>* {
    position: relative;
    z-index: 3;
}

/* Hero Title - Blue Brand Color */
.hero-bg h1,
.hero-bg .hero-title,
.hero-bg .elementor-heading-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-primary-dark, #1e3a5f) !important;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 100%;
}

/* Subtitle */
.hero-bg .subtitle,
.hero-bg p {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-text-light, #64748b) !important;
    -webkit-text-fill-color: var(--color-text-light, #64748b) !important;
    text-shadow: none;
    opacity: 1;
    margin-bottom: 25px;
    max-width: 450px;
    background: none;
}

/* CTA Button - Prominent */
.hero-bg .cta-button,
.hero-bg .btn-primary,
.hero-bg a.btn-primary,
.hero-bg .elementor-button {
    display: inline-block !important;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    padding: 14px 35px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 30px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.hero-bg .cta-button:hover,
.hero-bg .btn-primary:hover,
.hero-bg .elementor-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 86, 179, 0.4);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .hero-bg {
        padding: 50px 30px;
        padding-right: 30px;
        /* Remove right padding on mobile */
        text-align: center;
        align-items: center;
        min-height: auto;
    }

    .hero-bg::after {
        position: relative;
        width: 100%;
        height: 250px;
        clip-path: none;
        margin-top: 30px;
    }

    .hero-bg::before {
        display: none;
    }

    .hero-bg h1 {
        font-size: 2rem;
    }

    .hero-bg .subtitle,
    .hero-bg p {
        max-width: 100%;
    }
}

/* Page Specific Hero Images */
.about-hero-split::after {
    background-image: url('../../uploads/about/about-hero-van.jpg');
}

.services-hero-split::after {
    background-image: url('../../uploads/services/candidate-1.jpg');
    background-position: center;
}

/* =========================================
   Header Redesign
   ========================================= */

/* Main Header Bar */
.site-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.1);
}

/* Menu Items */
.main-header-menu .menu-item a {
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-main) !important;
    transition: color 0.3s ease;
}

.main-header-menu .menu-item a:hover {
    color: var(--color-primary) !important;
}

/* Ocultar banderas de Polylang en el menú, dejar solo texto */
.main-header-menu .menu-item.lang-item img,
.ast-builder-menu .menu-item.lang-item img {
    display: none !important;
}

/* Button in Header (Call Button) - Friendly Redesign */
.ast-header-button-1 .ast-custom-button-link .ast-custom-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
    border-radius: 50px !important;
    /* Pill shape is friendlier */
    color: white !important;
    font-weight: 700 !important;
    padding: 10px 25px !important;
    text-transform: uppercase;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    /* Soft blue shadow */
    transition: all 0.3s ease !important;
    border: none !important;
}

.ast-header-button-1 .ast-custom-button-link .ast-custom-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
    filter: brightness(110%);
}

/* Make Logo Area Cleaner */
.site-branding {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo - Larger and Better Proportioned */
.custom-logo {
    max-height: 70px !important;
    /* Increased from 60px */
    min-height: 55px;
    width: auto !important;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.03);
}

/* Site Title (Company Name) - More Prominent */
.site-title,
.ast-site-title-wrap .site-title,
.ast-site-identity .site-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--color-primary-dark, #1e3a5f) !important;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 0;
}

.site-title a,
.ast-site-title-wrap .site-title a {
    color: inherit !important;
    text-decoration: none;
}

/* Make the header overall more spacious */
.ast-primary-header-bar {
    padding: 8px 0;
}

/* Fix for stray paragraph tags in the trust bar */
.trust-bar>p {
    display: none !important;
}

/* Fix for Service Area Map display */
.elementor-widget-google_maps .elementor-widget-container,
.elementor-widget-google_maps iframe {
    min-height: 450px !important;
    height: 100% !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
}

/* =========================================
   Custom Contact Page Styles
   ========================================= */

.custom-contact-wrapper {
    padding: 60px 0;
    width: 100%;
    /* Ensure background spans if possible, though theme might constrain it */
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.contact-hero {
    text-align: center;
    margin-bottom: 50px;
}

.contact-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.contact-hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

/* Updated Layout for wider map and better spacing */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Made map column wider (was 1.5fr) */
    gap: 40px;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Card Padding Updates */
.contact-details.glass-card,
.service-area-section.glass-card {
    padding: 40px;
    /* Increased from default 2rem/32px to 40px for more breathing room */
}

/* Added specific padding for the interior elements if needed */
.contact-details h3,
.service-area-section h3 {
    margin-bottom: 30px;
    /* More space below headings */
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    /* Increased separation */
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-item .icon {
    font-size: 1.5rem;
    margin-right: 20px;
    /* More space icon-text */
    background: #e0f2fe;
    padding: 12px;
    border-radius: 50%;
    line-height: 1;
}

.contact-item .details label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-text-light);
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-item .details p,
.contact-item .details a {
    font-size: 1.15rem;
    /* Slightly larger text */
    color: var(--color-text-main);
    font-weight: 500;
    margin: 0;
    text-decoration: none;
}

.contact-item .details a:hover {
    color: var(--color-primary);
}

.map-frame-container iframe {
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Ensure it fills the wider container */
    min-height: 500px;
    /* Taller map */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    /* More edge padding */
    width: 100%;
}

/* =========================================
   Reviews Page Styles
   ========================================= */

.reviews-page-wrapper {
    padding: 60px 0;
    min-height: 80vh;
}

.reviews-hero {
    text-align: center;
    margin-bottom: 60px;
}

.reviews-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.reviews-hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background: white;
    /* Fallback */
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-initial {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 15px;
}

.reviewer-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.review-source {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.star-rating {
    color: #fbbf24;
    /* Star Yellow */
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.review-content {
    color: var(--color-text-main);
    font-size: 1rem;
    line-height: 1.6;
}

.no-reviews {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* =========================================
   Projects Page Styles
   ========================================= */

.custom-projects-wrapper {
    padding: 60px 0;
    width: 100%;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

.projects-hero {
    text-align: center;
    margin-bottom: 50px;
}

.projects-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.projects-hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.projects-intro {
    text-align: center;
    padding: 40px;
    margin-bottom: 50px;
}

.projects-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.projects-intro p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Projects Gallery Grid */
.projects-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .projects-gallery {
        grid-template-columns: 1fr;
    }
}

/* Project Card */
.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.view-project-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.5);
}

.view-project-btn .icon {
    font-size: 1.2rem;
}

.project-info {
    padding: 25px;
}

.project-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.project-info p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Projects CTA */
.projects-cta {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
}

.projects-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.projects-cta p {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 86, 179, 0.5);
    filter: brightness(110%);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#lightboxImage {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    padding: 30px;
    background: white;
}

.lightbox-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.lightbox-info p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .projects-hero h1 {
        font-size: 2.5rem;
    }

    .projects-intro h2 {
        font-size: 1.5rem;
    }

    .projects-cta h2 {
        font-size: 1.8rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    .lightbox-info {
        padding: 20px;
    }

    .lightbox-info h3 {
        font-size: 1.3rem;
    }
}

/* ... existing code ... */

/* =========================================
   AUDIT FIXES: Header & Contrast   
   ========================================= */

/* 1. Header Layout Fixes - Prevent Wrapping */
@media (min-width: 921px) {
    .site-header .ast-builder-grid-row {
        flex-wrap: nowrap !important;
        gap: 15px;
        /* Reduce gap between logo and menu */
    }

    .main-header-menu .menu-item a {
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 0.95rem !important;
        /* Slightly smaller for better fit */
    }

    .site-branding {
        flex-shrink: 0;
        margin-right: 0 !important;
    }

    /* Adjust button size in header - Increase for "Call" visibility */
    .ast-header-button-1 .ast-custom-button-link .ast-custom-button {
        padding: 10px 22px !important;
        /* Larger padding */
        font-size: 1.1rem !important;
        /* Larger font */
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    /* "Se Habla Español" Badge */
    .ast-header-button-1 .ast-custom-button-link .ast-custom-button::after {
        content: " | Se Habla Español";
        font-size: 0.9rem;
        font-weight: 400;
        opacity: 0.9;
        margin-left: 5px;
    }
}

/* Hide Default "Home" Title on Homepage */
.home .entry-header {
    display: none !important;
}

/* 2. Global Hero Contrast Improvements */

/* Text Shadow for text over images */
.has-background-overlay .elementor-heading-title,
.hero-bg h1,
.hero-bg h2,
.hero-bg .elementor-heading-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    /* Stronger shadow */
}

/* Ensure Logo is visible */
.custom-logo {
    max-height: 60px !important;
    width: auto;
}

/* =========================================
   UX IMPROVEMENT: High Contrast Hero Headers
   Solves "Blue text lost on grey background" issue
   About Page Custom Timeline & Story
   ========================================= */
.services-hero-section .text-gradient,
.about-hero-section .text-gradient,
.elementor-section.has-background-overlay h1.text-gradient {
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.85) !important;
}

/* Hero Background Updates (Lighter Overlay) */
.services-hero-section {
    position: relative;
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../../uploads/2024/12/attic-ductwork.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-hero-overlay {
    text-align: center;
    color: white;
    z-index: 2;
}

.services-hero-section h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.services-hero-section .subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Fix for Home Page Banner Darkness (Elementor Overlay Override) */
.home .elementor-background-overlay,
.home .hero-bg .elementor-background-overlay {
    background-color: rgba(0, 0, 0, 0.35) !important;
    /* Lighter overlay */
    opacity: 1 !important;
    /* Force visibility of our lighter color */
}


/* Services Introduction */
.services-intro {
    text-align: center;
    padding: 40px;
    margin-bottom: 60px;
}

.services-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

.services-intro p {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Card Detailed */
.service-card-detailed {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.service-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.service-icon-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-icon-large {
    font-size: 2.5rem;
}

.service-content {
    padding: 30px;
}

.service-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.service-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.service-features li {
    padding: 10px 0;
    color: var(--color-text-main);
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: color 0.3s ease;
}

.service-features li:last-child {
    border-bottom: none;
}

.service-features li:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 50px;
    margin-bottom: 60px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.03) 0%, rgba(0, 168, 232, 0.03) 100%);
}

.why-choose-us h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--color-primary-dark);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 20px;
}

.benefit-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.benefit-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.benefit-item p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Services CTA */
.services-cta {
    text-align: center;
    padding: 60px 50px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
}

.services-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.services-cta p {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 35px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 86, 179, 0.5);
    filter: brightness(110%);
}

.cta-button.secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button.secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 86, 179, 0.3);
}

/* Responsive Adjustments for Services */
@media (max-width: 768px) {
    .services-hero-section {
        height: 300px;
    }

    .services-hero-section h1 {
        font-size: 2.5rem;
    }

    .services-hero-section .subtitle {
        font-size: 1.1rem;
    }

    .services-intro h2 {
        font-size: 1.8rem;
    }

    .services-intro p {
        font-size: 1rem;
    }

    .service-content h3 {
        font-size: 1.5rem;
    }

    .why-choose-us {
        padding: 30px 20px;
    }

    .why-choose-us h2 {
        font-size: 1.8rem;
    }

    .services-cta {
        padding: 40px 20px;
    }

    .services-cta h2 {
        font-size: 2rem;
    }

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

    .cta-button {
        width: 100%;
    }
}

/* =========================================
   About Page Styles
   ========================================= */

.custom-about-wrapper {
    width: 100%;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

/* About Hero Section */
.about-hero-section {
    position: relative;
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../../uploads/about/about-hero-van.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-hero-overlay {
    text-align: center;
    color: white;
    z-index: 2;
}

.about-hero-section h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.about-hero-section .subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* About Introduction */
.about-intro {
    text-align: center;
    padding: 50px;
    margin-bottom: 60px;
}

.about-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

.about-intro p {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 900px;
    margin: 0 auto 20px;
    line-height: 1.8;
}

.about-intro strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* Timeline Section */
.timeline-section {
    padding: 50px;
    margin-bottom: 60px;
}

.timeline-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--color-primary-dark);
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Vertical Line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    margin-bottom: 50px;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-marker {
    grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 3;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-marker {
    grid-column: 2;
}

.timeline-marker {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    z-index: 2;
    position: relative;
}

.timeline-icon {
    font-size: 2.5rem;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.timeline-content p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* Story Section */
.story-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.story-content {
    padding: 50px;
}

.story-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

.story-content p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.story-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.highlight-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.highlight-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.highlight-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.story-images {
    display: flex;
    align-items: center;
}

.story-image-grid {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.story-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-float);
}

/* Values Section */
.values-section {
    padding: 50px;
    margin-bottom: 60px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.03) 0%, rgba(0, 168, 232, 0.03) 100%);
}

.values-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.values-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

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

.value-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
}

.value-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.value-card p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* Team Showcase */
.team-showcase {
    padding: 50px;
    margin-bottom: 60px;
}

.team-showcase h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.team-showcase>p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.team-photo {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-photo:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

.team-photo img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.credentials {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.credential-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
    padding: 15px 30px;
    border-radius: 50px;
    border: 2px solid var(--color-primary);
    transition: all 0.3s ease;
}

.credential-badge:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.credential-badge:hover .badge-text {
    color: white;
}

.badge-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
}

.credential-badge:hover .badge-icon {
    color: white;
}

.badge-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    transition: color 0.3s ease;
}

/* About CTA */
.about-cta {
    text-align: center;
    padding: 60px 50px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 168, 232, 0.05) 100%);
}

.about-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.about-cta>p {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 35px;
}

.cta-contact {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cta-phone,
.cta-email {
    font-size: 1.2rem;
    color: var(--color-text-main);
    font-weight: 600;
}

/* Responsive Adjustments for About Page */
@media (max-width: 1024px) {
    .story-section {
        grid-template-columns: 1fr;
    }

    .story-highlights {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .about-hero-section {
        height: 300px;
    }

    .about-hero-section h1 {
        font-size: 2.5rem;
    }

    .about-hero-section .subtitle {
        font-size: 1.1rem;
    }

    .about-intro {
        padding: 30px 20px;
    }

    .about-intro h2 {
        font-size: 1.8rem;
    }

    .about-intro p {
        font-size: 1rem;
    }

    .timeline-section {
        padding: 30px 20px;
    }

    .timeline-section h2 {
        font-size: 1.8rem;
    }

    .timeline-container::before {
        left: 40px;
    }

    .timeline-item {
        grid-template-columns: auto 1fr;
        gap: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 2;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-marker,
    .timeline-item:nth-child(even) .timeline-marker {
        grid-column: 1;
    }

    .timeline-marker {
        width: 60px;
        height: 60px;
    }

    .timeline-icon {
        font-size: 2rem;
    }

    .story-content {
        padding: 30px 20px;
    }

    .story-content h2 {
        font-size: 1.8rem;
    }

    .story-content p {
        font-size: 1rem;
    }

    .story-highlights {
        grid-template-columns: 1fr;
    }

    .values-section {
        padding: 30px 20px;
    }

    .values-section h2 {
        font-size: 1.8rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .team-showcase {
        padding: 30px 20px;
    }

    .team-showcase h2 {
        font-size: 1.8rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .credentials {
        flex-direction: column;
        align-items: center;
    }

    .credential-badge {
        width: 100%;
        justify-content: center;
    }

    .about-cta {
        padding: 40px 20px;
    }

    .about-cta h2 {
        font-size: 2rem;
    }

    .cta-contact {
        flex-direction: column;
        gap: 20px;
    }
}

/* =========================================
   About & Services Wrapper Fixes
   ========================================= */

.custom-about-wrapper,
.custom-services-wrapper {
    width: 100%;
    position: relative;
    padding: 0;
}

/* Force full width for custom templates to override standard Astra container constraints */
.page-template-page-about .site-content>.ast-container,
.page-template-page-services .site-content>.ast-container,
body[class*="page-template-page-about"] .site-content>.ast-container,
body[class*="page-template-page-services"] .site-content>.ast-container {
    max-width: 1024px !important;
    padding: 0 !important;
}