/*
Theme Name: Ecoproplumbing Child Theme
Theme URI: https://ticinoweb.com
Description: Child theme for Ecoproplumbing - Based on ticinoweb-ai-theme
Author: ticinoWEB
Template: ticinoweb-ai-theme
Version: 1.8.2
Text Domain: ecoproplumbing-child-theme
*/

/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Brand Colors - Blue Palette (based on logo) */
    --eco-primary: #0077b6;
    /* Logo Blue */
    --eco-primary-dark: #023e8a;
    /* Darker Blue */
    --eco-secondary: #0096c7;
    /* Lighter Blue */
    --eco-accent: #caf0f8;
    /* Lightest Blue */
    --eco-text: #333333;
    --eco-light: #f8f9fa;
    --eco-white: #ffffff;

    /* Spacing */
    --section-spacing: 4rem;
    /* Mobile defaults */
    --container-padding: 1.5rem;
}

body {
    color: var(--eco-text);
    font-family: 'Poppins', sans-serif;
    /* Reset for Full Width */
    margin: 0;
    padding: 0;
    width: 100%;
    /* NIENTE overflow-x qui. Per specifica, se un asse non e `visible` l'altro
       passa da `visible` ad `auto`: `overflow-x: hidden` rendeva quindi <body> un
       contenitore di scroll, e da li tre sintomi con una sola causa —
       window.scrollY restava 0 (quindi nessun saltello del bottone e nessuna
       classe eco-scrolled), e i discendenti position: fixed (bottone flottante,
       canvas, .modal + backdrop) venivano ancorati al box di scroll di body
       invece che al viewport, per cui il bottone scorreva via e il modal si
       apriva in cima al documento. Lo sbordo orizzontale ora e risolto alla
       radice (box-sizing sui container e via i 100vw), quindi questo
       contenimento non serve piu. */
}

/* Prevent floating header overlapping the main content */
#content {
    padding-top: 50px;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Nessun overflow-x qui: vedi la nota nel blocco mobile. Il contenimento
       dello sbordo sta su body, che non rompe position: fixed. */
}

/* =========================================
   ANIMATED BACKGROUND
   ========================================= */
#eco-wave-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    opacity: 0.30;
    /* Render the dots out of focus via GPU compositing */
}

/* =========================================
   UTILITIES & OVERRIDES
   ========================================= */
.text-primary {
    color: var(--eco-primary) !important;
}

.bg-primary {
    background-color: var(--eco-primary) !important;
    /* Grey Text */
    --eco-text-grey: #6c757d;
}

/* =========================================
   CTA BUTTONS (Removed per user request)
   ========================================= */


/* =========================================
   CUSTOM HEADER (Child Theme)
   ========================================= */
/* =========================================
   CUSTOM HEADER (Child Theme)
   ========================================= */
/* =========================================
   CUSTOM HEADER (Child Theme)
   ========================================= */
.site-header.custom-header {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: fixed;
    /* Fixed as requested */
    width: 100%;
    top: 30px;
    /* Floating detached */
    left: 0;
    z-index: 9999;
    /* Always on top */
    animation: slideDown 0.8s ease-out;
    pointer-events: none;
    /* Let clicks pass through outside wrapper */
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-boxed-wrapper {
    pointer-events: auto;
    /* Re-enable clicks */
    background: rgba(255, 255, 255, 0.75);
    /* Liquid Transparency */
    backdrop-filter: blur(20px) saturate(180%);
    /* Strong Blur + Saturation */
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Glass Edge */
    border-radius: 60px;
    /* Stronger rounding */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    /* Deep glass shadow */
    max-width: 1300px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 1rem 3rem;
    /* Taller Island */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.header-boxed-wrapper:hover {
    box-shadow: 0 15px 50px rgba(31, 38, 135, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque on hover */
}

/* Scrolled Header State */
.custom-header.header-scrolled .header-boxed-wrapper {
    padding: 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 40px;
    /* slightly smaller radius */
}

.custom-header.header-scrolled .site-logo,
.custom-header.header-scrolled .custom-logo {
    height: 60px;
    /* Shrinks the logo significantly */
}

/* =========================================
   SECONDARY HEADER IMAGE
   Per-site, set on the front page. Sits to the right of the menu.
   ========================================= */
.header-secondary-image {
    align-items: center;
    /* Never let the badge squeeze the menu: the menu keeps its width and this
       shrinks instead. */
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 1.5rem;
    line-height: 0;
}

.header-secondary-image .header-secondary-img {
    /* Deliberately shorter than the 80px logo: the logo stays the primary mark. */
    height: 62px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Shrinks with the logo when the header condenses on scroll. */
.custom-header.header-scrolled .header-secondary-image .header-secondary-img {
    height: 46px;
}

@media (max-width: 1199px) {
    .header-secondary-image {
        margin-left: 1rem;
    }

    .header-secondary-image .header-secondary-img {
        height: 50px;
    }
}

/* =========================================
   BOXED HERO SECTION 
   ========================================= */
#hero,
.hero-section {
    position: relative;
    max-width: 1300px;
    height: 50vh;
    width: 100%;
    margin: 120px auto 3rem auto;
    /* Adjusted to account for floating header (which is roughly 80px-100px tall with padding) */
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 119, 182, 0.1);
    /* Subtle shadow for boxed feel */
}

/* Logo Styling */
.site-branding {
    display: block;
    line-height: 0;
    /* Fix ghost spacing */
    margin: 0;
    /* Removed extra margin as user felt it was pushed too far right */
}

.site-branding a {
    text-decoration: none !important;
    border: none !important;
    display: inline-block;
}

.site-branding .site-logo,
.site-branding .custom-logo {
    height: 80px;
    /* Reduced to 80px based on visual inspection */
    width: auto;
    min-width: 180px;
    max-width: none;
    /* Removed limits preventing aspect ratio from growing */
    display: block;
    margin-top: 10px;
    /* Push logo slightly lower per user request */
    transition: all 0.4s ease;
    /* Enhanced transition for scroll shrink */
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    /* Slight depth for logo */
}

.site-branding:hover .site-logo,
.site-branding:hover .custom-logo {
    transform: scale(1.05);
}

/* Navigation Styling */
#child-header-nav ul,
.main-navigation ul,
.main-navigation .menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    /* Il menu non va mai a capo: era `wrap`, e con l'immagine secondaria
       nell'header l'ultima voce finiva su una seconda riga. Dove una riga sola non
       ci sta si passa all'hamburger (vedi il breakpoint a 1200px), non a due righe.
       L'override mobile mette flex-direction: column, quindi le voci si impilano
       comunque nel pannello a comparsa. */
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: center;
}


#child-header-nav li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.main-navigation ul li a,
.main-navigation .menu ul li a,
#child-header-nav li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    display: block;
}

/* Hover Animation (Water Wave) */
.main-navigation ul li a {
    position: relative;
    overflow: hidden;
}

.main-navigation ul li a:hover,
.main-navigation .menu ul li a:hover,
#child-header-nav li a:hover {
    color: var(--eco-primary);
    text-shadow: 0 0 1px rgba(0, 119, 182, 0.3);
}

