/* --- RESET & VARIABLES --- */
:root {
    --primary: #FFD700; /* Rust Orange */
    --dark: #1b1b1b;
    --darker: #111111;
    --light: #f4f4f4;
    --gray: #333333;
    --transition: all 0.3s ease;
}

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

/* Keeps anchor targets (nav links, footer links) clear of the fixed nav
   instead of scrolling right underneath it. */
html {
    scroll-padding-top: 130px;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Big Shoulders', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
/* --- LOGO --- */
.logo {
    display: flex;
    align-items: center;
    /* This ensures the logo container doesn't force the nav to be too tall */
    height: 100%; 
}


/* Optional: Logo hover effect */
.logo img:hover {
    filter: drop-shadow(0 0 2px var(--primary));
}

/* Shrinks smoothly on scroll (see .nav-scrolled below) — transform rather
   than width/height so it doesn't fight the mobile width:150px override. */
.logo img {
    transition: transform 0.3s ease;
    transform-origin: left center;
}
/* --- MOBILE LOGO SHRINK --- */
@media (max-width: 768px) {
    .logo img {
        /* Shrink the logo further for mobile screens */
        width: 150px; 
    }
    
    /* Ensure the nav doesn't get too tall on mobile */
    nav {
        padding: 10px 5%;
    }
}
/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5%;
    background: rgba(26, 26, 26, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
    transition: padding 0.3s ease;
}

/* --- SHRINKING NAV ON SCROLL --- */
/* `.nav-scrolled` is toggled by JS once the page scrolls past ~50px (see the
   inline script at the bottom of each page). Specificity (element+class)
   beats the mobile media query's plain `nav{padding:10px 5%}` above, so this
   applies consistently on both desktop and mobile without extra overrides. */
nav.nav-scrolled {
    padding: 2px 5%;
}

nav.nav-scrolled .logo img {
    transform: scale(0.82);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--light);
}

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

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 1rem;
}

.nav-links a:hover { color: var(--primary); transition: var(--transition); }

.cta-btn {
    background: var(--primary);
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 700;
    transition: var(--transition);
}
/* Update text colors for better contrast on yellow buttons */
.cta-btn, button[type="submit"] {
    color: #000 !important; /* Black text on yellow buttons for readability */
}

.cta-btn:hover, button[type="submit"]:hover {
    background: var(--light);
    color: var(--dark) !important;
}

/* Ensure icons and accents pop */
.card i, .section-title span, .logo span {
    color: var(--primary);
}
/* .cta-btn:hover { background: #fff; color: var(--primary); } */

/* --- SECONDARY (OUTLINE) BUTTON --- */
/* Smaller, lower-emphasis than .cta-btn — for in-copy links like
   "Check Out Our Methods" rather than primary lead-gen CTAs. */
.about-cta-row {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-outline i { font-size: 0.75rem; transition: var(--transition); }

.btn-outline:hover {
    background: var(--primary);
    color: #000;
}

/* Google rating badge (5 stars + link to the Business Profile) */
.google-rating {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #ccc;
    font-size: 0.85rem;
    transition: var(--transition);
}

.google-rating__stars { color: var(--primary); font-size: 0.8rem; letter-spacing: 2px; }

.google-rating__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    white-space: nowrap;
}

.google-rating:hover { color: var(--primary); }

/* Mobile Menu */
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- BREADCRUMB (dark-theme pages, e.g. /gallery/) --- */
/* style.css's bare `nav {}` rule (fixed header) matches every <nav>
   element, including this one — reset the fixed-header-only properties so
   it lays out normally in the flow instead of stacking on the real nav. */
.breadcrumb {
    position: static;
    top: auto;
    width: auto;
    z-index: auto;
    background: none;
    border-bottom: none;
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 150px 5% 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #999;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .breadcrumb { padding-top: 110px; }
}

/* --- SECTION DIVIDER FLOURISH --- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary));
}

.section-divider::after { background: linear-gradient(90deg, var(--primary), transparent); }

.section-divider span {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    margin: 0 14px;
    background: var(--primary);
    border-radius: 2px;
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.65);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.6;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(53, 53, 53, 0.502), rgba(0, 0, 0, 0.152));
    z-index: -1;
}

.hero-content {
    z-index: 1;
    padding: 20px;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-flourish {
    display: inline-block;
    margin-top: 8px;
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--primary);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.underline-accent {
    position: relative;
    display: inline-block;
}

.underline-accent__svg {
    position: absolute;
    left: 0;
    bottom: -0.14em;
    width: 100%;
    height: 0.3em;
    overflow: visible;
    pointer-events: none;
}

.underline-accent__svg path {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-underline 1.4s ease-out 1.1s forwards;
}

@keyframes draw-underline {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .underline-accent__svg path {
        animation: none;
        stroke-dashoffset: 0;
    }
}

/* --- SERVICES CARDS (Strict 3-Column Layout) --- */
.services {
    padding: 80px 5%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 1.7rem;
}

