/* --- VARIABLES & RESET --- */
:root {
    --primary-blue: #0388d5;
    --dark-blue: #01579B;
    --light-blue: #E1F5FE;
    --gradient-main: linear-gradient(135deg, #0277BD 0%, #4FC3F7 100%);
    --gradient-dark: linear-gradient(135deg, #01579B 0%, #0277BD 100%);
    --dark-charcoal: #263238;
    --text-color: #455A64;
    --white: #ffffff;
    --light-gray: #f5f7fa;
}
.nav-logo {
    width: 220px;
    height: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* adjust to match header height */
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-charcoal);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- UTILITIES --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--gradient-main);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(2, 119, 189, 0.3);
}

.btn-dark {
    background-color: var(--dark-charcoal);
    color: var(--white);
    border: 2px solid var(--dark-charcoal);
}

.btn-dark:hover {
    background-color: transparent;
    color: var(--dark-charcoal);
}

.btn-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin-bottom: 10px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* --- TOP BAR --- */
.top-bar {
    background: var(--dark-blue);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    flex-wrap: wrap;
}

.top-bar i {
    margin-right: 8px;
    color: #4FC3F7;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
}

.top-bar a:hover {
    color: #4FC3F7;
}

/* --- HEADER --- */
header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.logo {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark-charcoal);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo i {
    color: var(--primary-blue);
}

.logo span {
    color: var(--primary-blue);
}

nav ul {
    display: flex;
    gap: 28px;
    align-items: center;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
    white-space: nowrap;
}

nav a:hover {
    color: var(--primary-blue);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* --- HAMBURGER BUTTON --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-charcoal);
    border-radius: 3px;
    transition: all 0.35s ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.is-active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* --- HERO --- */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    background-color: #0277BD;
    /* fallback if image fails */
    background: url('../assets/beagley_painting.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(1, 87, 155, 0.88) 0%, rgba(2, 120, 189, 0.05) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin-left: 5%;
    color: white;
}

.hero h2 {
    font-weight: 300;
    color: #E1F5FE;
    font-size: 1.6rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
    color: white;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    opacity: 0.92;
    max-width: 560px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- CTA STRIP --- */
.cta-strip {
    background: var(--gradient-main);
    color: white;
    padding: 45px 0;
    text-align: center;
}

.cta-strip h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.cta-strip p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.cta-strip .btn-white {
    background: white;
    color: var(--primary-blue);
    padding: 14px 35px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
    transition: all 0.3s;
}

.cta-strip .btn-white:hover {
    background: var(--dark-charcoal);
    color: white;
    transform: translateY(-2px);
}

/* --- HOW IT WORKS --- */
.how-it-works {
    padding: 100px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.step-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--light-gray);
    border-radius: 8px;
    border-top: 4px solid var(--primary-blue);
    transition: transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.icon-circle i {
    font-size: 1.8rem;
    color: white;
}

.step-card h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark-charcoal);
}

.step-card p {
    font-size: 0.95rem;
    color: #666;
}

/* --- SHOWCASE GRID --- */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: 450px;
}

.showcase-item {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.showcase-item:hover img {
    transform: scale(1.1);
}

/* --- ZIG ZAG (About) --- */
.zig-zag-section {
    padding: 100px 0;
}

.zig-zag-row {
    display: flex;
    align-items: center;
    margin-bottom: 100px;
    gap: 60px;
}

.zig-zag-row:nth-child(even) {
    flex-direction: row-reverse;
}

.zig-zag-row:last-child {
    margin-bottom: 0;
}

.zz-content {
    flex: 1;
}

.zz-content h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.zz-content p {
    color: #555;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.zz-image {
    flex: 1;
    position: relative;
}

.zz-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* --- SERVICES --- */
.services-section {
    background: var(--gradient-dark);
    padding: 100px 0;
    position: relative;
    color: white;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.services-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.services-container .section-title {
    color: white;
}

.services-container .section-title::after {
    background-color: white;
}

.services-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-top: 55px;
    justify-items: center;
}

.service-bubble {
    max-width: 240px;
    text-align: center;
    transition: transform 0.3s;
}

.service-bubble:hover {
    transform: translateY(-7px);
}

.sb-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    margin: 0 auto 20px;
    background: white;
}

.sb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-bubble h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.service-bubble p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- BEAGLEY'S KNOWS PAINT --- */
.knows-paint-section {
    padding: 100px 0;
    background: var(--light-gray);
    position: relative;
}

.knows-paint-section .section-subtitle {
    color: var(--text-color);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 60px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.kp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.kp-feature {
    background: white;
    border-radius: 10px;
    padding: 40px 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-top: 5px solid var(--primary-blue);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kp-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.1);
}

