/* --- Global Settings & Typography --- */
:root {
    --color-primary: #3a5a40; /* Deep, earthy green */
    --color-secondary: #264653; /* Calming, darker blue */
    --color-accent: #e76f51; /* Warm terracotta for buttons */
    --color-background: #F8F5F2; /* Warm, inviting off-white */
    --color-text: #3d3d3d; /* Softer dark gray */
    --font-heading: 'Lora', serif;
    --font-body: 'Noto Sans', sans-serif;
    --border-radius: 12px;
    --shadow: 0 5px 20px rgba(0,0,0,0.07);
}

/* The html background shows in the iOS rubber-band overscroll area; setting it
   to the banner/footer color makes the browser chrome blend top and bottom. */
html {
    background-color: var(--color-secondary);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    /* --- FONT CHANGE 1: Increased base font size for better readability --- */
    font-size: 19px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevents horizontal scrollbar */
    -webkit-tap-highlight-color: transparent;
}

/* iOS Safari paints the bottom safe-area inset with the body background
   (cream), not the html canvas. Fill just that bottom strip with the
   footer color so it matches. Height is 0 on devices without an inset, so
   desktop and non-notch devices are unaffected. */
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: env(safe-area-inset-bottom);
    background: var(--color-secondary);
    pointer-events: none;
    z-index: 1000;
}

/* Prevent the iOS auto-zoom on input focus (needs >=16px) and keep words from
   forcing horizontal overflow on narrow screens. */
h1, h2, h3, h4, p, a, li, blockquote {
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 3.8rem; }
h2 { font-size: 3rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.5rem; color: var(--color-secondary); }

/* --- FONT CHANGE 2: Gave all standard paragraphs a larger default size --- */
p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem; /* Makes standard text more readable */
}

.lead-text { font-size: 1.4rem; color: #555; max-width: 800px; margin-left: auto; margin-right: auto; margin-bottom: 2.5rem; }
.text-center { text-align: center; }

/* --- On-Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header & Navigation --- */
.banner { background: var(--color-secondary); color: white; text-align: center; padding: 0.75rem; font-size: 1.2rem; font-weight: 500; padding-top: calc(0.75rem + env(safe-area-inset-top)); padding-left: calc(0.75rem + env(safe-area-inset-left)); padding-right: calc(0.75rem + env(safe-area-inset-right)); }
.header { box-sizing: border-box; width: 100%; background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); padding: 1rem 2rem; padding-left: calc(2rem + env(safe-area-inset-left)); padding-right: calc(2rem + env(safe-area-inset-right)); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: auto; position: relative; }
.logo-img { width: 70px; height: 70px; object-fit: contain; }
.nav-menu {
    /* Centering the nav menu */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* MODIFICATION: Prevents the links from wrapping */
    white-space: nowrap;
}
.nav-menu a { color: var(--color-secondary); text-decoration: none; margin: 0 1rem; font-size: 1.15rem; font-weight: 500; transition: color 0.2s; }
.nav-menu a:hover { color: var(--color-accent); }
.header-right { display: flex; align-items: center; gap: 0rem;}
.header-social a { color: var(--color-secondary); font-size: 1.5rem; margin: 0 0.5rem; transition: color 0.2s; }
.header-social a:hover { color: var(--color-accent); }

/* Phone number in top bar styled like nav menu */
.nav-menu-phone {
    color: var(--color-secondary);
    text-decoration: none;
    margin: 0 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-menu-phone:hover {
    color: var(--color-accent);
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-block; padding: 1.1rem 2.2rem; border-radius: var(--border-radius); text-decoration: none; font-size: 1.2rem; font-weight: bold; margin: 0.5rem; transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--color-accent); color: white; }
.btn-secondary { background: transparent; color: white; border-color: white; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(231, 111, 81, 0.4); background-color: #e96340; }
.btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); background-color: rgba(255,255,255,0.1); }

/* --- Page Sections --- */
.content-section { padding: 6rem 2rem; max-width: 1200px; margin: auto; }
.alt-bg { background-color: #ffffff; border-radius: var(--border-radius); box-shadow: var(--shadow); }

.policy-document-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}

