/* =========================================================
   TOKENS
   ========================================================= */
:root {
    /* Neutrals */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-grey: #555555;

    /* Secondary */
    --primary: #2c3e50;
    --primary-light: #34495e;

    /* Accents */
    --accent-green: #25D366;        /* brand green: icons, highlights, borders */
    --accent-green-strong: #0f7a45; /* text-safe green: buttons with white text (AA contrast) */
    --accent-hover: #0c6538;
    --accent-orange: #e67e22;

    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --header-h: 70px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h); /* anchor links clear the sticky header */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

:focus-visible {
    outline: 3px solid var(--accent-orange);
    outline-offset: 3px;
    border-radius: 4px;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 80px 0; }
.text-center { text-align: center; }

.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    line-height: 1.2;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-orange);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-grey);
    max-width: 600px;
    margin: 0 auto 50px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-whatsapp {
    background-color: var(--accent-green-strong);
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 122, 69, 0.3);
}

.btn-whatsapp:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* =========================================================
   HEADER & NAV
   ========================================================= */
header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i { color: var(--accent-green); font-size: 1.8rem; }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
    font-weight: 500;
    color: var(--primary);
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-green-strong); }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: 0;
    padding: 8px;
    line-height: 1;
}

/* =========================================================
   HERO
   Layers (back to front): .bg slides  ->  overlay  ->  .hero-content
   ========================================================= */
.hero {
    position: relative;
    min-height: 85vh;
    min-height: 85svh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    /* Static fallback: shows instantly, and stays if the slideshow is off or images fail */
    background:
        linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)),
        url('./images/two%20trucks.png') center / cover no-repeat,
        var(--primary);
}

.bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.2) translateX(-80px);
    animation: slideFade 16s infinite;
    will-change: opacity, transform;
}

.bg1 { background-image: url('./images/two%20trucks.png'); animation-delay: 0s; }
.bg2 { background-image: url('./images/bio.jpg');          animation-delay: 4s;  background-position: center 75%; }
.bg3 { background-image: url('./images/mixers.jpg');       animation-delay: 8s;  background-position: center 45%; }
.bg4 { background-image: url('./images/water.jpg');        animation-delay: 12s; background-position: center 75%; }

/* Dark overlay above the slides, below the text */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

@keyframes slideFade {
    0%   { opacity: 0; transform: scale(1.2) translateX(-80px); }
    10%  { opacity: 1; transform: scale(1)   translateX(0); }
    40%  { opacity: 1; transform: scale(1)   translateX(0); }
    60%  { opacity: 0; transform: scale(1.1) translateX(80px); }
    100% { opacity: 0; transform: scale(1.2) translateX(-80px); }
}

.hero-content {
    position: relative;
    max-width: 820px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0;
    animation: slideUp 0.8s ease 0.2s forwards;
}

.hero-btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    animation: slideUp 0.8s ease 0.4s forwards;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* =========================================================
   GALLERY (before / after)
   ========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 40px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-light);
}

.img-track {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.img-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.img-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s, background-color 0.2s;
}

.img-dot.active { background: var(--accent-green); transform: scale(1.3); }

.img-badge {
    position: absolute;
    top: 15px;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    z-index: 4;
    color: #fff;
    text-transform: uppercase;
}

.before-badge { left: 15px; background-color: rgba(0, 0, 0, 0.65); }
.after-badge  { left: 15px; background-color: var(--accent-green-strong); }
.img-badge { transition: opacity 0.3s; }
.product-image-wrapper:not([data-slide="1"]) .after-badge,
.product-image-wrapper[data-slide="1"] .before-badge { opacity: 0; }

.gallery-info { padding: 20px; text-align: center; }
.gallery-info h4 { color: var(--primary); font-size: 1.1rem; }
.gallery-info p  { font-size: 0.85rem; color: var(--text-grey); }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonial-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 4px 4px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.testimonial-card {
    flex: 0 0 min(320px, 85%);
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scroll-snap-align: start;
    position: relative;
}

.stars { color: #f1c40f; margin-bottom: 15px; }
.client-name { font-weight: 700; color: var(--primary); margin-top: 15px; display: block; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background:
        linear-gradient(to bottom, rgba(0, 50, 30, 0.9), rgba(0, 0, 0, 0.95)),
        url('./images/ground.png') center / cover no-repeat,
        #0b1a13;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-green);
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #c5cdd2; transition: color 0.3s, padding-left 0.3s; }
.footer-col a:hover { color: #fff; padding-left: 5px; }

.social-links { display: flex; gap: 15px; margin-top: 20px; }

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.social-links a:hover { background: var(--accent-green-strong); }

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #a3b0b3;
}

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    right: 30px;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    background-color: var(--accent-green);
    color: #fff;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    animation: pulse 2s infinite;
    cursor: pointer;
}

.float-wa:hover { transform: scale(1.1); }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70%  { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================================
   QUOTE MODAL
   Toggle with .active (or set style.display = 'flex' from JS)
   ========================================================= */
.quote-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.quote-modal.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.quote-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    border-top: 5px solid var(--accent-green);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-green);
    margin-bottom: 15px;
    opacity: 0.3;
}