.kp-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.kp-icon i {
    font-size: 1.6rem;
    color: white;
}

.kp-feature h3 {
    font-size: 1.35rem;
    color: var(--dark-charcoal);
    margin-bottom: 16px;
}

.kp-feature p {
    color: #555;
    font-size: 0.97rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.kp-feature p:last-child {
    margin-bottom: 0;
}

/* --- BLOG --- */
.blog-section {
    padding: 100px 0;
    background: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.blog-img {
    height: 220px;
    overflow: hidden;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-charcoal);
    line-height: 1.4;
}

.blog-content p {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 20px;
}

.blog-content .read-more {
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.blog-content .read-more:hover {
    gap: 10px;
}

/* --- FAQ --- */
.faq-section {
    background: url('https://images.unsplash.com/photo-1599619351208-3e6c839d6828?q=80&w=2072&auto=format&fit=crop') fixed center;
    padding: 100px 0;
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(38, 50, 56, 0.87);
}

.faq-container {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

.faq-container .section-title {
    color: white;
}

.faq-container .section-title::after {
    background: var(--primary-blue);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    text-align: left;
    margin-top: 50px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item h4 {
    color: #4FC3F7;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-item p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.65;
}

/* --- TESTIMONIALS --- */
.testimonials {
    padding: 100px 0;
    background: var(--light-gray);
}

.testi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 50px;
}

.testi-card {
    background: white;
    border: 1px solid #eee;
    padding: 35px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.testi-card:hover {
    transform: translateY(-4px);
}

.testi-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--light-blue);
}

.testi-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testi-content p {
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #555;
    line-height: 1.65;
}

.testi-content h5 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    font-weight: 700;
}

/* --- CONTACT MAP + FORM SECTION --- */
.contact-map-section {
    width: 100%;
    position: relative;
    z-index: 10;
    background: var(--white);
}

/*
 * KEY: align-items: flex-start lets the form panel grow to its
 * natural content height. The map panel uses align-self: stretch
 * so it fills whatever height the form panel drives — not the
 * other way around. No min-height lock on the wrapper itself.
 */
.contact-map-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
}

/* Left panel — Google Map fills whatever height the form sets */
.map-panel {
    flex: 0 0 50%;
    align-self: stretch;
    min-height: 480px;
    position: relative;
    overflow: hidden;
    background: #b0bec5;
}

.map-panel iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/*
 * KEY: overflow must NOT be hidden — that was clipping the Tally
 * iframe after dynamicHeight resized it past the original bounds.
 */
.form-panel {
    flex: 0 0 50%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/*
 * KEY: no flex:1 here — flex:1 capped the inner div to the
 * wrapper height instead of letting it grow with the form.
 * Padding-bottom must be non-zero so the form isn't flush-cut.
 */
.form-panel-inner {
    padding: 44px 44px 44px;
    display: flex;
    flex-direction: column;
}

.form-heading {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--dark-charcoal);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 14px;
}

.form-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
}

.form-subheading {
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 14px 0 20px;
}

/*
 * KEY: no flex:1, no overflow:hidden, no max-height.
 * Tally's dynamicHeight postMessage sets iframe.style.height
 * directly. Any constraint here overrides it and cuts the form.
 * min-height is just a pre-load render placeholder.
 */
.tally-frame {
    display: block;
    width: 100%;
    border: 0;
    min-height: 350px;
}

/* Screen reader only utility (for section aria label) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-charcoal);
    color: #b0bec5;
    padding: 65px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 45px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 22px;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-col a {
    color: #b0bec5;
}

.footer-col a:hover {
    color: var(--primary-blue);
}

.footer-social {
    display: flex;
    gap: 16px;
    font-size: 1.5rem;
    margin-bottom: 18px;
}

.footer-social a {
    color: #b0bec5;
}

.footer-social a:hover {
    color: #4FC3F7;
}

.footer-license {
    font-size: 0.8rem;
    color: #78909c;
    margin-top: 5px;
}

.copyright {
    border-top: 1px solid #37474f;
    text-align: center;
    padding-top: 25px;
    font-size: 0.82rem;
    color: #78909c;
}

/* --- ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.75s ease-out, transform 0.75s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
           RESPONSIVE — TABLET (max 992px)
        ============================================ */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.2rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    /* Contact map — tighten form padding at tablet */
    .form-panel-inner {
        padding: 36px 30px 36px;
    }

    .form-heading {
        font-size: 1.5rem;
    }
}

/* ============================================
           RESPONSIVE — MOBILE (max 768px)
        ============================================ */