.policy-document-page h1 {
    margin: 0.35rem 0 1rem;
}

.policy-document-page .lead-text {
    margin-bottom: 1.5rem;
}

.policy-document-date {
    margin: 0 0 2rem;
    color: #5f6660;
    font-weight: 600;
}

.policy-document-help {
    margin: 2rem auto 0;
    max-width: 630px;
    color: #5f6660;
}

/* --- Hero Section (Home Page) --- */
.hero-section { height: 85vh; background-image: url('/static/img/home-exterior-hero-mobile.webp'); background-size: cover; background-position: center; background-attachment: fixed; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.hero-overlay { background-color: rgba(45, 58, 46, 0.7); padding: 4rem; border-radius: var(--border-radius); }
.hero-title { font-size: 4.5rem; margin: 0; color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 1.6rem; max-width: 700px; margin: 1.5rem 0 2.5rem 0; }

/* --- Value Propositions --- */
.value-props-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.value-prop { text-align: center; background: var(--color-background); border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s; }
.value-prop:hover { transform: translateY(-10px); }
.value-prop-img { height: 250px; background-size: cover; background-position: center; }
.value-prop h3 { color: var(--color-secondary); margin: 1.5rem 0 0.5rem 0; }
.value-prop p { padding: 0 1.5rem 1.5rem 1.5rem; margin: 0; }

/* --- Glimpse Inside Section --- */
.glimpse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.glimpse-item { height: 350px; border-radius: var(--border-radius); background-size: cover; background-position: center; box-shadow: var(--shadow); transition: transform 0.3s; }
.glimpse-item:hover { transform: scale(1.03); }

/* --- Testimonial Section --- */
.testimonial-section { background-size: cover; background-attachment: fixed; background-position: center; color: white; text-align: center; position: relative; border-radius: var(--border-radius); overflow: hidden; }
.testimonial-overlay { background: rgba(38, 70, 83, 0.85); padding: 6rem 2rem; }
.testimonial-section blockquote { font-family: var(--font-heading); font-size: 2.2rem; max-width: 800px; margin: 0 auto; border: none; }
.testimonial-section cite { display: block; margin-top: 2rem; font-style: normal; font-weight: 500; font-size: 1.3rem; }

/* --- FAQ Accordion --- */
.faq-accordion { max-width: 900px; margin: auto; }
.faq-item { background: #fff; margin-bottom: 1rem; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.faq-question { background: none; border: none; width: 100%; text-align: left; padding: 1.8rem 1.5rem; font-size: 1.4rem; font-weight: bold; cursor: pointer; color: var(--color-secondary); position: relative; }
.faq-question::after { content: '+'; position: absolute; right: 1.5rem; font-size: 2.2rem; transition: transform 0.2s; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-answer p { padding: 0 1.5rem 1.8rem 1.5rem; margin: 0; }

/* --- Final CTA Section --- */
.cta-section { background: var(--color-primary); color: white; }
.cta-section h2, .cta-section p { color: white; }
.cta-section { margin-bottom: 48px; }

/* --- Footer --- */
.footer { background: var(--color-secondary); color: #e0e0e0; padding: 5rem 2rem 0 2rem; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1400px; margin: auto; gap: 3rem; }
.footer-column { flex: 1; min-width: 280px; }
.footer-column h4,
.footer-heading { color: white; font-size: 1.6rem; margin: 0 0 1.5rem; text-align: left; }
.footer-column a { color: #f4a261; text-decoration: none; display: block; margin-bottom: 0.8rem; transition: color 0.2s, transform 0.2s; font-size: 1.1rem; }
.footer-column a:hover { color: white; transform: translateX(5px); }
.footer-logo { width: 90px; height: 90px; object-fit: contain; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 1.5rem; margin-top: 1rem; }
.footer-social a { color: white; font-size: 1.8rem; transition: color 0.2s, transform 0.2s; }
.footer-social a:hover { color: #f4a261; transform: translateY(-3px); }
.footer-bottom { text-align: center; padding: 2rem; margin-top: 3rem; border-top: 1px solid #4a6370; }
.footer-bottom span { font-size: 1.1rem; }

/* --- Page Specifics (Old rules, kept for reference) --- */
.page-header { text-align: center; margin-bottom: 4rem; padding: 4rem 1.5rem; background-color: #fff; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.service-card { background: #ffffff; padding: 2.5rem; border-radius: var(--border-radius); box-shadow: var(--shadow); }

/* --- FONT CHANGE 3: Increased font size for form elements --- */
form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--color-secondary);
    font-size: 1.15rem; /* Increased size */
}
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form select,
form textarea {
    width: 100%;
    padding: 1.1rem; /* Increased padding */
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1.15rem; /* Increased size */
    box-sizing: border-box;
}
form button { width: 100%; }
fieldset { border: none; padding: 0; margin-bottom: 1.5rem; }
legend { font-size: 1.25rem; font-weight: bold; color: var(--color-secondary); margin-bottom: 1rem; } /* Increased size */
.radio-group { display: flex; align-items: center; margin-bottom: 0.8rem; }
.radio-group input[type="radio"] { margin-right: 0.8rem; }
.form-note { color: #555; font-size: 1rem; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    /* --- FONT CHANGE 4: Adjusted responsive font size --- */
    body { font-size: 18px; }
    .nav-menu { display: none; }
    .header { padding: 0.6rem 1rem; padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); }
    .header.scrolled { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .header-content { gap: 0.75rem; }
    .logo-img { width: 52px; height: 52px; }
    .header.scrolled .logo-img { width: 48px; height: 48px; }
    .header-right { gap: 0.6rem; min-width: 0; }
    .header-social { display: none; } /* moved into the mobile drawer */
    .nav-menu-phone { display: none; } /* moved into the mobile drawer + FAB */
    .nav-toggle { display: inline-flex; }
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    .hero-title { font-size: 3.2rem; }
    .split-section, .split-section.reverse { flex-direction: column; }
    .glimpse-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
    .hero-section { background-image: url('/static/img/home-exterior-hero.webp'); }
}

/* The desktop navigation needs more horizontal room than a tablet-sized
   viewport provides. Switch only the header to its existing menu control
   before the centered links can overlap the phone and social controls. */
@media (max-width: 1240px) {
    .header { padding: 0.6rem 1rem; padding-left: calc(1rem + env(safe-area-inset-left)); padding-right: calc(1rem + env(safe-area-inset-right)); }
    .header.scrolled { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .header-content { gap: 0.75rem; }
    .logo-img { width: 52px; height: 52px; }
    .header.scrolled .logo-img { width: 48px; height: 48px; }
    .header-right { gap: 0.6rem; min-width: 0; }
    .nav-menu,
    .header-social,
    .nav-menu-phone { display: none; }
    .nav-toggle { display: inline-flex; }
}

/* --- NEW: Floating Action Button --- */
.floating-cta-btn {
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom));
    right: calc(30px + env(safe-area-inset-right));
    background-color: var(--color-primary); /* Use primary green for high contrast */
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px; /* Make it a pill shape */
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    z-index: 1001; /* Above the header */
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: pulse 2s infinite; /* Add the eye-catching animation */
}

.floating-cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(58, 90, 64, 0.5);
    animation-play-state: paused; /* Pause animation on hover */
}

/* --- NEW: Animation for the Floating Button --- */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 10px 30px rgba(58, 90, 64, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
}

/* =====================================================================
   PREMIUM POLISH LAYER
   Smooth micro-interactions, richer reveals, and connective CTAs.
   ===================================================================== */

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1100;
    pointer-events: none;
}
.scroll-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--color-accent), #f4a261);
    box-shadow: 0 0 10px rgba(231, 111, 81, 0.5);
    transition: width 0.1s linear;
}

/* --- Header: subtle shrink + lift on scroll --- */
.header { transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; }
.header.scrolled {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}
.logo-img { transition: width 0.3s ease, height 0.3s ease; }
.header.scrolled .logo-img { width: 56px; height: 56px; }
.nav-menu a { position: relative; }
/* Animated underline for nav links */
.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.nav-menu a:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Animation variants for on-scroll reveals --- */
.animate-on-scroll.from-left  { transform: translateX(-40px); }
.animate-on-scroll.from-right { transform: translateX(40px); }
.animate-on-scroll.zoom-in    { transform: scale(0.94); }
.animate-on-scroll.from-left.visible,
.animate-on-scroll.from-right.visible,
.animate-on-scroll.zoom-in.visible { transform: none; }

/* --- Button micro-interactions --- */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
/* Keep mixed solid/outline button rows on a shared baseline */
.btn-primary, .btn-secondary, .btn-ghost {
    vertical-align: middle;
    line-height: 1.4;
}
/* Soft shine sweep on hover */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 130%; }