/* Island Shimmer Effect */
.header-boxed-wrapper:hover {
    box-shadow: 0 15px 50px rgba(31, 38, 135, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
}

/* =========================================
   MODERN FOOTER - CENTERED STACK
   ========================================= */
.site-footer-modern {
    background-color: #e3f2fd;
    /* Azzurrino / Light Blue */
    color: #333;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content-wrapper {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Flex Column Stack */
.footer-centered-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

/* 1. LOGO */
.footer-logo {
    max-height: 90px;
    width: auto;
    display: block;
    margin: 0 auto;
    /* Ensure centering */
}

/* 2. MENU (Icon List Style - Horizontal) */
.menu-flex-list {
    display: flex;
    flex-wrap: wrap;
    /* Safety wrap */
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.menu-flex-list li a {
    text-decoration: none;
    color: #0d47a1;
    /* Darker Blue for Contrast */
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    position: relative;
    font-size: 1.05rem;
}

/* Icon List Bullet (Chevron) */
.menu-flex-list li a::before {
    content: '\f054';
    /* Chevron Right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--eco-secondary);
    margin-right: 8px;
    transition: transform 0.3s;
}

.menu-flex-list li a:hover {
    color: var(--eco-primary);
}

.menu-flex-list li a:hover::before {
    transform: translateX(3px);
    /* Slide arrow */
}

/* 3. CONTACTS (Horizontal) */
.contact-flex-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.contact-flex-list li {
    display: flex;
    align-items: center;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
}

.contact-flex-list li i {
    color: var(--eco-primary);
    margin-right: 8px;
    font-size: 1.1rem;
}

.contact-flex-list a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.contact-flex-list a:hover {
    color: var(--eco-primary);
    text-decoration: none;
}

/* Copyright Section */
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Very subtle separator */
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}

.copyright-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright-flex p {
    margin: 0;
}

.design-credit a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

.footer-legal-links {
    margin-top: 0.5rem;
    text-align: center;
}

.footer-legal-links a {
    color: #555;
    text-decoration: underline;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {

    .menu-flex-list,
    .contact-flex-list {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-flex-list {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* Mobile Header Adjustments */
@media (max-width: 991px) {
    .site-header.custom-header {
        padding: 0;
        min-height: 60px;
        top: 10px;
        /* Tighter on mobile */
    }

    .header-boxed-wrapper {
        padding: 0.5rem 1rem;
        /* Reduced padding */
        width: 95%;
        /* More width */
        border-radius: 30px;
        /* Slightly less rounded */
    }

    .site-branding .site-logo,
    .site-branding .custom-logo {
        max-height: 60px;
        /* Smaller on mobile */
        min-width: 100px;
    }
}

/* Mobile Menu Trigger (Hidden on Desktop) */
.menu-toggle {
    display: none;
}

/* Base CTA styles - compact & discreet */
.btn-primary,
.btn-outline-primary {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    /* Slightly tighter radius */
    padding: 0.5rem 1.4rem;
    /* Reduced padding */
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    text-transform: none;
    min-height: 40px;
    /* Reduced min-height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    cursor: pointer;
    box-shadow: none;
    /* Removed default shadow for cleaner look */
}

/* Remove text decorations */
.btn-primary:hover,
.btn-outline-primary:hover,
.btn-primary:focus,
.btn-outline-primary:focus {
    text-decoration: none !important;
    outline: none;
}

/* 
   LIQUID FILL EFFECT 
   Uses background-size 100% 200% to simulate water rising from bottom 
*/

/* Primary CTA - Solid */
.btn-primary {
    /* Gradient: Top half = Default Color, Bottom half = Hover/Fill Color */
    background: linear-gradient(to top, var(--eco-primary-dark) 50%, var(--eco-primary) 50%);
    background-size: 100% 200%;
    background-position: top;
    border: 1px solid var(--eco-primary);
    color: #fff;
}

.btn-primary:hover {
    background-position: bottom;
    /* Water 'fills' up */
    border-color: var(--eco-primary-dark);
}

/* Outline CTA */
.btn-outline-primary {
    /* Top half = Transparent, Bottom half = Fill Color */
    background: linear-gradient(to top, var(--eco-primary) 50%, transparent 50%);
    background-size: 100% 200%;
    background-position: top;
    border: 1px solid var(--eco-primary);
    color: var(--eco-primary);
}

.btn-outline-primary:hover {
    background-position: bottom;
    color: #fff;
    border-color: var(--eco-primary);
}

/* Add a subtle wave animation on hover using pseudo-element */
.btn-primary::before,
.btn-outline-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 20%, transparent 70%);
    transform: translateY(100%);
    transition: transform 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.btn-primary:hover::before,
.btn-outline-primary:hover::before {
    transform: translateY(-50%) rotate(180deg);
    /* Subtle churn effect */
}

/* Hero CTA specific */
.hero-content .btn-primary,
.hero-cta .btn-primary {
    /* White top, Blue fill bottom */
    background: linear-gradient(to top, var(--eco-primary) 50%, #fff 50%);
    background-size: 100% 200%;
    background-position: top;
    border-color: #fff;
    color: var(--eco-primary);
    font-weight: 600;
}

.hero-content .btn-primary:hover,
.hero-cta .btn-primary:hover {
    background-position: bottom;
    color: #fff;
    border-color: var(--eco-primary);
    /* Blend border */
}

/* Section Headings */
.section-heading {
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* =========================================
   HERO SECTION (Mobile First)
   ========================================= */
.hero-section {
    position: relative;
    height: 85vh;
    padding: 0px 0px 0px 0px;
    /* Tall hero on mobile for impact */
    min-height: 500px;
    width: 100%;
}

.eco-hero-slider {
    height: 100%;
    width: 100%;
    max-width: 1300px;
    /* Matched to Header */
    margin: 0 auto;
    border-radius: 40px;
    /* Optional: smooth corners to match header */
    overflow: hidden;
}

.eco-hero-slider .swiper-wrapper,
.eco-hero-slider .hero-slide {
    height: 100%;
    width: 100%;
}

.hero-slide {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding-bottom: 90px; /* space for swiper pagination dots */
}

/* =========================================
   HERO BACKGROUND VIDEO — deferred + fade-in
   =========================================
   The <video> carries no src in the markup; front-page.php attaches it after the
   load event so several megabytes never compete with the first paint. Until the
   first frame is decodable the brand gradient below is what the visitor sees, and
   the video then fades over it rather than popping in. */
.hero-section--video {
    background: linear-gradient(160deg, #0077b6 0%, #0096c7 45%, #48cae4 100%);
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 900ms ease-in-out;
}

.hero-bg-video.is-ready {
    opacity: 1;
}

/* Transparent while the clip plays; fades to black only to hide the loop seam. */
#hero-video-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

/* Single hero call to action, replacing the rotating slogan panel. The wrapper
   spans the hero so the button can sit low without a fixed offset; it must not
   swallow clicks meant for anything underneath. */
.hero-cta {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12%;
    pointer-events: none;
}

.hero-cta .btn {
    pointer-events: auto;
    animation: ecoHeroCtaIn 700ms 200ms both cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ecoHeroCtaIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Scroll reveal for the front-page sections. Armed only when the early inline
   script in wp_head adds .eco-js, so with JavaScript off nothing is ever hidden.
   That script also sets a timer that strips .eco-js if the observer never starts,
   which keeps a broken script from leaving the page blank. */
.eco-js #content > section:not(#hero) {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Must repeat :not(#hero) — without it this rule carries one ID against the two
   of the rule above (:not(#hero) counts as an ID), so it loses the cascade and the
   revealed sections stay at opacity 0 regardless of source order. */
.eco-js #content > section:not(#hero).is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    .hero-bg-video {
        transition: none;
    }

    .hero-cta .btn {
        animation: none;
    }

    .eco-js #content > section:not(#hero) {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Content styling with liquid glass effect */
.hero-content {
    max-width: 680px; /* narrower so background is more visible */
    width: 90%;
    margin: 0 auto;
    margin-bottom: 60px; /* lift above swiper pagination dots */
    padding: 1.5rem 2rem;
    /* Liquid Glass Effect - Vivid Blue */
    background: rgba(0, 119, 182, 0.55);
    /* Vivid blue, semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    color: #ffffff;
    box-sizing: border-box;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.hero-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

/* Desktop Overrides for Hero */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

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

/* --- Hero Slide Liquid Animations --- */
.hero-content,
.hero-title,
.hero-subtitle,
.hero-actions {
    opacity: 0;
    visibility: hidden;
}

/* Trigger animations when slide is active */
.swiper-slide-active .hero-content {
    visibility: visible;
    /* 1.5s reveal, then 8s continuous subtle wobble */
    animation: liquidBoxReveal 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards,
        continuousLiquidBox 8s ease-in-out 1.5s infinite alternate;
}

.swiper-slide-active .hero-title {
    visibility: visible;
    animation: bubbleRiseText 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.3s forwards;
}

.swiper-slide-active .hero-subtitle {
    visibility: visible;
    animation: bubbleRiseText 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.5s forwards;
}

.swiper-slide-active .hero-actions {
    visibility: visible;
    animation: bubbleRiseText 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.7s forwards;
}

/* Water-themed Keyframes */
@keyframes liquidBoxReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        /* Water drop distortion */
        border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        border-radius: 24px;
    }
}

@keyframes continuousLiquidBox {
    0% {
        border-radius: 24px;
        transform: translateY(0);
    }

    33% {
        border-radius: 30px 18px 28px 22px;
        transform: translateY(-4px);
    }

    66% {
        border-radius: 20px 32px 22px 28px;
        transform: translateY(2px);
    }

    100% {
        border-radius: 24px;
        transform: translateY(0);
    }
}

@keyframes bubbleRiseText {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Swiper Navigation Customization */
/* Swiper Navigation Customization: Arrows Removed */
.swiper-button-next,
.swiper-button-prev {
    display: none !important;
}

/* Swiper Pagination: Water Drops */
.swiper-pagination {
    bottom: 25px !important;
    /* Adjust position */
    z-index: 10 !important;
}

.swiper-pagination-bullet {
    width: 14px;
    /* Slightly wider */
    height: 14px;
    background: transparent;
    border: 2px solid var(--eco-white);
    opacity: 0.7;
    border-radius: 0 50% 50% 50%;
    /* Elongate the drop */
    transform: rotate(45deg) scale(0.8, 1.2);
    margin: 0 8px !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.swiper-pagination-bullet-active {
    background-color: var(--eco-primary) !important;
    border-color: var(--eco-primary) !important;
    opacity: 1;
    /* Active state larger and maintained elongation */
    transform: rotate(45deg) scale(1.1, 1.5) !important;
    box-shadow: 0 4px 10px rgba(0, 119, 182, 0.5);
    /* Blue shadow */
}

/* Hover effect */
.swiper-pagination-bullet:hover:not(.swiper-pagination-bullet-active) {
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 0.9;
    transform: rotate(45deg) scale(0.9, 1.3);
}

/* =========================================
   SECTIONS: Common Styles
   ========================================= */
section {
    padding: var(--section-spacing) 0;
}

/* About Section */
/* About Section - Wrapped & Decorated */
.section-about {
    overflow: visible;
    /* Allow decorations to pop */
}

/* Main Box Wrapper (Container for Text + Image) - Clean Layout */
.about-main-box {
    background: transparent;
    padding: 0;
    box-shadow: none;
    position: relative;
    border: none;
    color: var(--eco-text);
    /* Exact match to Hero width */
    max-width: 1300px;
    width: 100%;
    /* Make it large like reviews */
    margin: 0 auto 3rem auto;
}

/* Text Content Column */
.about-text-content {
    position: relative;
    z-index: 2;
    padding-right: 4rem;
    /* Increased spacing as requested */
    text-align: left;
}

/* Adjust text colors for light background */
.about-text-content .text-primary {
    color: var(--eco-primary) !important;
    font-weight: 600;
}

.about-text-content .section-heading {
    color: var(--eco-text);
    text-shadow: none;
    margin-bottom: 0.5rem !important;
    /* Minimal spacing as requested */
}

.about-text-content .section-text,
.about-text-content p {
    color: #555 !important;
}

.about-text-content .btn-outline-primary {
    border-color: var(--eco-primary);
    color: var(--eco-primary);
}

.about-text-content .btn-outline-primary:hover {
    background-color: var(--eco-primary);
    color: #fff;
    border-color: var(--eco-primary);
}

/* Image Wrapper & Plumbing Decoration */
.about-image-wrapper {
    position: relative;
    z-index: 1;
    /* Ensure image fits nicely */
}

.about-image-wrapper img {
    border-radius: 20px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    z-index: 2;
    width: 100%;
    display: block;
    border: 4px solid rgba(255, 255, 255, 0.1);
    /* Subtle inner border */
}

/* Decoration: "Pipe" Frame (Stylized) */
.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--eco-accent);
    /* Lighter blue for contrast on dark bg */
    border-radius: 24px;
    transform: translate(15px, -15px);
    opacity: 0.4;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
    pointer-events: none;
}


/* Water Ripple Animation */
@keyframes waterPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 119, 182, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(0, 119, 182, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 119, 182, 0);
    }
}


/* Hover Effects - Water Theme */
.about-image-wrapper:hover img {
    /* Pulse effect mimicking water ripples */
    animation: waterPulse 2s infinite;
    border-color: var(--eco-primary);
    transform: scale(1.02);
}

.about-image-wrapper:hover::before {
    /* Pipe frame flows away slightly */
    transform: translate(25px, -25px) scale(1.05);
    border-color: var(--eco-secondary);
    opacity: 0.6;
    filter: blur(2px);
    /* Watery blur */
}


/* Responsive: Stack gracefully */
@media (max-width: 768px) {
    .about-main-box {
        padding: 2rem 1.5rem;
        /* Mobile adjustment */
        width: 95%;
        /* Use more width on mobile */
    }

    .about-text-content {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
    }

    .about-image-wrapper::before {
        transform: translate(10px, -10px);
    }
}

/* Force side-by-side on desktop */
@media (min-width: 769px) {
    .about-main-box .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .about-main-box .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* ============================================
   SERVICE AREAS SECTION
   ============================================ */
.section-service-areas {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    padding: 3.5rem 0;
    margin: 2rem 0;
}

/* Custom Row for Service Areas */
.service-areas-row {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    /* Large gap requested */
    flex-wrap: wrap;
    /* allow wrap on mobile */
}

.service-areas-row>div {
    flex: 1;
    min-width: 300px;
    /* prevent squishing */
}

@media (max-width: 900px) {
    .service-areas-row {
        flex-direction: column;
        gap: 3rem;
    }
}

.service-areas-map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    /* Fallback */
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(0, 119, 182, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

/* Tags Container */
.service-areas-tags-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.2rem;
}

.areas-tags-grid {
    display: flex;
    gap: 1rem;
}

.areas-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Liquid Glass Water Drop Marker */
.water-drop-marker {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(79, 195, 247, 0.8) 25%, rgba(0, 119, 182, 0.95) 60%, rgba(2, 62, 138, 1) 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    width: 100%;
    height: 100%;
    box-shadow:
        inset -2px -2px 6px rgba(0, 0, 0, 0.4),
        inset 2px 2px 6px rgba(255, 255, 255, 0.7),
        0 8px 20px rgba(0, 20, 40, 0.5);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.85);
    animation: markerFloat 3s ease-in-out infinite;
    z-index: 10;
}

/* Shine reflection */
.water-drop-marker::after {
    content: '';
    position: absolute;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border-radius: 50%;
    top: 15%;
    left: 15%;
    filter: blur(0.5px);
}

/* Central Pin Dot */
.water-drop-marker::before {
    content: '';
    position: absolute;
    width: 20%;
    height: 20%;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

@keyframes markerFloat {

    0%,
    100% {
        transform: rotate(-45deg) translate(0, 0);
    }

    50% {
        transform: rotate(-45deg) translate(0, -8px);
    }
}

/* Service Area Polygon Drawing Animation (Dashed) */
.animated-service-perimeter {
    opacity: 0;
    /* Hidden until JS is ready */
    transition: opacity 0.5s ease;
    transform-origin: center;
}

.animated-service-perimeter.is-ready {
    opacity: 1;
    stroke-dashoffset: var(--draw-offset, 3000);
    animation: dashedDrawing 8s linear infinite;
    /* Slower, linear for smoothness */
    fill-opacity: 0;
}

@keyframes dashedDrawing {
    0% {
        stroke-dashoffset: var(--draw-offset, 3000);
        stroke-opacity: 1;
        /* Visible immediately once drawing starts */
        fill-opacity: 0;
    }

    40% {
        stroke-dashoffset: 0;
        /* Drawn completely */
        stroke-opacity: 1;
        fill-opacity: 0;
    }

    55% {
        stroke-dashoffset: 0;
        stroke-opacity: 1;
        fill-opacity: 0.25;
        /* Fill appears */
    }

    85% {
        stroke-dashoffset: 0;
        stroke-opacity: 1;
        fill-opacity: 0.25;
    }

    95% {
        stroke-dashoffset: 0;
        stroke-opacity: 0;
        fill-opacity: 0;
    }

    100% {
        stroke-dashoffset: 0;
        stroke-opacity: 0;
        fill-opacity: 0;
    }
}

/* Hover effect on map path? Not easy with SVG/Leaflet, but the animation is constant */

/* Glassmorphism Area Tags */
.area-tag {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px rgba(0, 119, 182, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    color: #0f2b4a;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.area-tag:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(79, 195, 247, 0.6);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 15px rgba(0, 119, 182, 0.15),
        0 0 0 2px rgba(79, 195, 247, 0.2),
        inset 0 0 20px rgba(79, 195, 247, 0.1);
    color: #0077b6;
}

.area-tag>* {
    position: relative;
    z-index: 1;
}

.area-tag i {
    color: #0096c7;
    font-size: 0.8rem;
    margin-right: 12px;
    filter: drop-shadow(0 2px 2px rgba(0, 119, 182, 0.2));
}

.area-tag:hover i {
    color: #0096c7;
}

@media (max-width: 768px) {
    .service-areas-map {
        height: 300px;
    }

    .areas-tags-grid {
        flex-direction: column;
        gap: 0.6rem;
    }
}

/* Services Section */
.section-services {
    background-color: transparent;
}

/* Services Main Box (Wrapper - Layout Only) */
.services-main-box {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 1300px;
    /* Match Hero and other sections */
    width: 100%;
    margin: 0 auto;
}

/* Enforce 3-Column Grid inside Box */
.services-main-box .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
    /* Cards size to content, no extra whitespace */
    margin-right: 0;
    margin-left: 0;
}

/* Reset Bootstrap Columns inside Grid */
.services-main-box .col-md-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding-right: 0;
    padding-left: 0;
    margin-bottom: 0 !important;
}

.service-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem 2rem 1rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
    border: 2px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    height: 260px !important;
    /* Fixed height requested by user */
}

/* Back wave layer (deeper, slower — creates 3D depth) */
.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -15%;
    width: 130%;
    height: 0%;
    background: linear-gradient(180deg,
            rgba(0, 119, 182, 0.02) 0%,
            rgba(0, 119, 182, 0.06) 25%,
            rgba(0, 150, 199, 0.10) 50%,
            rgba(0, 119, 182, 0.16) 100%);
    border-radius: 40% 60% 0 0;
    transition: height 3.5s ease-out;
    z-index: 0;
    pointer-events: none;
}

.service-card:hover::before {
    height: 55%;
    animation: waveBack 3s ease-in-out infinite;
}

/* Front wave layer (lighter, faster — foreground) */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 0%;
    background: linear-gradient(180deg,
            rgba(0, 119, 182, 0.01) 0%,
            rgba(0, 150, 199, 0.05) 30%,
            rgba(0, 119, 182, 0.09) 60%,
            rgba(0, 150, 199, 0.14) 100%);
    border-radius: 55% 45% 0 0;
    transition: height 4.5s ease-out;
    z-index: 0;
    pointer-events: none;
}

.service-card:hover::after {
    height: 45%;
    animation: waveFront 2s ease-in-out infinite;
}

/* All card content above waves */
.service-card>* {
    position: relative;
    z-index: 1;
}

/* Border glow + lift on hover */
.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--eco-primary);
    box-shadow:
        0 15px 35px rgba(0, 119, 182, 0.18),
        0 0 0 1px var(--eco-primary),
        inset 0 0 20px rgba(0, 119, 182, 0.04) !important;
    animation: borderGlow 2s ease-in-out infinite;
}

/* Glowing border pulse */
@keyframes borderGlow {

    0%,
    100% {
        box-shadow:
            0 15px 35px rgba(0, 119, 182, 0.18),
            0 0 8px rgba(0, 119, 182, 0.2),
            0 0 0 1px var(--eco-primary),
            inset 0 0 20px rgba(0, 119, 182, 0.04);
    }

    50% {
        box-shadow:
            0 15px 35px rgba(0, 119, 182, 0.25),
            0 0 18px rgba(0, 119, 182, 0.35),
            0 0 0 2px rgba(0, 150, 199, 0.7),
            inset 0 0 30px rgba(0, 119, 182, 0.06);
    }
}

/* Back wave — slow, wide undulation */
@keyframes waveBack {

    0%,
    100% {
        border-radius: 40% 60% 0 0;
    }

    33% {
        border-radius: 55% 45% 0 0;
    }

    66% {
        border-radius: 48% 52% 0 0;
    }
}

/* Front wave — faster, tighter undulation */
@keyframes waveFront {

    0%,
    100% {
        border-radius: 55% 45% 0 0;
    }

    25% {
        border-radius: 42% 58% 0 0;
    }

    50% {
        border-radius: 60% 40% 0 0;
    }

    75% {
        border-radius: 45% 55% 0 0;
    }
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 119, 182, 0.08);
    /* Light blue bg */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eco-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
    background-color: var(--eco-primary);
    color: #ffffff;
}

.service-icon-wrapper i {
    font-size: 1.6rem;
    color: inherit;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 900 !important;
}

.service-title {
    font-weight: 700;
    color: var(--eco-text);
    margin-bottom: 1rem;
}

.service-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .services-main-box {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .services-main-box .row {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }
}

/* ============================================
   24/7 EMERGENCY SECTION
   ============================================ */
.section-emergency {
    background-color: transparent;
}

.emergency-box {
    background: rgba(10, 22, 40, 0.70);
    /* Dark translucent background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 119, 182, 0.15);
    max-width: 1300px;
    /* Match Hero Section Box */
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Subtle background glow */
.emergency-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Badge */
.emergency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 119, 182, 0.15);
    border: 1px solid rgba(0, 119, 182, 0.3);
    color: #4fc3f7;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: badgePulse 2s ease-in-out infinite;
}