@media (max-width: 768px) {

    /* Show hamburger, hide desktop nav */
    .hamburger {
        display: flex;
    }

    .faq-section {
        background-attachment: scroll;
    }

    /* Hidden mobile nav — slides down */
    #main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
    }

    #main-nav.nav-open {
        max-height: 500px;
        padding-bottom: 20px;
    }

    #main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0 0;
    }

    #main-nav ul li a {
        display: block;
        padding: 14px 30px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1rem;
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 560px;
        padding: 80px 0;
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        margin-left: 0;
        max-width: 100%;
    }

    .hero h2 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

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

    .hero p {
        font-size: 1rem;
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero::before {
        background: rgba(1, 87, 155, 0.82);
    }

    /* Top bar */
    .top-bar-inner {
        justify-content: center;
        gap: 15px;
        font-size: 0.8rem;
    }

    /* CTA */
    .cta-strip h3 {
        font-size: 1.4rem;
    }

    /* Showcase */
    .showcase-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .showcase-item {
        height: 250px;
    }

    /* About zig-zag */
    .zig-zag-row {
        flex-direction: column !important;
        text-align: center;
        gap: 35px;
    }

    .zz-content h3 {
        font-size: 1.7rem;
    }

    /* Services */
    .services-layout {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    /* Knows Paint */
    .kp-grid {
        grid-template-columns: 1fr;
    }

    .kp-feature {
        padding: 30px 25px;
    }

    /* FAQ */
    .faq-grid {
        grid-template-columns: 1fr;
    }

    /* Testimonials */
    .testi-grid {
        grid-template-columns: 1fr;
    }

    .testi-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Section title */
    .section-title {
        font-size: 1.75rem;
    }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
    }

    /* Contact map + form — stack vertically on mobile */
    .contact-map-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    /* Map fixed height on top, form expands freely below */
    .map-panel {
        flex: none;
        width: 100%;
        height: 280px;
        min-height: unset;
        align-self: auto;
    }

    .form-panel {
        flex: none;
        width: 100%;
    }

    .form-panel-inner {
        padding: 28px 20px 36px;
    }

    .form-heading {
        font-size: 1.3rem;
    }

    .form-subheading {
        font-size: 0.88rem;
        margin-bottom: 14px;
    }

    .tally-frame {
        min-height: 300px;
    }
}

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

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

    .btn {
        padding: 12px 24px;
        font-size: 0.82rem;
    }

    /* Contact map — smaller map height on small phones */
    .map-panel {
        height: 230px;
    }

    .form-panel-inner {
        padding: 22px 16px 32px;
    }
}
/* ============================================================
   BLOG / PAINTING-TIPS PAGE STYLES
   Added from style-blog.css — painting-tips.html specific.
   Nothing below modifies any existing styles.css rule.
   ============================================================ */

/* --- NAV: active link state (blog page "Tips" highlight) --- */
nav a.active { color: var(--primary-blue); }
nav a.active::after { width: 100%; }

/* --- STANDALONE BUTTON VARIANTS (used in article CTAs) ---
   styles.css has .cta-strip .btn-white (scoped).
   These unscoped versions are needed for .article-cta buttons. */
.btn-white {
    background: white;
    color: var(--primary-blue);
    border: none;
}
.btn-white:hover {
    background: var(--dark-charcoal);
    color: white;
    transform: translateY(-2px);
}
.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
    margin-left: 12px;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- PAGE HERO (painting-tips.html banner) --- */
.page-hero {
    background: var(--gradient-dark);
    position: relative;
    padding: 70px 0 60px;
    text-align: center;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 20px 20px;
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 {
    color: white;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.15;
}
.page-hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* --- BREADCRUMB --- */
.breadcrumb {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 15px;
}
.breadcrumb a { color: rgba(255, 255, 255, 0.7); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { margin: 0 8px; }

/* --- TABLE OF CONTENTS STRIP --- */
.toc-strip {
    background: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}
.toc-inner {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.toc-label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--dark-charcoal);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.toc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: white;
    border: 1.5px solid #dde3e8;
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.25s;
}
.toc-link:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--light-blue);
}
.toc-link i { font-size: 0.75rem; }

/* --- ARTICLES WRAPPER & DIVIDER --- */
.articles-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 70px 15px 100px;
}
.article-divider {
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
    margin: 70px 0;
}

/* --- ARTICLE HEADER ELEMENTS --- */
.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-blue);
    color: var(--dark-blue);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.article-title {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--dark-charcoal);
    margin-bottom: 18px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.article-meta i {
    margin-right: 5px;
    color: var(--primary-blue);
}
.article-hero-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