/* Inline text CTA (connective links between sections/pages) */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: gap 0.25s ease, color 0.25s ease;
}
.btn-text i, .btn-text .arrow { transition: transform 0.25s ease; }
.btn-text:hover { color: var(--color-primary); gap: 0.85rem; }
.btn-text:hover i, .btn-text:hover .arrow { transform: translateX(4px); }

/* Dark-on-light secondary button for light backgrounds */
.btn-ghost {
    display: inline-block;
    padding: 1.1rem 2.2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem;
    cursor: pointer;
    color: var(--color-primary);
    background: transparent;
    border: 2px solid var(--color-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn-ghost:hover {
    transform: translateY(-3px);
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 6px 20px rgba(58, 90, 64, 0.3);
}

/* --- Hero entrance + scroll cue --- */
.hero-overlay { animation: heroFade 1s ease-out both; }
@keyframes heroFade { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

.scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}
.scroll-cue .chevron {
    width: 22px;
    height: 22px;
    border-right: 2px solid rgba(255,255,255,0.85);
    border-bottom: 2px solid rgba(255,255,255,0.85);
    transform: rotate(45deg);
    animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(6px, 6px); opacity: 1; }
}

/* --- Stats Band --- */
.stats-band {
    background: var(--color-primary);
    color: #fff;
    padding: 3.5rem 2rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.stat-item { padding: 0.5rem; }
.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.4rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
}
.stat-label {
    display: block;
    margin-top: 0.6rem;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.02em;
}
.stat-item + .stat-item { border-left: 1px solid rgba(255,255,255,0.18); }

/* --- Value Prop card: hover reveal + connective link --- */
.value-prop {
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.value-prop:hover { box-shadow: 0 18px 40px rgba(0,0,0,0.12); }
.value-prop-img {
    position: relative;
    overflow: hidden;
}
.value-prop-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58,90,64,0.55), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.value-prop:hover .value-prop-img::after { opacity: 1; }
.value-prop-tag {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
    background: rgba(255,255,255,0.92);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.value-prop:hover .value-prop-tag { transform: translateY(0); opacity: 1; }
.value-prop-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 1.5rem 1.5rem;
}
.value-prop-body h3 { margin: 1.5rem 0 0.5rem; }
.value-prop-body p { padding: 0; flex-grow: 1; }
.value-prop-body .btn-text { margin-top: 0.5rem; }

/* --- Glimpse grid: caption reveal on hover --- */
.glimpse-item {
    position: relative;
    overflow: hidden;
}
.glimpse-item::after {
    content: attr(data-caption);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(38,70,83,0.85), transparent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-align: left;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.glimpse-item:hover::after { transform: translateY(0); }
.glimpse-item:hover { transform: scale(1.03); box-shadow: 0 16px 36px rgba(0,0,0,0.18); }

/* --- Section connector CTA row --- */
.section-cta-row {
    margin-top: 2.5rem;
    text-align: center;
}

/* --- Back to Top button --- */
.back-to-top {
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom));
    left: calc(30px + env(safe-area-inset-left));
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--color-secondary);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
    z-index: 1001;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary); transform: translateY(-4px); }