.emergency-badge i {
    animation: phonePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 119, 182, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 119, 182, 0);
    }
}

@keyframes phonePulse {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

/* Title */
.emergency-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.emergency-accent {
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    display: block;
    text-shadow: none;
}

/* Description */
.emergency-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.emergency-desc strong {
    color: #4fc3f7;
}

/* Stats Row */
.emergency-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.3rem;
}

/* Service Areas Section */
.section-service-areas {
    position: relative;
    padding: 0rem 0 3rem 0;
    /* Reduced top padding from 5rem (via py-5 approx) to 2rem */
    background-color: transparent;
}

/* CTA Button */
.emergency-cta {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* Feature Cards (Right Column) */
.emergency-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 0;
    height: 100%;
}

.emergency-feature-card {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Water ripple sweep on hover */
.emergency-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 119, 182, 0.04) 20%,
            rgba(0, 150, 199, 0.10) 40%,
            rgba(79, 195, 247, 0.14) 50%,
            rgba(0, 150, 199, 0.10) 60%,
            rgba(0, 119, 182, 0.04) 80%,
            transparent 100%);
    transition: left 0.8s ease;
    z-index: 0;
    pointer-events: none;
}

.emergency-feature-card:hover::before {
    left: 170%;
}

/* Emergency Gallery Swiper */
.emergency-gallery-wrapper {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.emergencySwiper {
    width: 100%;
    height: 400px;
    border-radius: 16px;
}

.gallery-slide-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    position: relative;
    /* Overlay for better integration */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.emergencySwiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.emergencySwiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #4fc3f7;
    width: 12px;
    height: 12px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

/* Mobile Responsive Gallery */
@media (max-width: 768px) {
    .emergency-gallery-wrapper {
        min-height: 300px;
        margin-top: 2rem;
    }

    .emergencySwiper {
        height: 300px;
    }
}

/* Water stream left accent */
.emergency-feature-card::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(180deg, #4fc3f7, #0096c7, #4fc3f7);
    background-size: 100% 200%;
    border-radius: 0 3px 3px 0;
    transition: height 0.4s ease, box-shadow 0.4s ease;
    z-index: 1;
}

.emergency-feature-card:hover::after {
    height: 70%;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.35), 0 0 20px rgba(0, 150, 199, 0.15);
    animation: waterStream 1.5s linear infinite;
}