.section-title span { border-bottom: 3px solid var(--primary); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards across */
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--gray);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 3px solid var(--primary);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(255, 215, 0, 0.3); /* Slight yellow tint on the whole border */
    border-bottom: 3px solid var(--light); /* Change line color on hover for a dynamic effect */
}

.card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.card h3 { margin-bottom: 15px; }

/* --- ABOUT SECTION --- */
.about {
    padding: 80px 5%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    background: var(--darker);
}

.about-text { flex: 1; min-width: 300px; }
.about-text h2 { margin-bottom: 20px; font-size: 2.5rem; }
.about-text p { margin-bottom: 20px; color: #ccc; }

/* Company mission-statement pull-quote (used in "Why Choose Bee Happy") */
.mission-quote {
    margin-top: 30px;
    padding: 18px 24px;
    border-left: 4px solid var(--primary);
    background: rgba(255, 215, 0, 0.06);
    border-radius: 4px;
    font-style: italic;
    color: var(--light);
    font-size: 1.05rem;
}

/* --- OUR PROCESS --- */
.process {
    padding: 80px 5%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.process-step { text-align: center; padding: 10px; position: relative; }

.process-step .step-number {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 18px;
}

/* Circle "draws itself" (stroke-dashoffset animates to 0) once the step
   scrolls into view — see the IntersectionObserver in the page script. */
.step-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    transform: rotate(-90deg); /* start the draw at 12 o'clock */
}

.step-circle__track {
    fill: none;
    stroke: rgba(255, 215, 0, 0.15);
    stroke-width: 2;
}

.step-circle__progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 169.6;
    stroke-dashoffset: 169.6;
    transition: stroke-dashoffset 1s ease;
}

.process-step.in-view .step-circle__progress { stroke-dashoffset: 0; }

/* Slight stagger so the four circles draw left-to-right, not all at once */
.process-step:nth-child(2) .step-circle__progress { transition-delay: 0.15s; }
.process-step:nth-child(3) .step-circle__progress { transition-delay: 0.3s; }
.process-step:nth-child(4) .step-circle__progress { transition-delay: 0.45s; }

.step-number__text {
    position: relative;
    z-index: 1;
    font-family: 'Big Shoulders', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
    .step-circle__progress { transition: none; stroke-dashoffset: 0; }
}

.process-step h3 { font-size: 1.05rem; margin-bottom: 10px; }
.process-step p { color: #ccc; font-size: 0.9rem; line-height: 1.6; }

.about-image {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background: url('../../images/Home-Page-50x70x12-w-15ft-Wrap-around-Porch-Marchbank-Project-6.jpg') center/cover;
    border-radius: 8px;
    box-shadow: 20px 20px 0 var(--primary);
}

/* --- FAQ ACCORDION --- */
.faq {
    padding: 80px 5%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Two topical columns (Construction & Roofing / Windows) on desktop,
   collapsing to one column on mobile — see the breakpoint below. */
.accordion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 40px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.accordion-column-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    /* No margin — the parent .accordion's flex `gap` already spaces this
       from the first item below it, same as between every other item. */
}

.accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    background: var(--gray);
    border-radius: 8px;
    border-bottom: 3px solid #4f4f4f;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item.active { border-bottom: 3px solid var(--primary); }

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: none;
    border: none;
    color: var(--light);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    text-align: left;
    padding: 20px 25px;
    cursor: pointer;
}

.accordion-header i {
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header i { transform: rotate(180deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.35s ease;
}

.accordion-content p { color: #ccc; padding-bottom: 20px; }

/* --- FEATURED VIDEO --- */
.video-feature {
    padding: 100px 5%;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 600px) {
    .video-wrapper { padding: 0 10px; }
}

/* --- ASYMMETRICAL GALLERY --- */
/* --- UPDATED GALLERY SECTION --- */
.gallery-section {
    padding: 100px 5%; /* Top/Bottom padding for section breathing room */
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px; /* Increased row height for a bolder look */
    grid-auto-flow: dense; /* backfills gaps left by g-wide/g-tall spans so the mosaic has no ragged holes */
    gap: 20px;

    /* ADD THESE LINES FOR CENTERING & SPACING */
    width: 100%;
    max-width: 1200px; /* Limits the width on large monitors */
    margin: 0 auto;    /* Centers the grid in the viewport */
    padding: 0 20px;   /* Extra safety padding for the grid itself */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

/* Ensure images maintain their aspect ratio and quality */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px; /* Slightly rounded corners for a modern feel */
    transition: transform 0.5s ease;
}
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10px;
    }
}

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

.gallery-teaser__cta { margin-top: 40px; }

.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-big { grid-column: span 2; grid-row: span 2; }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border: 2px solid var(--primary);
    display: block;
}

