/* ============================================================
   Wessex Chimneys — Main Stylesheet
   Off-white background, charcoal text, lime green accents
   Mobile-first responsive design
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green:       #7ec31b;
    --green-dark:  #68a615;
    --green-light: #ecf7d6;
    --charcoal:    #2c2c2c;
    --grey-dark:   #444444;
    --grey-mid:    #666666;
    --grey-light:  #999999;
    --border:      #dcdcdc;
    --bg:          #f8f8f6;
    --white:       #ffffff;
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
    --radius:      6px;
    --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --max-width:   1160px;
    --transition:  0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--charcoal);
    margin-bottom: 0.5em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1em; }
ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.3em; }

/* --- Skip Link --- */
.skip-link {
    position: absolute; top: -100%; left: 0;
    background: var(--green); color: var(--white);
    padding: 0.5em 1em; font-weight: 600; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75em 1.75em;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    text-align: center;
    line-height: 1.4;
}
.btn-primary {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--green-dark);
    border-color: var(--green-dark);
}
.btn-outline:hover, .btn-outline:focus {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}
.btn-sm { padding: 0.5em 1.2em; font-size: 0.9rem; }
.btn-lg { padding: 0.9em 2.2em; font-size: 1.1rem; }

/* --- Site Header --- */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--green);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.header-logo a {
    display: block;
    text-decoration: none;
    line-height: 0;
}
.site-logo {
    display: block;
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.header-contact { display: none; }
.header-phone,
.header-email {
    display: flex; align-items: center; gap: 0.4rem;
    color: var(--charcoal); font-weight: 600; font-size: 1rem;
    white-space: nowrap;
}
.header-phone:hover,
.header-email:hover { color: var(--green); }

/* --- Mobile Nav Toggle --- */
.nav-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px; background: none; border: none;
    cursor: pointer; padding: 0;
}
.nav-toggle span {
    display: block; height: 2px; background: var(--charcoal);
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- Main Nav --- */
.main-nav {
    background: var(--charcoal);
    display: none;
}
.main-nav.open { display: block; }
.nav-list {
    list-style: none; padding: 0; margin: 0;
}
.nav-list > li > a {
    display: block; padding: 0.75rem 1.25rem;
    color: var(--white); font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background var(--transition);
}
.nav-list > li > a:hover { background: rgba(255,255,255,0.1); color: var(--green); }

/* Current-page highlight (works on every nav link except the Contact CTA). */
.nav-list > li > a.active {
    color: var(--green);
    background: rgba(255,255,255,0.06);
    box-shadow: inset 4px 0 0 var(--green);
}

/* Contact "Get in touch" CTA — outlined by default so it reads as a button,
   not as the current-page indicator. Becomes solid green only on the
   Contact page itself. */
.nav-cta {
    color: var(--green) !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 2px var(--green);
}
.nav-cta:hover { background: rgba(135, 200, 50, 0.12) !important; color: var(--green) !important; }
.nav-cta.active {
    background: var(--green) !important;
    color: var(--white) !important;
    box-shadow: none;
}
.nav-cta.active:hover { background: var(--green-dark) !important; color: var(--white) !important; }

.dropdown { display: none; list-style: none; padding: 0; background: #3a3a3a; }
.has-dropdown.open > .dropdown { display: block; }
.dropdown li a {
    display: block; padding: 0.6rem 2rem;
    color: #ccc; font-size: 0.92rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown li a.active {
    color: var(--green);
    background: rgba(255,255,255,0.06);
    box-shadow: inset 4px 0 0 var(--green);
}
.dropdown li a:hover { color: var(--green); background: rgba(255,255,255,0.05); }

/* --- Sections --- */
.section { padding: 4rem 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--charcoal); color: var(--white); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--white); }
.section-dark a { color: var(--green); }
.section-green { background: var(--green); color: var(--white); }
.section-green h2, .section-green p { color: var(--white); }