@keyframes waterStream {
    0% {
        background-position: 0 0%;
    }

    100% {
        background-position: 0 200%;
    }
}

.emergency-feature-card:hover {
    border-color: rgba(0, 119, 182, 0.2);
    transform: translateX(6px);
    background: rgba(0, 119, 182, 0.05);
}

/* Card content above effects */
.emergency-feature-card>* {
    position: relative;
    z-index: 1;
}

/* Icon Circle */
.feature-icon-circle {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.2), rgba(0, 188, 212, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4fc3f7;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
}

/* Ripple ring on hover */
.emergency-feature-card:hover .feature-icon-circle {
    background: linear-gradient(135deg, var(--eco-primary), #00bcd4);
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(0, 119, 182, 0.15);
}

.feature-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.feature-info p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .emergency-box {
        padding: 2.5rem 1.5rem;
    }

    .emergency-title {
        font-size: 1.6rem;
    }

    .emergency-accent {
        font-size: 2.2rem;
    }

    .emergency-stats {
        gap: 1.2rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .emergency-feature-card {
        padding: 1.2rem;
    }
}

/* Contact Section */
/* Contact Section Background */
/* Contact Section */
/* Contact Section Background */
.section-contacts {
    background-color: transparent;
    /* Removed grey background */
    position: relative;
    padding: 3rem 0;
}

/* Custom Contact Row (Forces 3 items in a row) */
.contact-boxed-wrapper {
    max-width: 1300px;
    /* Match other sections */
    width: 100%;
    margin: 0 auto;
}

.contact-row {
    display: flex;
    justify-content: center;
    /* Center items within the confined width */
    gap: 1rem;
    /* Slightly reduced gap to ensure fit */
    flex-wrap: wrap;
    /* Loop on mobile */
    /* Width constrained by parent .contact-boxed-wrapper */
}

/* Items in contact row */
.contact-row>div {
    flex: 1;
    height: 150px;
    min-width: 250px;
    /* Reduced from 280px to fit 3 in 970px row comfortably */
    max-width: 100%;
}

/* -------------------------------------------
   Water Drop Animation (Dynamic JS Trigger)
   ------------------------------------------- */
.contact-card {
    position: relative;
    overflow: visible;
    /* Allow drop to be seen OUTSIDE */
    height: 100%;
}

/* Inner Card (Holds content & waves & bg) */
.card-inner {
    background: rgba(255, 255, 255, 0.45);
    /* Translucent glass */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.5s ease;
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Clip the waves */
    height: 100%;
    z-index: 2;
    /* Within card context */
}



/* Hover effects transfer to inner */
.contact-card:hover .card-inner {
    transform: translateY(-5px);
    border-color: var(--eco-primary);
    box-shadow: 0 15px 35px rgba(0, 119, 182, 0.18), 0 0 0 1px var(--eco-primary), inset 0 0 20px rgba(0, 119, 182, 0.04);
}

/* Wave Effects need to target .card-inner now */
.card-inner::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -15%;
    width: 130%;
    height: 0%;
    background: linear-gradient(180deg, rgba(0, 119, 182, 0.02) 0%, rgba(0, 119, 182, 0.06) 25%, rgba(0, 150, 199, 0.10) 50%, rgba(0, 119, 182, 0.16) 100%);
    border-radius: 40% 60% 0 0;
    transition: height 3.5s ease-out;
    z-index: 0;
    pointer-events: none;
}

.contact-card:hover .card-inner::before {
    height: 55%;
    animation: waveBack 3s ease-in-out infinite;
}

.card-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 0%;
    background: linear-gradient(180deg, rgba(0, 119, 182, 0.01) 0%, rgba(0, 150, 199, 0.05) 30%, rgba(0, 119, 182, 0.09) 60%, rgba(0, 150, 199, 0.14) 100%);
    border-radius: 55% 45% 0 0;
    transition: height 4.5s ease-out;
    z-index: 0;
    pointer-events: none;
}

.contact-card:hover .card-inner::after {
    height: 45%;
    animation: waveFront 2s ease-in-out infinite;
}

.card-inner>* {
    position: relative;
    z-index: 1;
}