.lightbox-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 12px 20px;
    font-size: 0.95rem;
    text-align: center;
}

.lightbox-caption:empty {
    display: none;
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}

/* --- CONTACT SECTION --- */
.contact {
    padding: 80px 5%;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('../../images/BHBS-LLC-Logo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.form-group { margin-bottom: 20px; text-align: left; }

.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
    transition: var(--transition);
}

button[type="submit"]:hover { background: #e05e2b; }
button[type="submit"]:disabled { opacity: 0.7; cursor: wait; }
/* Quote form: hidden spam trap (bots fill it, people never see it) + status line */
.form-honeypot { display: none !important; }
.form-status { margin-top: 15px; font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.form-status.is-success { color: var(--primary); }
.form-status.is-error { color: #ff8a80; }

/* --- CONTACT LAYOUT --- */
.contact-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: stretch; /* Makes map and form equal height */
}

.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary); /* Yellow border to match branding */
    background: var(--dark);
}
.map-container iframe {
    flex-grow: 1; /* Ensures map takes up remaining space */
    min-height: 350px;
}

.form-container {
    flex: 1;
    text-align: left;
    /* Styles already exist in your file, just ensuring flex-basis here */
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column; /* Stacks the map and form */
    }
    
    .map-container {
        height: 300px; /* Smaller height for mobile screens */
        min-height: auto;
        margin-bottom: 20px; /* Space between map and form when stacked */
    }

    .map-container iframe {
        min-height: 150px; /* Prevent iframe from forcing the container past 300px and clipping the directions link */
    }
}

/* --- FOOTER --- */
footer {
    background: #000;
    padding: 70px 5% 30px;
    color: #888;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .footer-wordmark {
    font-family: 'Big Shoulders', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 14px;
}

.footer-brand .footer-wordmark span { color: var(--primary); }

.footer-brand p { color: #999; font-size: 0.9rem; line-height: 1.7; max-width: 320px; }

.footer-brand .footer-contact { margin-top: 18px; }

.footer-brand .footer-contact p {
    color: #bbb;
    margin-bottom: 8px;
    max-width: none;
}

.footer-brand .footer-contact i {
    color: var(--primary);
    width: 16px;
    margin-right: 8px;
}

.footer-brand .footer-contact a { color: inherit; }
.footer-brand .footer-contact a:hover { color: var(--primary); }

.footer-col h4 {
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 11px; }

.footer-col ul li a {
    color: #aaa;
    font-size: 0.92rem;
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #262626;
    padding-top: 24px;
    font-size: 0.85rem;
}

.footer-credit {
    color: #666;
    margin-left: 6px;
    transition: var(--transition);
}

.footer-credit:hover { color: var(--primary); }

.social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #fff;
}

.social-links a:hover { color: var(--primary); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* --- RESPONSIVE --- */
/* Tablet: Cards go 2 across */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }

    .process-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: Nav collapse, Cards stack 1 across */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark);
        padding: 20px;
        text-align: center;
    }

    .nav-links.active { display: flex; }
    .hamburger { display: block; color: #fff; }

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

    .card-grid { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr; }
    .accordion-grid { grid-template-columns: 1fr; gap: 30px 0; }

    .gallery-section {
        padding: 60px 5%; /* shrunk proportionally from the desktop 100px — still breathing room, less scroll */
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px; /* shrunk proportionally from the desktop 250px to match the narrower columns */
        gap: 10px;
        padding: 0 10px;
    }

    .g-wide, .g-big { grid-column: span 2; }

    .about-text, .about-image {
        min-width: 100%; /* avoid overflow on narrow phones where 300px exceeds the padded width */
    }

    /* background-attachment: fixed is unreliable/janky on iOS Safari and mobile Chrome */
    .contact {
        background-attachment: scroll;
    }
}

/* Small phones: shrink the gallery mosaic a bit further, same 2-col/g-wide/g-tall block pattern */
@media (max-width: 480px) {
    .gallery-grid {
        grid-auto-rows: 120px;
        gap: 8px;
        padding: 0 8px;
    }
}