/* Card lift used across service/safety/pathway grids */
.service-card, .pathway-card, .safety-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover, .pathway-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
    border-color: rgba(231, 111, 81, 0.4);
}
.safety-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.4);
}
.service-card i { transition: transform 0.3s ease; display: inline-block; }
.service-card:hover i { transform: scale(1.15) translateY(-2px); }

@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .stat-item:nth-child(odd) { border-left: none; }
    .stat-item:nth-child(3) { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 1.5rem; }
    .stat-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 1.5rem; }
    .stat-number { font-size: 2.8rem; }
    /* Back-to-top stays bottom-left; the tour FAB is bottom-right, so they
       never collide on small screens. */
}

/* --- Respect reduced motion preferences --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .floating-cta-btn { animation: none; }
    .animate-on-scroll { opacity: 1; transform: none; }
    .scroll-cue .chevron { animation: none; }
}

/* =====================================================================
   RESPONSIVE LAYER — burger menu, mobile drawer, safe areas, breakpoints
   ===================================================================== */

/* Active nav link (desktop) */
.nav-menu a.active { color: #b84d36; }
.nav-menu a.active::after { transform: scaleX(1); transform-origin: left; }

/* --- Burger button (hidden on desktop, shown <=992 via media query) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
}
.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: var(--color-secondary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Mobile drawer + backdrop --- */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: rgba(20, 28, 24, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.32s ease, visibility 0.32s ease;
}
body.nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(84vw, 360px);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    padding-top: calc(1.5rem + env(safe-area-inset-top));
    padding-right: calc(1.5rem + env(safe-area-inset-right));
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
body.nav-open .mobile-nav { transform: translateX(0); }

.mobile-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.mobile-nav-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
}
.mobile-nav-close {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--color-secondary);
    cursor: pointer;
}
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-links a {
    display: block;
    padding: 0.9rem 0.5rem;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 3px solid transparent;
    transition: color 0.2s ease, padding-left 0.2s ease, border-color 0.2s ease;
}
.mobile-nav-links a:hover,
.mobile-nav-links a:focus-visible {
    color: var(--color-accent);
    padding-left: 0.9rem;
}
.mobile-nav-links a.active {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    padding-left: 0.9rem;
}
.mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.75rem;
    height: auto;
    padding: 0.85rem 1rem;
    line-height: 1.35;
    text-align: center;
    margin: 1.5rem 0 0;
    box-sizing: border-box;
}
.mobile-nav-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem;
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
}
.mobile-nav-social {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}
.mobile-nav-social a {
    color: var(--color-secondary);
    font-size: 1.7rem;
    transition: color 0.2s ease, transform 0.2s ease;
}
.mobile-nav-social a:hover { color: var(--color-accent); transform: translateY(-3px); }