/* Icons update */
.card-inner i {
    font-size: 2.5rem;
    color: var(--eco-primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.contact-card:hover .card-inner i {
    transform: scale(1.1);
}

/* Typography update */
.card-inner h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #0f2b4a;
}

.card-inner p,
.card-inner a {
    color: #555;
    font-size: 1rem;
    text-decoration: none;
    margin: 0;
    line-height: 1.5;
}

.card-inner a:hover {
    color: var(--eco-primary);
    font-weight: 600;
}

/* Return to white slowly */
.card-inner:not([class*="bg-drop-"]) {
    background-color: #ffffff !important;
    /* transition handled in base rule */
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    :root {
        --section-spacing: 3rem;
    }

    .display-4 {
        font-size: 2.2rem;
        /* Bootstrap override */
    }

    /* Ensure padding doesn't break layout */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =========================================
   ABOUT US PAGE STYLES
   ========================================= */

/* Hero Section */
.about-hero {
    position: relative;
    /* Blue Ocean Gradient Background */
    background: linear-gradient(135deg, #023e8a 0%, #48cae4 100%);
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    /* Ensure waves don't overflow */
}

.about-hero-overlay {
    /* Optional: Add a subtle texture or vignette */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Ensure Waves are visible above background/overlay */
.about-hero .ocean {
    z-index: 2;
    /* Above overlay */
    /* Removed height: 100% to allow global .ocean height (80px) to take effect */
}

/* 4th Wave Style (for Hero) */
.wave:nth-of-type(4) {
    bottom: -25px;
    /* Darkest/Deepest wave */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 198'%3E%3Cpath fill='%2303045e' fill-opacity='0.3' d='M0 70c133 0 267 22 400 22s267-22 400-22 267 22 400-22 267-22 400-22v128H0z'/%3E%3C/svg%3E");
    opacity: 0.3;
    animation-duration: 20s;
    animation-delay: -5s;
}

.about-hero-content {
    position: relative;
    z-index: 3;
    /* Above waves */
}

.about-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    margin-top: 20px !important;
}

.about-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Intro Section */
.about-image-wrapper {
    position: relative;
    padding-right: 20px;
    padding-bottom: 20px;
}

.experience-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--eco-primary);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Values Section */
.value-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--eco-primary);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Stats Section Styles Removed (using blue cards instead) */

/* =========================================
   ABOUT US LAYOUT REFINEMENTS
   ========================================= */

/* Constrain Image Height */
.about-img-constrained {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}


/* Responsive Stacking for Custom Flex */
@media (max-width: 991px) {
    .about-custom-flex {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .about-image-col,
    .about-text-col {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

/* =========================================
   VALUES CARD CUSTOM STYLES
   ========================================= */
/* =========================================
   VALUES CARD CUSTOM STYLES
   ========================================= */
.values-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 3rem;
    /* Increased padding */
    transition: all 0.4s ease;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    /* Internal gap between icon and text */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Water Fill Effect */
.values-card::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    transition: height 1s cubic-bezier(0.23, 1, 0.32, 1);
    /* Slowed to 1s */
    z-index: -1;
    border-radius: 50% 50% 0 0;
    transform: scaleX(1.5);
}

.values-card:hover::before {
    height: 150%;
    border-radius: 0;
}

.values-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.values-card .feature-icon-circle {
    transition: transform 0.8s ease, background 0.8s ease, color 0.8s ease;
    /* Slowed to 0.8s */
}

.values-card:hover .feature-icon-circle {
    transform: scale(1.1) rotate(10deg);
    /* Twist like a valve/pipe */
    background: var(--eco-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    /* Water glow */
}


.values-card .feature-icon-circle {
    background: #fff;
    color: var(--eco-primary);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 0;
    margin-bottom: 1rem;
    /* Space below icon */
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.values-card-inner {
    display: flex;
    flex-direction: column;
    /* Icon top, text bottom as requested by "internal space" usually implies block layout? specific user request was "staccare" and "mettere spazio interno" */
    /* wait, user said "one next to other" for the BOXES. Content alignment "internal" might mean padding. */
    /* I will keep icon and text side-by-side if that was the design, but user said "titoletti e descrizioni mettile bianche". */
    /* The screenshot showed them side-by-side. I'll keep `.values-card-inner` as flex row? */
    /* NO, user said "design dei 3 box perchè così non risaltano". */
    /* I will keep side-by-side icon/text but cleaner. */
    align-items: flex-start;
    gap: 1.5rem;
}

.values-card h4 {
    color: #ffffff !important;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.values-card p {
    color: #ffffff !important;
    opacity: 1 !important;
    font-size: 1rem;
    line-height: 1.6;
}

/* Extra wide gap for Values section (using native Bootstrap math) */
.row-extensive-gap {
    --bs-gutter-x: 3rem;
    /* 48px gap */
    --bs-gutter-y: 3rem;
}

/* Force White Text for About Us Banner */
.about-values-banner h2,
.about-values-banner h4,
.about-values-banner p {
    color: #ffffff !important;
    opacity: 1 !important;
}

@media (max-width: 991px) {
    .row-extensive-gap {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

/* =========================================
   STATS SECTION & CARDS
   ========================================= */
/* Force removal of blue background from section */
.about-stats {
    background: transparent !important;
    background-color: transparent !important;
}

/* Stats Card Style (Blue Box) */
.stats-card {
    width: 190px;
    height: 150px;
    background: var(--eco-primary);
    border-radius: 15px;
    padding: 2.5rem 1.5rem;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 119, 182, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    /* Keep drops inside or let them float out? User said "on the side", likely inside bounds or slightly overlapping. Hidden is safer for layout. */
}

/* Water Drops Container */
.water-drops {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

/* Individual Drop Styling */
.water-drops span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 50% 50% 50%;
    transform: rotate(45deg);
    opacity: 0;
    bottom: 0;
}

/* Drop Positions */
.water-drops span:nth-child(1) {
    left: 0;
    width: 6px;
    height: 6px;
}

.water-drops span:nth-child(2) {
    left: 12px;
    width: 10px;
    height: 10px;
    bottom: -5px;
}

.water-drops span:nth-child(3) {
    left: 24px;
    width: 7px;
    height: 7px;
    bottom: 2px;
}

/* Hover Animation */
.stats-card:hover .water-drops span {
    animation: drop-float 2s infinite;
}

/* Stagger Animations */
.stats-card:hover .water-drops span:nth-child(1) {
    animation-delay: 0s;
}

.stats-card:hover .water-drops span:nth-child(2) {
    animation-delay: 0.3s;
}

.stats-card:hover .water-drops span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes drop-float {
    0% {
        transform: translateY(0) rotate(45deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    50% {
        transform: translateY(-15px) rotate(45deg);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-30px) rotate(45deg);
        opacity: 0;
    }
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 119, 182, 0.3);
    background: #0088cc;
    /* Slightly lighter on hover */
}

.stats-card h2 {
    color: #ffffff !important;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stats-card p {
    color: #ffffff !important;
    opacity: 0.9;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   GLOBAL OCEAN WAVES ANIMATION (ROBUST)
   ========================================= */
.about-hero,
.about-cta {
    position: relative;
    overflow: hidden !important;
    /* Force clipping */
}

.ocean {
    height: 160px;
    /* Even taller waves */
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: transparent;
    z-index: 9;
    pointer-events: none;
}

.wave {
    /* Use White fill with low opacity for subtle effect */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 198'%3E%3Cpath fill='white' d='M0 70c133 0 267 22 400 22s267-22 400-22 267 22 400 22 267-22 400-22v128H0z'/%3E%3C/svg%3E");
    position: absolute;
    width: 200%;
    height: 100%;
    bottom: 0;
    left: 0;
    background-repeat: repeat-x;
    transform: translate3d(0, 0, 0);
    animation: wave 15s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
    /* Slowed down base speed */
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Individual Wave Layers - extremely subtle opacity */
.wave:nth-of-type(1) {
    z-index: 10;
    opacity: 0.3;
    /* Very soft */
    animation-duration: 15s;
}

.wave:nth-of-type(2) {
    z-index: 9;
    opacity: 0.2;
    animation-duration: 25s;
    /* Very slow */
    animation-delay: -5s;
    bottom: -10px;
}

.wave:nth-of-type(3) {
    z-index: 8;
    opacity: 0.1;
    animation-duration: 12s;
    animation-delay: -4s;
    bottom: -15px;
}

.wave:nth-of-type(4) {
    z-index: 7;
    opacity: 0.05;
    /* Barely visible */
    animation-duration: 40s;
    /* Almost static */
    animation-delay: -5s;
    bottom: -25px;
}

/* Ensure content is above waves */
.about-hero-content,
.about-cta .container {
    position: relative;
    z-index: 20;
}

/* =========================================
   END OCEAN WAVES
   ========================================= */

/* =========================================
   HEADER DROPDOWN MENU (Click Only)
   ========================================= */
/* Hide default hover behavior if any */
#child-header-nav .menu-item-has-children:hover>.sub-menu {
    display: none !important;
    opacity: 0;
    visibility: hidden;
}

/* Ensure the parent li aligns the link and arrow horizontally */
#child-header-nav .menu-item-has-children {
    display: flex;
    align-items: center;
    position: relative;
    /* Anchor for absolute submenu */
}

#child-header-nav .menu-item-has-children>a {
    margin-right: 2px;
    /* Small space before arrow */
}

/* Arrow Button Styling */
.submenu-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: inherit;
    /* Matches link color */
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.submenu-toggle:hover {
    color: var(--eco-primary, #0077b6);
}

/* Dropdown Box Styling - Water Drop Mega Menu Style */
/* Dropdown Box Styling - Water Drop Mega Menu Style */
#child-header-nav .sub-menu {
    display: none !important;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    /* Soft Water Gradient + Glassmorphism */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(224, 247, 250, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 119, 182, 0.15);
    /* Softer, wider blue shadow */
    border-radius: 0 40px 40px 40px;
    /* More pronounced Water drop shape */
    padding: 25px 0;
    /* Extra top/bottom breathing room */
    min-width: 320px;
    /* Even wider for mega menu feel */
    z-index: 1000;
    list-style: none;
    margin: 10px 0 0 0;
    /* Push down slightly */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Frosty border */
    border-bottom: 2px solid rgba(0, 119, 182, 0.1);
    /* Subtle water line at bottom */
}

/* Show dropdown when class is active */
#child-header-nav .menu-item-has-children.submenu-open>.sub-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* 1. Water Wash Animation Overlay */
#child-header-nav .menu-item-has-children.submenu-open>.sub-menu::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0%;
    /* Water-like blue overlay that washes down */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 119, 182, 0.1) 40%, rgba(0, 119, 182, 0.35) 100%);
    z-index: 10;
    pointer-events: none;
    border-radius: inherit;
    animation: waterWashFlow 0.8s ease-in-out forwards;
}

@keyframes waterWashFlow {
    0% {
        top: 0;
        height: 0%;
        opacity: 1;
    }

    40% {
        top: 0;
        height: 100%;
        opacity: 1;
    }

    70% {
        top: 0;
        height: 100%;
        opacity: 1;
    }

    100% {
        top: 100%;
        height: 0%;
        opacity: 0;
    }
}

/* 2. Cascade Item Reveal */
#child-header-nav .sub-menu>li {
    opacity: 0;
    transform: translateY(-15px);
}

#child-header-nav .menu-item-has-children.submenu-open>.sub-menu>li {
    animation: cascadeReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* Stagger delay using the CSS variable injected by JS */
    animation-delay: calc(var(--item-index, 0) * 0.08s + 0.15s);
}

@keyframes cascadeReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Beautiful Dropdown Links */
#child-header-nav .sub-menu li {
    padding: 0;
    margin: 0;
}