.section-header { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section-header p { color: var(--grey-dark); font-size: 1.05rem; }

/* --- Hero --- */
.hero {
    background: var(--charcoal);
    color: var(--white);
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--charcoal) 60%, #3a4a2a 100%);
    opacity: 0.85; z-index: 1;
}
.hero.has-media::before {
    background: linear-gradient(120deg, rgba(20,20,20,0.78) 0%, rgba(30,40,15,0.55) 100%);
    opacity: 1;
}
.hero-media {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    background: var(--charcoal);
}
.hero-media img, .hero-media video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
/* <picture> wrapper around <img> – behave as the img would for layout */
.hero-media picture,
.gallery-item picture,
.about-strip-img picture,
.service-card-img picture { display: block; width: 100%; height: 100%; }
.hero-media picture img { width: 100%; height: 100%; object-fit: cover; }
.hero-inner { position: relative; z-index: 2; }
.hero-badge {
    display: inline-block;
    background: var(--green); color: var(--white);
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0.3em 0.9em;
    border-radius: 20px; margin-bottom: 1.2rem;
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 560px; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-trust { margin-top: 2.5rem; }
.trust-badges {
    display: flex; flex-wrap: wrap; gap: 1.2rem;
    list-style: none; padding: 0;
}
.trust-badges li {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.9rem; color: rgba(255,255,255,0.8);
}
.trust-badges li::before {
    content: '✓';
    width: 20px; height: 20px; line-height: 20px;
    background: var(--green); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: var(--white);
    flex-shrink: 0;
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 1.75rem;
    transition: box-shadow var(--transition), transform var(--transition);
    border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
    width: 48px; height: 48px;
    background: var(--green-light); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.card-icon svg { color: var(--green-dark); }
.card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.card p { color: var(--grey-dark); font-size: 0.95rem; margin-bottom: 1rem; }
.card-link { font-weight: 600; color: var(--green-dark); font-size: 0.95rem; }
.card-link:hover { color: var(--green); }

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}
@media (min-width: 640px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    overflow: hidden; transition: box-shadow var(--transition), transform var(--transition);
    display: flex; flex-direction: column; height: 100%;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card-body {
    padding: 1.5rem;
    display: flex; flex-direction: column; flex: 1 1 auto;
}
.service-card-body h3 { margin-bottom: 0.5rem; }
.service-card-body p { color: var(--grey-dark); font-size: 0.95rem; margin-bottom: 1rem; }
.service-card-body .btn { margin-top: auto; align-self: flex-start; }
.service-price-tag {
    display: inline-block;
    background: var(--green-light); color: var(--green-dark);
    font-weight: 700; font-size: 0.9rem;
    padding: 0.25em 0.75em; border-radius: 20px;
    margin-bottom: 1rem;
}

/* --- Why Choose Us --- */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 1.5rem;
}
.trust-item {
    text-align: center; padding: 2rem 1.5rem;
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.trust-icon {
    font-size: 2.5rem; margin-bottom: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.trust-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.trust-item p { font-size: 0.9rem; color: var(--grey-dark); margin: 0; }

.admin-checkbox-group { display: flex; align-items: flex-end; padding-bottom: 1.25rem; }
.admin-checkbox-group label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 600; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-icon-cell { font-size: 1.5rem; }

/* --- Testimonials --- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.testimonial-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    padding: 1.75rem; position: relative;
}
.testimonial-card::before {
    content: '"'; font-size: 5rem; line-height: 1;
    color: var(--green-light); position: absolute;
    top: 0.5rem; left: 1rem; font-family: Georgia, serif;
}
.testimonial-text { font-style: italic; color: var(--grey-dark); margin-bottom: 1rem; padding-top: 1.5rem; }
.testimonial-author { font-weight: 700; color: var(--charcoal); }
.testimonial-location { color: var(--grey-light); font-size: 0.9rem; }
.testimonial-service {
    display: inline-block; margin-top: 0.75rem;
    background: var(--green-light); color: var(--green-dark);
    font-size: 0.8rem; font-weight: 600; padding: 0.2em 0.7em;
    border-radius: 20px;
}
.star-rating { color: #f5a623; font-size: 1.1rem; display: inline-block; }
.star.filled { color: #f5a623; }
.star.empty { color: var(--grey-light); }

/* --- FAQ Accordion --- */
.faq-list { list-style: none; padding: 0; }
.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 0.75rem; overflow: hidden;
    background: var(--white);
}
.faq-question {
    width: 100%; text-align: left; background: none;
    border: none; cursor: pointer;
    padding: 1.1rem 1.5rem; font-size: 1rem; font-weight: 600;
    color: var(--charcoal); display: flex; justify-content: space-between;
    align-items: center; gap: 1rem; line-height: 1.4;
    transition: background var(--transition);
}
.faq-question:hover { background: var(--green-light); }
.faq-question[aria-expanded="true"] { background: var(--green-light); color: var(--green-dark); }
.faq-toggle {
    width: 24px; height: 24px; border: 2px solid var(--green);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 1.2rem; line-height: 1;
    color: var(--green); transition: transform var(--transition);
}
.faq-question[aria-expanded="true"] .faq-toggle { transform: rotate(45deg); }
.faq-answer {
    padding: 0 1.5rem; max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-answer.open { max-height: 600px; padding: 1rem 1.5rem 1.25rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* --- Areas --- */
.towns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.town-tag {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 0.4em 0.8em;
    font-size: 0.9rem; color: var(--grey-dark);
    text-align: center;
}

.postcode-checker { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 2rem; }
.postcode-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.postcode-form input[type="text"] {
    flex: 1; min-width: 180px; padding: 0.75em 1em;
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; font-family: var(--font);
}
.postcode-form input:focus { border-color: var(--green); outline: none; }
.postcode-result {
    margin-top: 1rem; padding: 0.8rem 1.2rem;
    border-radius: var(--radius); display: none;
}
.postcode-result.covered { background: var(--green-light); color: var(--green-dark); display: block; }
.postcode-result.not-covered { background: #fff3cd; color: #856404; display: block; }
.postcode-result.error { background: #f8d7da; color: #721c24; display: block; }

/* --- Contact Form --- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.form-label .required { color: var(--green-dark); }
.form-control {
    width: 100%; padding: 0.75em 1em;
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; font-family: var(--font); background: var(--white);
    color: var(--charcoal); transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(126,195,27,0.15); }
textarea.form-control { min-height: 140px; resize: vertical; }
select.form-control { appearance: none; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }

.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid var(--green); }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert ul { margin: 0.5em 0 0; padding-left: 1.5em; }
.alert ul li { margin-bottom: 0.25em; }

/* --- Flash Messages --- */
.flash { padding: 1rem 1.25rem; margin-bottom: 1.5rem; border-radius: var(--radius); }
.flash-success { background: var(--green-light); color: var(--green-dark); }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-info { background: #d1ecf1; color: #0c5460; }

/* --- Prices --- */
.price-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.price-table th { background: var(--charcoal); color: var(--white); padding: 0.9rem 1.25rem; text-align: left; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.price-table td { padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:hover td { background: var(--bg); }
.price-amount { font-weight: 700; color: var(--green-dark); white-space: nowrap; }

/* --- CTA Section --- */
.cta-section {
    background: var(--green); padding: 4rem 0;
    text-align: center;
}
.cta-section h2 { color: var(--white); }
.cta-section p { color: rgba(255,255,255,0.9); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-section .btn-outline { border-color: var(--white); color: var(--white); }
.cta-section .btn-outline:hover { background: var(--white); color: var(--green-dark); }

/* --- Areas Snapshot --- */
.areas-snapshot {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.area-pill {
    background: rgba(255,255,255,0.15); color: var(--white);
    border-radius: 20px; padding: 0.25em 0.75em; font-size: 0.9rem;
}

/* --- Page Banner --- */
.page-banner {
    background-color: var(--charcoal); color: var(--white);
    padding: 2.5rem 0;
    background-size: cover;
    background-position: center;
}
.page-banner.has-bg { padding: 4rem 0; }
.page-banner h1 { color: var(--white); margin-bottom: 0.5rem; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.page-banner p { color: rgba(255,255,255,0.85); margin: 0; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--green); }

/* --- Service Hero Image (top of service detail page) --- */
.service-gallery {
    margin-bottom: 2rem;
}

.service-gallery-panel[hidden] {
    display: none;
}

.service-hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.service-gallery-thumbnails {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.25rem 0.15rem 0.5rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.service-gallery-thumbnail {
    flex: 0 0 96px;
    width: 96px;
    height: 68px;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: calc(var(--radius) / 2);
    background: transparent;
    cursor: pointer;
}

.service-gallery-thumbnail picture,
.service-gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
}

.service-gallery-thumbnail img {
    object-fit: cover;
    border-radius: calc(var(--radius) / 3);
}

.service-gallery-thumbnail:hover {
    border-color: var(--grey-mid);
}

.service-gallery-thumbnail.is-selected {
    border-color: var(--green-dark);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.service-gallery-thumbnail:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

/* --- Service card images (homepage) --- */
.service-card-img {
    display: block; overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg);
}
.service-card-img picture { width: 100%; height: 100%; }
.service-card-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.service-card:hover .service-card-img img { transform: scale(1.04); }

/* --- Homepage Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.gallery-item {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
    background: var(--charcoal);
}
.gallery-item picture { width: 100%; height: 100%; }
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white); padding: 1.5rem 0.75rem 0.6rem;
    font-size: 0.85rem;
}

/* --- Homepage About Strip --- */
.about-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.about-strip-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--bg);
}
.about-strip-img picture { width: 100%; height: 100%; }
.about-strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 700px) {
    .about-strip { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
    .about-strip-img { aspect-ratio: 1 / 1; }
}

/* --- Service Detail Page --- */
.service-detail { display: grid; gap: 3rem; }
.service-content h2, .service-content h3 { color: var(--charcoal); }
.service-content ul { margin-bottom: 1.5rem; }
.service-sidebar { }
.sidebar-box {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 1.75rem;
    box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.sidebar-box h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.sidebar-price { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); }
.sidebar-price-note { font-size: 0.9rem; color: var(--grey-mid); margin-top: 0.25rem; }

/* --- Admin --- */
.admin-wrapper { min-height: 100vh; background: #f0f0ee; }
.admin-nav {
    background: var(--charcoal); color: var(--white);
    padding: 0.75rem 1.5rem; display: flex; align-items: center;
    justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.admin-nav a { color: var(--white); font-weight: 500; }
.admin-nav a:hover { color: var(--green); }
.admin-logo { font-size: 1.1rem; font-weight: 700; }
.admin-nav-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem; }
.admin-header { margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-size: 1.5rem; margin: 0; }
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.75rem; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.admin-card h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--bg); text-align: left; padding: 0.7rem 1rem; font-size: 0.85rem; color: var(--grey-dark); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.95rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 0.2em 0.7em; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-new { background: #fff3cd; color: #856404; }
.badge-responded { background: var(--green-light); color: var(--green-dark); }
.badge-archived { background: #e2e3e5; color: #383d41; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; border-left: 4px solid var(--green); }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--charcoal); }
.stat-label { font-size: 0.85rem; color: var(--grey-mid); }
.admin-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.admin-order-controls { display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; }
.admin-order-controls form { display: inline-flex; }
.admin-order-number { min-width: 1.5rem; font-weight: 700; text-align: center; }
.admin-move-btn { padding-left: 0.65em; padding-right: 0.65em; }
.admin-move-btn:disabled { opacity: 0.4; cursor: not-allowed; background: transparent; color: var(--grey-mid); border-color: var(--border); }
.btn-danger { background: #dc3545; color: var(--white); border-color: #dc3545; }
.btn-danger:hover { background: #c82333; border-color: #c82333; color: var(--white); }
.admin-form .form-group { margin-bottom: 1.25rem; }
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--charcoal); }
.login-box { background: var(--white); border-radius: var(--radius); padding: 2.5rem; max-width: 380px; width: 100%; box-shadow: var(--shadow-md); }
.login-box h1 { font-size: 1.4rem; text-align: center; margin-bottom: 0.25rem; }
.login-logo { text-align: center; margin-bottom: 1.5rem; color: var(--grey-mid); font-size: 0.9rem; }

/* --- Map --- */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 2rem; }
.map-wrap iframe { display: block; width: 100%; }

/* --- Image upload preview --- */
.img-preview { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.media-library-control { display:flex; align-items:center; flex-wrap:wrap; gap:0.65rem; margin-top:0.75rem; }
.media-library-choice { color:var(--grey-mid); font-size:0.85rem; overflow-wrap:anywhere; }
.media-library-dialog { position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,0.68); padding:1rem; overflow:auto; }
.media-library-dialog[hidden] { display:none; }
.media-library-panel { background:var(--white); width:min(960px, 100%); max-height:calc(100vh - 2rem); margin:0 auto; border-radius:var(--radius); display:flex; flex-direction:column; box-shadow:var(--shadow-md); }
.media-library-header, .media-library-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem; border-bottom:1px solid var(--border); }
.media-library-header h2 { margin:0; }
.media-library-close { border:0; background:transparent; font-size:2rem; line-height:1; cursor:pointer; }
.media-library-body { overflow:auto; padding:1rem; }
.media-library-body section + section { margin-top:1.5rem; }
.media-library-filters { display:grid; grid-template-columns:1fr; gap:0.75rem; margin-bottom:1rem; }
.media-library-filters label { display:grid; gap:0.3rem; color:var(--charcoal); font-size:0.85rem; font-weight:600; }
.media-library-filters .form-control { width:100%; }
.media-library-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:0.75rem; }
.media-library-item { border:2px solid var(--border); border-radius:var(--radius); padding:0.4rem; background:var(--white); cursor:pointer; text-align:left; color:var(--charcoal); min-width:0; }
.media-library-item[hidden], .media-library-body section[hidden] { display:none; }
.media-library-item:hover, .media-library-item.selected { border-color:var(--green); box-shadow:0 0 0 2px var(--green-light); }
.media-library-item img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:3px; margin-bottom:0.35rem; }
.media-library-item span { display:block; font-size:0.75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.media-library-empty { color:var(--grey-mid); font-size:0.9rem; }
.media-library-no-match { margin:1rem 0; padding:1rem; border-radius:var(--radius); background:var(--grey-light); color:var(--grey-mid); text-align:center; }
.media-library-no-match[hidden] { display:none; }
.media-library-actions { justify-content:flex-end; border-top:1px solid var(--border); border-bottom:0; }
body.media-library-open { overflow:hidden; }

/* === RESPONSIVE === */
@media (min-width: 600px) {
    .form-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .media-library-filters { grid-template-columns:minmax(0, 2fr) minmax(180px, 1fr); align-items:end; }
}

@media (min-width: 768px) {
    .header-contact { display: flex; align-items: center; gap: 1.25rem; }
    .site-logo { height: 85px; max-width: 260px; }
    .nav-toggle { display: none; }
    .main-nav {
        display: block !important;
        background: var(--charcoal);
    }
    .nav-list {
        display: flex; align-items: center;
    }
    .nav-list > li > a {
        border-bottom: none; padding: 1rem 1.1rem;
    }
    /* Desktop: switch the active marker from a left bar to a bottom bar. */
    .nav-list > li > a.active {
        box-shadow: inset 0 -3px 0 var(--green);
        background: transparent;
    }
    .nav-cta { margin-left: 0.5rem; border-radius: var(--radius); }
    .nav-list > li > a.nav-cta.active { box-shadow: none; }
    .nav-list > li:hover > .dropdown { display: block; }
    .has-dropdown { position: relative; }
    .dropdown {
        position: absolute; top: 100%; left: 0;
        min-width: 220px; z-index: 200;
        box-shadow: var(--shadow-md); border-radius: 0 0 var(--radius) var(--radius);
    }
    .service-detail { grid-template-columns: 1fr 340px; }
    .contact-grid { grid-template-columns: 1fr 360px; }
}

@media (min-width: 1024px) {
    .hero { padding: 5.5rem 0 5rem; }
}

.site-footer {
    background: var(--charcoal);
    color: var(--grey-mid);
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
}