.quote-btn {
    display: inline-block;
    background: linear-gradient(135deg, #0f7a45, #0a5c4f);
    color: #fff;
    border: none;
    padding: 12px 30px;
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(15, 122, 69, 0.4);
}

.quote-btn:hover { transform: scale(1.05); }

.close-quote {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    background: none;
    border: 0;
}

.close-quote:hover { color: var(--text-dark); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .section-padding { padding: 60px 0; }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 18px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        text-align: center;
    }

    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p  { font-size: 1.05rem; }
    .section-title   { font-size: 1.8rem; }

    .gallery-grid { grid-template-columns: 1fr; }

    .quote-content { padding: 30px 22px; }

    .float-wa {
        width: 54px;
        height: 54px;
        right: 18px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        font-size: 26px;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal { opacity: 1; transform: none; }

    /* Show the first slide and the hero text statically */
    .bg { animation: none; }
    .bg1 { opacity: 1; transform: none; }
    .hero-content h1,
    .hero-content p,
    .hero-btn-group { opacity: 1; animation: none; }
    .float-wa { animation: none; }
}

/* =========================================================
   ADDITIONS (used by index.html)
   ========================================================= */
.bg-white { background: #fff; }
.mt-40 { margin-top: 40px; }
.section-heading { margin-bottom: 40px; }

/* Scroll reveal: only hides content when JS is running */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.js .reveal.in-view { opacity: 1; transform: none; transition: var(--transition); }

/* Gallery arrows (created by JS) */
.swipe-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s, opacity 0.2s;
}
.swipe-arrow.left { left: 10px; }
.swipe-arrow.right { right: 10px; }
.swipe-arrow:hover:not(:disabled) { background: rgba(0, 0, 0, 0.8); }
.swipe-arrow:disabled { opacity: 0.3; cursor: default; }

/* Contact CTA */
.cta-section { background: var(--primary); color: #fff; }
.cta-section h2 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 20px; }
.cta-section p { margin-bottom: 30px; opacity: 0.9; }
.cta-section .btn-whatsapp { background: var(--accent-green); color: #0b1a13; box-shadow: none; }
.cta-section .btn-whatsapp:hover { background: #4be08a; }

/* Footer details */
.footer-col p { color: #c5cdd2; }
.footer-col li i { color: var(--accent-green); width: 1.2em; margin-right: 8px; }

/* Modals */
body.modal-open { overflow: hidden; }

@media (max-width: 768px) {
    .cta-section h2 { font-size: 1.8rem; }
}

/* =========================================================
   SERVICE EXPLORER
   ========================================================= */
.svc { display: block; }
.js .svc { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 28px; align-items: stretch; }
.svc-tabs { display: none; flex-direction: column; gap: 10px; }
.js .svc-tabs { display: flex; }
.svc-panels { display: grid; gap: 20px; }

.svc-tab {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 14px 16px; text-align: left; font: inherit; font-weight: 600;
    color: var(--primary); background: #fff; border: 2px solid transparent;
    border-radius: 14px; box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
}
.svc-tab .ico {
    flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 1.15rem; color: var(--accent-green-strong);
    background: rgba(37, 211, 102, 0.12); transition: var(--transition);
}
.svc-tab .chev { margin-left: auto; font-size: 0.8rem; opacity: 0.35; }
.svc-tab:hover { transform: translateX(4px); }
.svc-tab[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--accent-green); }
.svc-tab[aria-selected="true"] .ico { background: var(--accent-green); color: #0b1a13; }
.svc-tab[aria-selected="true"] .chev { opacity: 1; color: var(--accent-green); }

.svc-panel {
    position: relative; overflow: hidden; min-height: 380px;
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(28px, 4vw, 52px); color: #fff; border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #1c2733 100%);
    box-shadow: 0 18px 40px rgba(44, 62, 80, 0.25);
    animation: panelIn 0.4s ease;
}
.svc-panel[hidden] { display: none; }
.svc-panel::before {
    content: ''; position: absolute; width: 340px; height: 340px; right: -90px; bottom: -110px;
    border-radius: 50%; background: radial-gradient(circle, rgba(37, 211, 102, 0.28), transparent 65%);
}
.svc-bigicon { position: absolute; right: 28px; bottom: 12px; font-size: clamp(7rem, 16vw, 12rem); color: rgba(255, 255, 255, 0.06); pointer-events: none; }
.svc-panel > :not(.svc-bigicon) { position: relative; z-index: 1; }
.svc-panel h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin-bottom: 14px; }
.svc-panel .lead { max-width: 52ch; margin-bottom: 22px; color: #dbe3ea; font-size: 1.05rem; }
.svc-list { display: grid; gap: 10px; margin-bottom: 30px; }
.svc-list li { display: flex; gap: 12px; align-items: flex-start; }
.svc-list i { color: var(--accent-green); margin-top: 0.35em; }
.svc-panel .btn-whatsapp { align-self: flex-start; background: var(--accent-green); color: #0b1a13; box-shadow: none; }
.svc-panel .btn-whatsapp:hover { background: #4be08a; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   GALLERY: dimmer + blur so badges/arrows read on any photo
   ========================================================= */
.product-image-wrapper::after {
    content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.6) 100%);
}
.img-badge {
    border: 1px solid rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.before-badge { background-color: rgba(0, 0, 0, 0.6); }
.swipe-arrow {
    background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.img-dots {
    padding: 6px 10px; border-radius: 20px; background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* =========================================================
   HEADER CTA, HERO BUTTON
   ========================================================= */
.nav-links { align-items: center; }
.nav-links .nav-cta {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 50px;
    background: var(--accent-green-strong); color: #fff; font-weight: 600;
}
.nav-links a.nav-cta:hover { background: var(--accent-hover); color: #fff; }
.btn-light { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.btn-light:hover { background: #fff; color: var(--primary); }
.hero-btn-group .btn { flex: 1 1 200px; max-width: 280px; }
.quote-btn { text-decoration: none; }

/* =========================================================
   FLUID SIZING & EVERY SCREEN
   ========================================================= */
.section-padding { padding: clamp(56px, 8vw, 100px) 0; }
.section-title { font-size: clamp(1.7rem, 3.2vw + 0.6rem, 2.4rem); }
.hero-content h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.75rem); }
.hero-content p { font-size: clamp(1rem, 1.2vw + 0.7rem, 1.25rem); }
.cta-section h2 { font-size: clamp(1.7rem, 3.5vw + 0.5rem, 2.5rem); }

@media (min-width: 900px) {
    .testimonial-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); overflow: visible; }
    .testimonial-card { flex: none; }
}

@media (max-width: 992px) {
    .js .svc { grid-template-columns: 230px 1fr; }
    .svc-tab { padding: 12px; gap: 10px; }
    .svc-tab .chev { display: none; }
}

@media (max-width: 768px) {
    .js .svc { grid-template-columns: 1fr; gap: 16px; }
    .svc-tabs {
        flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity;
        margin: 0 -20px; padding: 4px 20px 10px; -webkit-overflow-scrolling: touch;
    }
    .svc-tab { flex: 0 0 auto; width: auto; white-space: nowrap; scroll-snap-align: start; padding: 10px 14px; }
    .svc-tab:hover { transform: none; }
    .svc-tab .ico { flex-basis: 34px; height: 34px; font-size: 0.95rem; border-radius: 10px; }
    .svc-panel { min-height: 0; }
    .svc-panel .btn { align-self: stretch; }
    .nav-links .nav-cta { justify-content: center; }
}

@media (max-width: 380px) {
    .container { padding: 0 16px; }
    .logo { font-size: 1.25rem; }
    .btn { padding: 12px 22px; }
    .hero-btn-group .btn { max-width: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 56px 0; }
}

@media (min-width: 1400px) { html { font-size: 17px; } .container { max-width: 1320px; } }
@media (min-width: 1920px) { html { font-size: 18px; } .container { max-width: 1520px; } }

/* =========================================================
   BLOG / PORTFOLIO PAGE
   ========================================================= */
.hero.hero-sm { min-height: 55vh; min-height: 55svh; }
.blog-grid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }

.gallery-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 6px; }
.gallery-meta i { color: var(--accent-green-strong); margin-right: 4px; }
.gallery-desc { margin-top: 8px; font-size: 0.9rem; color: var(--text-grey); }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--text-grey); }
.empty-state i { font-size: 2.5rem; color: var(--accent-green); margin-bottom: 14px; }
.empty-state h3 { color: var(--primary); margin-bottom: 6px; }

/* Why Clients Trust Us */
.trust-panel {
    position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(3, 1fr);
    color: #fff; border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #1c2733 100%);
    box-shadow: 0 18px 40px rgba(44, 62, 80, 0.25);
}
.trust-panel::before {
    content: ''; position: absolute; width: 380px; height: 380px; left: -120px; top: -160px;
    border-radius: 50%; background: radial-gradient(circle, rgba(37, 211, 102, 0.25), transparent 65%);
    pointer-events: none;
}
.trust-item { position: relative; padding: clamp(28px, 4vw, 48px); text-align: center; }
.trust-item + .trust-item { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.trust-icon {
    width: 64px; height: 64px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center;
    border-radius: 18px; font-size: 1.6rem; color: #0b1a13; background: var(--accent-green);
    transform: rotate(-6deg); transition: transform 0.3s;
}
.trust-item:hover .trust-icon { transform: rotate(0); }
.trust-item h3 { font-size: 1.25rem; margin-bottom: 10px; }
.trust-item p { max-width: 34ch; margin: 0 auto; font-size: 0.95rem; color: #dbe3ea; }

@media (max-width: 768px) {
    .trust-panel { grid-template-columns: 1fr; }
    .trust-item + .trust-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
}

/* Header login chip */
.nav-links li:has(#authButtonContainer:empty) { display: none; }
.auth-dropdown { position: relative; }
.user-profile {
    display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; font: inherit; cursor: pointer;
    background: var(--bg-light); border: 1px solid #dfe5ea; border-radius: 50px; color: var(--primary);
}
.user-avatar {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.85rem; font-weight: 600;
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.user-name { font-size: 0.85rem; font-weight: 600; }
.user-status { font-size: 0.7rem; color: var(--accent-green-strong); }
.user-profile .fa-chevron-down { font-size: 0.65rem; opacity: 0.6; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; padding: 8px;
    background: #fff; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); z-index: 1100;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none;
    border-radius: 8px; font: inherit; font-size: 0.9rem; color: var(--text-dark); text-align: left; word-break: break-word;
}
.dropdown-item i { width: 1.2em; color: var(--text-grey); }
.dropdown-item.logout { cursor: pointer; color: #b3261e; }
.dropdown-item.logout i { color: #b3261e; }
.dropdown-item.logout:hover { background: #fdecea; }
.dropdown-divider { border: 0; border-top: 1px solid #eef1f3; margin: 6px 0; }


/* ===== Lead capture popup ===== */
.lead-content { text-align: left; }
.lead-content h3 { color: #2c3e50; font-size: 1.25rem; margin-bottom: 6px; }
.lead-sub { color: #5b6e77; font-size: .9rem; margin-bottom: 12px; }
.lead-service {
    display: inline-block;
    background: #e4f4ea;
    color: #17803d;
    font-size: .8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.lead-form label { display: block; font-size: .85rem; font-weight: 500; color: #26414a; margin: 10px 0 6px; }
.lead-form input[type="text"],
.lead-form input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #dbe4e9;
    border-radius: 10px;
    font: inherit;
    font-size: 16px; /* stops iPhone auto-zoom */
    color: #16323a;
    background: #fff;
}
.lead-form input:focus { outline: none; border-color: #0f766e; box-shadow: 0 0 0 4px #e0f2ef; }
.lead-hp { position: absolute !important; left: -9999px; height: 0; opacity: 0; }
.lead-error { color: #b83232; font-size: .85rem; min-height: 1.2em; margin: 8px 0; }
.lead-form .quote-btn { width: 100%; justify-content: center; }
.lead-skip {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: none;
    border: 0;
    color: #5b6e77;
    font: inherit;
    font-size: .85rem;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 768px) {
    .auth-dropdown { display: flex; flex-direction: column; align-items: center; }
    .dropdown-menu { position: static; width: 100%; margin-top: 10px; box-shadow: none; border: 1px solid #eef1f3; }
}

/* =========================================================
   SERVICE TABS ON PHONES: wrapping grid (no clipped names)
   ========================================================= */
@media (max-width: 768px) {
    .js .svc-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .svc-tab {
        width: 100%;
        min-width: 0;
        white-space: normal;
        padding: 10px 12px;
        gap: 10px;
        font-size: 0.92rem;
        line-height: 1.25;
        text-align: left;
    }

    .svc-tab > span:not(.ico) {
        min-width: 0;
        overflow-wrap: break-word;
    }

    /* 5 tabs: let the last one span the full width so the grid looks balanced */
    .svc-tab:last-child { grid-column: 1 / -1; }
}

@media (max-width: 400px) {
    .svc-tab { padding: 9px 10px; gap: 8px; font-size: 0.88rem; }
    .svc-tab .ico { flex-basis: 30px; height: 30px; font-size: 0.85rem; }
}