#child-header-nav .sub-menu a {
    display: flex;
    align-items: center;
    position: relative;
    padding: 20px 35px;
    /* Significantly increased padding to prevent "appiccicato" feel */
    color: #2b2d42;
    /* Darker, richer text for contrast against gradient */
    font-weight: 500;
    font-size: 1.1rem;
    /* Larger, more readable text */
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 119, 182, 0.06);
    /* Very subtle water-blue separator */
}

#child-header-nav .sub-menu li:last-child>a {
    border-bottom: none;
}

/* Premium Animated Left Border Accent */
#child-header-nav .sub-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 100%;
    background: var(--eco-primary, #0077b6);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#child-header-nav .sub-menu a:hover::after {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

#child-header-nav .sub-menu a:hover {
    background: linear-gradient(90deg, rgba(0, 119, 182, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    /* Sleek gradient background fade */
    color: var(--eco-primary, #0077b6);
    padding-left: 42px;
    /* Less dramatic typographic shift, balanced by the border */
}

/* 3. Moving Water Drop Icon next to text */
#child-header-nav .sub-menu a::before {
    content: "\f043";
    /* FontAwesome Drop */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--eco-primary, #0077b6);
    margin-right: 15px;
    font-size: 0.9em;
    opacity: 0.6;
    animation: menuDrip 2s infinite ease-in-out;
    /* Stagger the drip as well */
    animation-delay: calc(var(--item-index, 0) * 0.2s);
}

@keyframes menuDrip {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(4px) scale(0.9, 1.1);
        opacity: 1;
        color: #023e8a;
    }
}

/* =========================================
   DEEP NESTING: Submenu within Submenu 
   ========================================= */
/* Position deep nested menus to the right of the parent block */
#child-header-nav .sub-menu .menu-item-has-children {
    position: relative;
    /* Relative anchor for the nested flyout */
}

#child-header-nav .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    /* Push it to the right wrapper edge */
    margin-left: 25px;
    /* Significant gap to prevent "appiccicate" feeling */
    margin-top: -5px;
    /* Align vertically with the parent item */
}

/* On nested items, the toggle arrow should be pushed to the far right */
#child-header-nav .sub-menu .submenu-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

#child-header-nav .sub-menu .menu-item-has-children>a {
    padding-right: 40px;
    /* Leave room for absolute arrow */
}

/* Mobile Responsiveness for Dropdown */
@media (max-width: 991px) {
    #child-header-nav .menu-item-has-children {
        flex-wrap: wrap;
        /* Allow submenu to flow below on mobile */
    }

    #child-header-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
        width: 100%;
    }

    #child-header-nav .sub-menu a:hover {
        padding-left: 24px;
        /* Less shift on mobile */
    }
}

/* =========================================
   CONTACT PAGE FORM STYLES (BOXED)
   ========================================= */

/* The Boxed Section Parent */
.section-contact-form {
    background-color: #f4f6f9;
    /* Subtle gray to make the white box pop */
    border-top: 1px solid #e2e8f0;
}

/* The Box Container with Water Effect */
.contact-form-box {
    max-width: 1100px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 50px 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 119, 182, 0.08), 0 5px 15px rgba(0, 119, 182, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Water Flow Animation inside Box */
.contact-form-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.15) 0%, rgba(225, 245, 254, 0.05) 50%, rgba(255, 255, 255, 0) 70%);
    z-index: -2;
    animation: rotateWater 15s linear infinite;
    pointer-events: none;
}

/* Floating Water Blob inside Box */
.contact-form-box::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 350px;
    height: 350px;
    background: rgba(2, 136, 209, 0.06);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: floatBlobInside 12s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateWater {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes floatBlobInside {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        transform: translateY(-40px) scale(1.1) rotate(90deg);
        border-radius: 50% 50% 30% 70% / 50% 50% 70% 30%;
    }

    100% {
        transform: translateY(-20px) scale(0.9) rotate(180deg);
        border-radius: 60% 40% 60% 40% / 60% 40% 60% 40%;
    }
}

@media (max-width: 768px) {
    .contact-form-box {
        padding: 2rem !important;
    }
}

/* Form Inputs & Selects */
.eco-html-form .form-control,
.eco-html-form .eco-form-select {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    border: 2px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    border-radius: 12px !important;
    padding: 0.85rem 1.25rem;
    color: #334155;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
    appearance: none;
}

.eco-html-form .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Custom Select Dropdown Arrow */
.eco-html-form .eco-form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px 12px !important;
    padding-right: 3rem !important;
    color: #64748b;
}

.eco-html-form .eco-form-select:valid {
    color: #334155;
}

.eco-html-form .form-control:hover,
.eco-html-form .eco-form-select:hover {
    border-color: #cbd5e1 !important;
}

.eco-html-form .form-control:focus,
.eco-html-form .eco-form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--eco-primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.01) !important;
    outline: none;
}

/* Submit Button */
.eco-html-form .btn-primary {
    width: 100% !important;
    display: block !important;
    background: var(--eco-primary);
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 119, 182, 0.2), 0 2px 4px -1px rgba(0, 119, 182, 0.1) !important;
}

.eco-html-form .btn-primary:hover {
    background: #006da6;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 119, 182, 0.3), 0 4px 6px -2px rgba(0, 119, 182, 0.15) !important;
}

.eco-html-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0, 119, 182, 0.2) !important;
}

/* Map Wrapper */
.contact-map-wrapper {
    height: 100% !important;
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* =========================================
   CORE BOOTSTRAP MODAL STRUCTURE
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100050 !important;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    outline: 0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100040 !important;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.6;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
    cursor: pointer;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

/* =========================================
   BOOKING / FREE QUOTE MODAL (Dark Theme)
   ========================================= */
@keyframes ecoWaterShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


.eco-booking-modal .eco-modal-content {
    background: linear-gradient(135deg, rgba(90, 104, 133, 0.7), rgba(110, 125, 159, 0.6), rgba(122, 139, 174, 0.7), rgba(90, 104, 133, 0.6));
    background-size: 300% 300%;
    animation: ecoWaterShimmer 12s ease infinite;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--eco-fonts-body, "Montserrat", sans-serif);
}

.eco-booking-modal * {
    box-sizing: border-box;
}

.eco-booking-modal .eco-modal-header {
    padding: 2.5rem 2rem 1rem;
    position: relative;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eco-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px 12px;
    border-radius: 4px;
    line-height: 1;
}

.eco-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.eco-modal-logo img {
    height: 75px;
    width: 260px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.eco-modal-logo {
    margin-bottom: 0.5rem;
}

.eco-modal-logo h2 {
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.eco-modal-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 2.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0;
    text-align: center;
}

.eco-modal-body {
    padding: 1.5rem 3.5rem 3.5rem;
}

.eco-form-group {
    margin-bottom: 1.5rem;
    display: block;
    width: 100%;
}

.eco-form-label {
    display: block;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    text-align: left;
}

.eco-form-control {
    width: 100%;
    border-radius: 6px;
    border: none;
    padding: 14px 16px;
    font-size: 1.05rem;
    background-color: #ffffff;
    color: #333333;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    display: block;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.eco-form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.4);
}

.eco-input-group {
    display: flex;
    width: 100%;
}

.eco-input-group-text {
    background-color: #ffffff;
    border-radius: 6px 0 0 6px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-right: 1px solid #ddd;
}

.eco-input-group-text .flag {
    font-size: 1.2rem;
    line-height: 1;
}

.eco-input-group-text .arrow {
    font-size: 0.7rem;
    color: #777;
    margin-left: 6px;
}

.eco-input-group .eco-form-control {
    border-radius: 0 6px 6px 0;
    flex: 1;
}

.eco-form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 2rem;
}

.eco-form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.eco-form-check-label {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
}

.eco-form-check-label .modal-link {
    color: #00e5ff;
    text-decoration: underline;
}

.eco-form-check-label .modal-link:hover {
    color: #00b8cc;
}

.eco-submit-quote-btn {
    width: 100%;
    background-color: #00e5ff;
    border: none;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 16px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    display: block;
}

.eco-submit-quote-btn:hover {
    background-color: #00b8cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
}

.eco-booking-modal textarea.eco-form-control {
    min-height: 100px;
}

/* =========================================
   GOOGLE REVIEWS SECTION
   ========================================= */
.section-reviews {
    position: relative;
    overflow: hidden;
    /* Full-width white frosted strip */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    padding: 3.5rem 0;
    margin: 2rem 0;
}

.reviews-main-box {
    max-width: 1300px;
    /* Align precisely with Hero/Header */
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.review-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Subtle water shine on hover */
.review-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: all 0.7s ease;
    z-index: 1;
    pointer-events: none;
}

.review-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 119, 182, 0.12);
    border-color: rgba(0, 119, 182, 0.3);
}

.review-card:hover::after {
    left: 200%;
}

.reviewer-img-wrapper {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.reviewer-img {
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    border-radius: 50% !important;
    /* Force perfect circle */
    width: 46px !important;
    height: 46px !important;
    display: block;
}

/* Reviewer name — smaller, single line, vertically centered with avatar */
.reviewer-info h5 {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0 !important;
    color: #1a1e29;
}

/* Stars row — tighter gap above */
.review-card .stars {
    margin-top: 6px !important;
}

.stars i {
    font-size: 0.85rem;
    margin-right: 2px;
}

/* Reduce space between stars and review body text */
.review-card .review-body {
    margin-top: 8px !important;
}
.google-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    z-index: 2;
}