/* --- Footer safe areas --- */
.footer {
    padding-left: calc(2rem + env(safe-area-inset-left));
    padding-right: calc(2rem + env(safe-area-inset-right));
}
.footer-bottom { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }

/* --- Tablet / iPad (<=992 handled above for header; grids here) --- */
@media (max-width: 992px) {
    /* Defined after the base .nav-toggle{display:none} so this wins on mobile */
    .nav-toggle { display: inline-flex; }
    .nav-menu { display: none; }
    .header-social { display: none; }
    .nav-menu-phone { display: none; }
    .value-props-grid { gap: 2rem; }
    .glimpse-grid { gap: 1rem; }
}

/* This follows the base `.nav-toggle` rule so the menu control remains
   available throughout the intermediate laptop range. */
@media (min-width: 993px) and (max-width: 1240px) {
    .nav-toggle { display: inline-flex; }
}

/* --- Disable fixed backgrounds on mobile (iOS jank + parallax bug) --- */
@media (max-width: 768px) {
    .hero-section,
    .testimonial-section,
    .about-header,
    .closing-section,
    .gallery-header,
    .blog-header,
    .article-header {
        background-attachment: scroll;
    }
}

/* --- Phones --- */
@media (max-width: 768px) {
    body { font-size: 17px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; margin-bottom: 1.5rem; }
    h3 { font-size: 1.7rem; }
    .lead-text { font-size: 1.2rem; }
    .content-section { padding: 4rem 1.25rem; }
    .policy-document-page { padding: 4rem 1.25rem; }

    .hero-section { height: auto; min-height: 86vh; background-position: center; padding: 0 1rem; box-sizing: border-box; }
    .hero-overlay { padding: 2.5rem 1.5rem; width: 100%; max-width: 100%; box-sizing: border-box; }
    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1.2rem; }

    /* Full-width, easy-to-tap buttons in primary CTA areas */
    .hero-overlay .btn-primary, .hero-overlay .btn-secondary,
    .cta-section .btn-primary, .cta-section .btn-secondary,
    .services-cta .btn-primary, .services-cta .btn-ghost,
    .gallery-tour-cta .btn-primary, .gallery-tour-cta .btn-secondary,
    .blog-index-cta .btn-primary, .blog-index-cta .btn-ghost,
    .article-inline-cta .btn-primary, .article-inline-cta .btn-ghost,
    .social-cta-section .btn-primary {
        display: block;
        width: 100%;
        max-width: 360px;
        margin: 0.5rem auto;
        box-sizing: border-box;
    }

    /* Page headers are flex columns with centered items, which lets children
       size to content and overflow on narrow screens. Constrain them. */
    .about-header h1, .about-header .lead-text,
    .gallery-header h1, .gallery-header .lead-text,
    .blog-header h1, .blog-header .lead-text,
    .contact-header h1, .contact-header .lead-text,
    .services-header h1, .services-header .lead-text,
    .services-header-content {
        max-width: 100%;
    }
    .about-header h1, .gallery-header h1, .blog-header h1, .contact-header h1 {
        font-size: 2.4rem;
    }

    .testimonial-section blockquote { font-size: 1.6rem; }
    .testimonial-overlay { padding: 4rem 1.5rem; }
    .footer { padding: 3rem 1.25rem 0; padding-left: calc(1.25rem + env(safe-area-inset-left)); padding-right: calc(1.25rem + env(safe-area-inset-right)); }
    .footer-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        max-width: 520px;
    }
    .footer-column {
        min-width: 0;
        width: 100%;
    }
    .footer-column + .footer-column {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }
    .footer-brand {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        align-items: center;
        gap: 1.25rem;
    }
    .footer-logo {
        width: 84px;
        height: 84px;
        margin: 0;
    }
    .footer-brand p {
        margin: 0;
        font-size: 1rem;
        line-height: 1.65;
    }
    .footer-heading {
        margin-bottom: 1rem;
        font-size: 1.45rem;
    }
    .footer-link-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 1rem;
    }
    .footer-link-list a {
        margin: 0;
        padding: 0.2rem 0;
        font-size: 1rem;
        line-height: 1.45;
    }
    .footer-contact-details {
        margin: 0;
        font-size: 1rem;
        line-height: 1.65;
    }
    .footer-contact-details > * {
        display: block;
    }
    .footer-contact-details a {
        width: fit-content;
        max-width: 100%;
        margin: 0.35rem 0 0;
        overflow-wrap: anywhere;
    }
    .footer-social {
        margin-top: 1.25rem;
    }
    .footer-bottom {
        margin-top: 2rem;
        min-height: 52px;
        padding: 1.5rem 0 1.5rem 4.5rem;
        box-sizing: border-box;
        text-align: left;
    }
    .footer-bottom span {
        font-size: 0.95rem;
    }
    .faq-question { font-size: 1.2rem; padding: 1.4rem 3rem 1.4rem 1.25rem; }
    .floating-cta-btn { padding: 0.9rem 1.4rem; font-size: 1rem; }
}

/* --- Small phones --- */
@media (max-width: 480px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.8rem; }
    .hero-title { font-size: 2.1rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .lead-text { font-size: 1.1rem; }
    .stats-band { padding: 2.5rem 1.25rem; }
    .stats-grid { gap: 1.75rem 0.75rem; }
    .stat-number { font-size: 2.4rem; }
    .stat-label { font-size: 0.95rem; }
}

/* --- Circular icon FAB on small screens (keeps it out of the way) --- */
@media (max-width: 560px) {
    .floating-cta-btn {
        width: 60px;
        height: 60px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    .floating-cta-btn .floating-cta-label { display: none; }
    .floating-cta-btn i { margin: 0; font-size: 1.45rem; }
    .back-to-top { width: 48px; height: 48px; }
}