/* --- ARTICLE BODY PROSE --- */
.article-body h2 {
    font-size: 1.55rem;
    color: var(--dark-charcoal);
    margin: 40px 0 16px;
    padding-left: 18px;
    border-left: 4px solid var(--primary-blue);
}
.article-body h3 {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin: 30px 0 12px;
}
.article-body p {
    font-size: 1.02rem;
    line-height: 1.82;
    color: #455A64;
    margin-bottom: 20px;
}
.article-body strong { color: var(--dark-charcoal); }
.article-body ul,
.article-body ol {
    margin: 0 0 22px 22px;
    list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li {
    font-size: 1rem;
    line-height: 1.75;
    color: #455A64;
    margin-bottom: 6px;
}

/* --- CALLOUT BOX --- */
.callout {
    background: var(--light-blue);
    border-left: 5px solid var(--primary-blue);
    padding: 24px 28px;
    border-radius: 0 8px 8px 0;
    margin: 30px 0;
}
.callout p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--dark-blue);
    font-style: italic;
    line-height: 1.7;
}
.callout strong { color: var(--dark-blue); }

/* --- TIP BOX --- */
.tip-box {
    background: #fff8e1;
    border: 1.5px solid #ffe082;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 30px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.tip-box .tip-icon {
    font-size: 1.4rem;
    color: #f9a825;
    flex-shrink: 0;
    margin-top: 2px;
}
.tip-box p {
    margin: 0;
    font-size: 0.97rem;
    color: #5d4037;
    line-height: 1.65;
}

/* --- COMPARISON TABLE --- */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.95rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.compare-table th {
    background: var(--gradient-dark);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.compare-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #eceff1;
    vertical-align: top;
    line-height: 1.55;
}
.compare-table th,
.compare-table td { }
.compare-table tr:nth-child(even) td { background: #f5f7fa; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .col-header { font-weight: 700; color: var(--dark-charcoal); }
.compare-table .good { color: #2e7d32; font-weight: 600; }
.compare-table .moderate { color: #e65100; font-weight: 600; }

/* --- COLOR SWATCH GRID --- */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.color-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}
.color-card:hover { transform: translateY(-4px); }
.color-swatch { height: 90px; }
.color-card-body {
    padding: 14px 16px;
    background: white;
}
.color-card-body h4 {
    font-size: 0.95rem;
    color: var(--dark-charcoal);
    margin-bottom: 4px;
}
.color-card-body p {
    font-size: 0.82rem;
    color: #777;
    margin: 0;
    line-height: 1.45;
}

/* --- ROOM RECOMMENDATION GRID --- */
.room-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 30px 0;
}
.room-card {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 20px 22px;
    border-top: 3px solid var(--primary-blue);
}
.room-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--dark-charcoal);
    margin-bottom: 8px;
}
.room-card h4 i { color: var(--primary-blue); font-size: 1rem; }
.room-card p { font-size: 0.88rem; color: #666; margin: 0; line-height: 1.55; }

/* --- ARTICLE CTA BLOCK --- */
.article-cta {
    background: var(--gradient-dark);
    border-radius: 12px;
    padding: 40px 35px;
    text-align: center;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}
.article-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 18px 18px;
}
.article-cta > * { position: relative; z-index: 2; }
.article-cta h3 { color: white; font-size: 1.5rem; margin-bottom: 10px; }
.article-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 22px;
    font-size: 0.97rem;
}

/* --- RELATED SERVICES SECTION --- */
.related-section { background: var(--light-gray); padding: 70px 0; }
.related-section .section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.related-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 45px;
}
.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
    border: 1px solid #eee;
}
.related-card:hover { transform: translateY(-5px); }
.related-img { height: 180px; overflow: hidden; }
.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.related-card:hover .related-img img { transform: scale(1.07); }
.related-body { padding: 22px; }
.related-body h4 {
    font-size: 1.05rem;
    color: var(--dark-charcoal);
    margin-bottom: 8px;
    line-height: 1.4;
}
.related-body a {
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.related-body a i { transition: transform 0.2s; }
.related-body a:hover i { transform: translateX(4px); }

/* --- BLOG PAGE RESPONSIVE ADDITIONS --- */
@media (max-width: 768px) {
    .page-hero h1 { font-size: 2rem; }
    .toc-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
    .article-title { font-size: 1.6rem; }
    .article-hero-img { height: 240px; }
    .room-grid { grid-template-columns: 1fr; }
    .compare-table { font-size: 0.85rem; }
    .compare-table th,
    .compare-table td { padding: 10px 12px; }
    .color-grid { grid-template-columns: 1fr 1fr; }
    .article-cta { padding: 30px 22px; }
    .btn-outline-white { margin-left: 0; margin-top: 10px; }
}

@media (max-width: 480px) {
    .color-grid { grid-template-columns: 1fr; }
    .article-body h2 { font-size: 1.3rem; }
}