.review-card:hover .google-icon-wrapper {
    transform: rotate(360deg) scale(1.1);
}

.review-text {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    /* Truncate at 10 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 10;
    line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-body {
    flex-grow: 1;
    overflow: hidden;
}

/* Custom Swiper Pagination for Reviews */
.reviewsSwiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--eco-primary);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.reviewsSwiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

/* =========================================
   GLOBAL WIDTH OVERRIDE (Desktop)
   ========================================= */
/* Expand specific sections to match the 1300px Header/Hero on laptops and up */
@media (min-width: 1200px) {
    .eco-container-1300 {
        max-width: 1300px !important;
    }
}

/* =========================================
   FLOATING BOOKING BUTTON
   ========================================= */
.floating-booking-btn {
    /* !important deliberato: questo bottone deve stare nel viewport in ogni caso. */
    position: fixed !important;
    bottom: 30px;
    right: 30px;
    z-index: 1040;
    /* Below modal overlay (1050) but above content */
    background: #ffffff;
    border: 3px solid #ffffff;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    /* Il saltello parte solo dopo che si e scrollato: vedi html.eco-scrolled piu sotto. */
    transition: transform 0.3s ease;
    /* Il punto d'appoggio del rimbalzo: lo squash deve schiacciare il bottone
       verso il basso, non comprimerlo verso il centro. */
    transform-origin: 50% 100%;
}

.floating-booking-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.floating-booking-btn:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

/* Rimbalzo da palla, non oscillazione. Tre ingredienti:
   1. una timing function PER SEGMENTO, dichiarata dentro i keyframe: salendo
      decelera (gravita che frena), scendendo accelera. Una sola ease-in-out
      sull'intera animazione dava per forza un moto sinusoidale morbido;
   2. rimbalzi successivi decrescenti (-34px, -15px, -5px) e non un unico picco;
   3. squash & stretch: si allunga in volo e si schiaccia all'impatto. Richiede
      transform-origin sul fondo, altrimenti si schiaccia in modo simmetrico e
      sembra rimpicciolire invece di appoggiarsi. */
@keyframes bounceFloatingBtn {

    /* stacco: decelera salendo */
    0% {
        transform: translateY(0) scale(1, 1);
        animation-timing-function: cubic-bezier(0.33, 0, 0.4, 1);
    }

    /* apice, leggermente allungato */
    18% {
        transform: translateY(-34px) scale(0.97, 1.05);
        animation-timing-function: cubic-bezier(0.6, 0, 0.67, 1);
    }

    /* impatto: schiacciato */
    36% {
        transform: translateY(0) scale(1.12, 0.85);
        animation-timing-function: cubic-bezier(0.33, 0, 0.4, 1);
    }

    /* secondo rimbalzo */
    48% {
        transform: translateY(-15px) scale(0.99, 1.02);
        animation-timing-function: cubic-bezier(0.6, 0, 0.67, 1);
    }

    60% {
        transform: translateY(0) scale(1.07, 0.92);
        animation-timing-function: cubic-bezier(0.33, 0, 0.4, 1);
    }

    /* terzo, appena percettibile */
    68% {
        transform: translateY(-5px) scale(1, 1);
        animation-timing-function: cubic-bezier(0.6, 0, 0.67, 1);
    }

    74% {
        transform: translateY(0) scale(1.03, 0.97);
    }

    80% {
        transform: translateY(0) scale(1, 1);
    }

    /* pausa a terra prima di ripartire: senza questa il rimbalzo sembra un tremolio
       continuo invece di una palla che rimbalza e si ferma. */
    100% {
        transform: translateY(0) scale(1, 1);
    }
}

/* Il bottone flottante saltella solo quando si e scrollato verso il basso: fermo a
   pagina appena caricata, cosi l'animazione richiama l'attenzione quando serve.
   ATTENZIONE: questa regola deve stare FUORI dal blocco @keyframes qui sopra. Per
   un errore di inserimento era finita dentro, dove non e un selettore valido e
   viene silenziosamente ignorata — il bottone non saltellava affatto. Il controllo
   sulle graffe non lo rilevava perche erano bilanciate, solo annidate male. */
html.eco-scrolled .floating-booking-btn {
    /* linear e voluto: il ritmo lo danno le timing function dentro i keyframe.
       Metterne una qui la applicherebbe a ogni segmento, riappiattendo tutto. */
    animation: bounceFloatingBtn 1.8s infinite linear;
}

/* Con l'animazione in corso il transform dei keyframe batte quello del :hover, e
   `animation-play-state: paused` congelava il bottone a meta rimbalzo senza
   ingrandirlo. Sospendendola del tutto, l'ingrandimento al passaggio del mouse
   torna a funzionare, con la sua transition. */
html.eco-scrolled .floating-booking-btn:hover {
    animation: none;
    transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
    html.eco-scrolled .floating-booking-btn {
        animation: none;
    }
}

@media (max-width: 768px) {
    .floating-booking-btn {
        width: 65px;
        height: 65px;
        bottom: 20px;
        right: 20px;
    }
}

/* =========================================
   Service Page Breadcrumbs & Hero Additions
   ========================================= */
.eco-breadcrumb-custom .breadcrumb {
    background: transparent;
    padding: 0;
}

.eco-breadcrumb-custom .breadcrumb-item {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.eco-breadcrumb-custom .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
    content: "\f105";
    /* FontAwesome Angle Right */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.8rem;
    vertical-align: middle;
    margin-top: 2px;
}

.eco-breadcrumb-custom a {
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.eco-breadcrumb-custom a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    text-decoration: none !important;
}

.hero-short-desc {
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease backwards 0.3s;
}

.hero-short-desc p:last-child {
    margin-bottom: 0;
}

/* =========================================
   GLOBAL MOBILE EDGE MARGINS (20px EXACT)
   ========================================= */
@media (max-width: 991px) {

    /* 1. All standard Bootstrap containers force 20px safe padding */
    .container,
    .container-fluid,
    .eco-container-1300 {
        padding-left: 20px !important;
        padding-right: 20px !important;
        /* Obbligatorio insieme al padding forzato qui sopra. Se questi container
           finiscono in content-box, il loro box diventa 100% + 20 + 20: a 400px di
           viewport sono 440px, cioe 40px che sfondano a destra e tagliano il testo
           delle sezioni. Con border-box il padding rientra nella larghezza. */
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    /* 1.5 Fix Bootstrap Row and Elementor bleeding to the right edge */
    .row,
    .elementor-row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .elementor-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
        /* 100% del genitore, non 100vw: quest'ultimo include la scrollbar e quindi
           non vincola nulla quando la scrollbar c'e. */
        max-width: 100% !important;
    }

    /* 2. All main boxes INSIDE containers fill 100% of the safely padded space with ZERO inner padding */
    .about-main-box,
    .services-main-box,
    .reviews-main-box,
    .contact-boxed-wrapper,
    .eco-custom-reviews {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Strip Bootstrap column padding inside all main boxes so inner content hits edges perfectly */
    .eco-custom-reviews .row,
    .reviews-main-box .row,
    .about-main-box .row,
    .services-main-box .row,
    .contact-boxed-wrapper .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        row-gap: 20px;
    }

    .eco-custom-reviews [class*="col-"],
    .reviews-main-box [class*="col-"],
    .contact-boxed-wrapper [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Enforce the cards to fill exactly the space inside the 20px-padded Elementor container */
    .review-card {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Fix Address Box sticking to Phone/Email on mobile */
    .contact-row {
        gap: 2rem !important;
        /* Increase general grid gap */
    }

    #card-address {
        margin-top: 15px !important;
        /* Force explicit separation */
    }

    /* Allow contact cards to grow on mobile to prevent content spilling over the grid gaps */
    .contact-row>div {
        height: auto !important;
        min-height: 150px;
    }

    /* 3. Header specific mobile safety margins */
    .header-boxed-wrapper {
        /* width + i due margini da 20px devono fare esattamente 100% del genitore.
           Con 100vw la somma superava il viewport della larghezza della scrollbar,
           sbordando su ogni pagina. */
        width: calc(100% - 40px) !important;
        max-width: 100% !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        border-radius: 20px !important;
    }

    /* 4. Full-bleed Hero sections identical margin formulas without inner padding */
    #hero,
    .hero-section,
    .about-hero,
    .emergency-box {
        width: calc(100% - 40px) !important;
        /* 100% e non 100vw: 100vw include la larghezza della scrollbar
           verticale, quindi con la scrollbar visibile questo valore supera lo
           spazio disponibile e, sommato ai 20px di margine per lato, sfonda. */
        max-width: calc(100% - 40px) !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        border-radius: 20px !important;
    }

    .eco-hero-slider {
        border-radius: 20px !important;
    }

    /* Header specific paddings (don't override vertical) */
    .header-boxed-wrapper {
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
    }

    /* Specific overrides for Hero to avoid huge top margin on mobile */
    #hero,
    .hero-section {
        margin-top: 100px !important;
    }

    .about-hero {
        margin-top: 110px !important;
    }

    /* Contiene eventuali sbordi orizzontali. Deliberatamente SOLO su body: con
       overflow diverso da visible sull'elemento radice, Chrome ancora i
       position: fixed al contenitore di scroll invece che al viewport, e il
       bottone flottante, il canvas e il modal + backdrop scorrono via con la
       pagina. body puo clippare senza creare quel problema. */
    /* Rimossa anche qui: vedi la nota sulla regola base di body. Se ricomparisse
       uno sbordo, va corretto l'elemento che sborda, non nascosto qui — nasconderlo
       costa il position: fixed di bottone, canvas e modal. */


    /* -----------------------------------------
       VISUAL ALIGNMENT FIXES (Crooked Boxes)
       ----------------------------------------- */
    /* Center Service Cards internally on mobile */
    .service-card {
        align-items: center !important;
        text-align: center !important;
    }

    /* Center Footer items uniformly on mobile */
    .site-footer,
    .site-footer .col-md-3,
    .site-footer .col-md-4,
    .site-footer .widget {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .site-footer img {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Force hide the hamburger button on anything larger than a tablet */
/* =========================================
   HEADER NAV — BREAKPOINT DINAMICO
   Sotto i 992px il menu e sempre nell'hamburger. Fra 992 e 1199 dipende
   dall'immagine secondaria: se c'e, una riga sola non ci sta e si passa
   all'hamburger; se non c'e, il menu si prende quello spazio e resta esteso.
   La seconda copia delle regole del pannello e generata dalla prima e scopata su
   body.eco-has-header-image: e duplicazione, ma l'alternativa era spostare il
   breakpoint anche per recensioni, contatti, hero e footer, che nello stesso
   blocco originale non c'entravano nulla.
   ========================================= */
@media (max-width: 991px) {


    /* -----------------------------------------
       MOBILE HAMBURGER MENU FIXES
       ----------------------------------------- */
    /* Anchor for absolute dropdown with supreme stacking context */
    .header-boxed-wrapper {
        position: relative;
        z-index: 9999 !important;
    }

    /* Elegant Absolute Dropdown Menu */
    #ecoMobileNav {
        position: absolute;
        top: calc(100% + 15px);
        left: 10px;
        right: 10px;
        width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
        border-radius: 20px;
        padding: 1.5rem 1rem;
        margin: 0;
        z-index: 1000;

        display: flex !important;
        flex-direction: column;

        /* Smooth Fade & Slide Animation */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-15px);
        transition: visibility 0.4s, opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
        pointer-events: none;
    }

    #ecoMobileNav.show {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Convert horizontal desktop flex into vertical mobile stack */
    #child-header-nav ul,
    .main-navigation ul {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Make links fill width for easier tapping */
    .main-navigation ul li {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-bottom: 1px solid rgba(0, 119, 182, 0.05);
        /* Soft dividers */
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    /* Wrap link and toggle in a flex row so they stay centered together */
    #child-header-nav .menu-item-has-children {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .main-navigation ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 0;
        font-size: 1.15rem;
        text-align: center;
        color: #333;
        flex: 0 1 auto;
    }

    /* Elegant, clickable Chevron Button (Matches high specificity of legacy desktop rules) */
    #child-header-nav .submenu-toggle,
    #child-header-nav .sub-menu .submenu-toggle {
        display: inline-flex !important;
        position: static !important;
        float: none !important;
        transform: none !important;
        right: auto !important;
        top: auto !important;
        /* Force inline positioning */
        align-items: center;
        justify-content: center;
        width: 44px;
        /* Apple UX standard touch target */
        height: 44px;
        margin: 0 0 0 8px !important;
        background: rgba(0, 119, 182, 0.06);
        color: #0077b6;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
        flex: 0 0 44px;
        /* Maintain perfect shape */
    }

    #child-header-nav .submenu-toggle:active,
    #child-header-nav .sub-menu .submenu-toggle:active {
        background: rgba(0, 119, 182, 0.15);
    }

    /* Fix the submenu toggle position on mobile */
    #child-header-nav .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        display: none;

        /* Elegant Submenu Styling */
        flex: 1 1 100%;
        /* Force to next line inside the flex-wrap parent */
        width: 100%;
        background: rgba(0, 119, 182, 0.03) !important;
        border-radius: 12px;
        margin-top: 5px;
        margin-bottom: 15px;
        padding: 5px 0 !important;
        border: 1px solid rgba(0, 119, 182, 0.05);
    }

    /* Sub-sub-menus (3rd level deep) */
    #child-header-nav .sub-menu .sub-menu {
        background: rgba(0, 0, 0, 0.015) !important;
        margin: 5px 10px 10px 10px;
        width: calc(100% - 20px);
        border: none;
    }

    @keyframes slideDownSubmenu {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #child-header-nav .menu-item-has-children.submenu-open>.sub-menu {
        display: block !important;
        animation: slideDownSubmenu 0.25s ease forwards;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {

    /* Con l'immagine secondaria il menu non ci sta su una riga: hamburger. */
    body.eco-has-header-image .navbar-toggler,
    body.eco-has-header-image #ecoMobileMenuBtn {
        display: block !important;
    }


    body.eco-has-header-image /* -----------------------------------------
       MOBILE HAMBURGER MENU FIXES
       ----------------------------------------- */
    /* Anchor for absolute dropdown with supreme stacking context */
    .header-boxed-wrapper {
        position: relative;
        z-index: 9999 !important;
    }
    body.eco-has-header-image /* Elegant Absolute Dropdown Menu */
    #ecoMobileNav {
        position: absolute;
        top: calc(100% + 15px);
        left: 10px;
        right: 10px;
        width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
        border-radius: 20px;
        padding: 1.5rem 1rem;
        margin: 0;
        z-index: 1000;

        display: flex !important;
        flex-direction: column;

        /* Smooth Fade & Slide Animation */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-15px);
        transition: visibility 0.4s, opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
        pointer-events: none;
    }
    body.eco-has-header-image #ecoMobileNav.show {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    body.eco-has-header-image /* Convert horizontal desktop flex into vertical mobile stack */
    #child-header-nav ul,
    body.eco-has-header-image .main-navigation ul {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        text-align: center !important;
    }
    body.eco-has-header-image /* Make links fill width for easier tapping */
    .main-navigation ul li {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-bottom: 1px solid rgba(0, 119, 182, 0.05);
        /* Soft dividers */
    }
    body.eco-has-header-image .main-navigation ul li:last-child {
        border-bottom: none;
    }
    body.eco-has-header-image /* Wrap link and toggle in a flex row so they stay centered together */
    #child-header-nav .menu-item-has-children {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    body.eco-has-header-image .main-navigation ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.8rem 0;
        font-size: 1.15rem;
        text-align: center;
        color: #333;
        flex: 0 1 auto;
    }
    body.eco-has-header-image /* Elegant,
    body.eco-has-header-image clickable Chevron Button (Matches high specificity of legacy desktop rules) */
    #child-header-nav .submenu-toggle,
    body.eco-has-header-image #child-header-nav .sub-menu .submenu-toggle {
        display: inline-flex !important;
        position: static !important;
        float: none !important;
        transform: none !important;
        right: auto !important;
        top: auto !important;
        /* Force inline positioning */
        align-items: center;
        justify-content: center;
        width: 44px;
        /* Apple UX standard touch target */
        height: 44px;
        margin: 0 0 0 8px !important;
        background: rgba(0, 119, 182, 0.06);
        color: #0077b6;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
        flex: 0 0 44px;
        /* Maintain perfect shape */
    }
    body.eco-has-header-image #child-header-nav .submenu-toggle:active,
    body.eco-has-header-image #child-header-nav .sub-menu .submenu-toggle:active {
        background: rgba(0, 119, 182, 0.15);
    }
    body.eco-has-header-image /* Fix the submenu toggle position on mobile */
    #child-header-nav .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        display: none;

        /* Elegant Submenu Styling */
        flex: 1 1 100%;
        /* Force to next line inside the flex-wrap parent */
        width: 100%;
        background: rgba(0, 119, 182, 0.03) !important;
        border-radius: 12px;
        margin-top: 5px;
        margin-bottom: 15px;
        padding: 5px 0 !important;
        border: 1px solid rgba(0, 119, 182, 0.05);
    }
    body.eco-has-header-image /* Sub-sub-menus (3rd level deep) */
    #child-header-nav .sub-menu .sub-menu {
        background: rgba(0, 0, 0, 0.015) !important;
        margin: 5px 10px 10px 10px;
        width: calc(100% - 20px);
        border: none;
    }
    body.eco-has-header-image #child-header-nav .menu-item-has-children.submenu-open>.sub-menu {
        display: block !important;
        animation: slideDownSubmenu 0.25s ease forwards;
    }

}


@media (min-width: 992px) {

    .navbar-toggler,
    #ecoMobileMenuBtn {
        display: none !important;
    }

    /* Il menu non va mai a capo. Vale solo da 992px in su: nel pannello a
       comparsa le voci devono poter andare a capo, altrimenti "Emergency
       plumbing" allarga il pannello oltre il viewport. */
    .main-navigation ul li a,
    .main-navigation .menu ul li a,
    #child-header-nav li a {
        white-space: nowrap;
    }

    /* Sotto i 1400 lo spazio e appena sufficiente: si stringono le voci invece di
       far crescere l'header o mandare il menu a capo. */
    .main-navigation ul,
    .main-navigation .menu ul {
        gap: 1.15rem;
    }

    .main-navigation ul li a,
    .main-navigation .menu ul li a,
    #child-header-nav li a {
        font-size: 1rem;
    }

    #ecoMobileNav {
        display: flex !important;
        flex: 1;
        justify-content: flex-end;
        align-items: center;
    }
}

@media (min-width: 1400px) {

    /* Larghezza piena: spaziatura e corpo originali. */
    .main-navigation ul,
    .main-navigation .menu ul {
        gap: 2rem;
    }

    .main-navigation ul li a,
    .main-navigation .menu ul li a,
    #child-header-nav li a {
        font-size: 1.05rem;
    }
}
