/* ============================================================
   ForWardAI.Sites.Template — site.css
   Theme values injected via CSS custom properties from MainLayout.
   ============================================================ */

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-family, 'Inter', system-ui, sans-serif);
    color: var(--color-text, #1a1a2e);
    background: var(--color-bg, #ffffff);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Anchor targets must clear the sticky header. Replaces the JS offset the old
   @onclick scroll handler computed — that handler had no circuit to run on. */
[id] { scroll-margin-top: 120px; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Container --------------------------------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons ----------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
    text-align: center;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--color-primary, #1a5276);
    color: #fff;
}
.btn-accent {
    background: var(--color-accent, #e74c3c);
    /* NOT hardcoded #fff. TAP's measured accent is #ADFF2F; white on that is
       1.1:1 and effectively invisible. The on-accent colour is a palette
       decision, so it comes from config like every other colour. */
    color: var(--color-on-accent, #fff);
}
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

/* --- Navbar ------------------------------------------------ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-dark, #ffffff);
    color: var(--color-on-dark, #1a1a2e);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Tall enough for the client's logo lockup to be legible. The mark has the
       words "Train Adapt Perform" set UNDER it (hence textUnderLogo.png), so at
       the template's 38px the wordmark rendered about 6px tall and could not be
       read at all. The live site gives it a 323px header; 104px is the smallest
       height at which the lockup is still readable here. */
    min-height: 104px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
.navbar-logo {
    height: 84px;
    width: auto;
    /* A square PNG that is mostly transparent padding; object-fit keeps it from
       claiming more horizontal room than the artwork actually uses. */
    object-fit: contain;
}
.navbar-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-on-dark-link, var(--color-primary, #1a5276));
    letter-spacing: -0.02em;
}

.navbar-links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}
.navbar-link {
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-on-dark-link, #444);
    transition: opacity 0.15s;
}
.navbar-link:hover { opacity: 0.72; }
/* Pro multi-page: mark the route the visitor is on. */
.navbar-link.active {
    color: var(--color-on-dark-link, var(--color-primary));
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.navbar-cta {
    margin-left: 1rem;
    padding: 0.45rem 1.1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.navbar-cta:hover { opacity: 0.85; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--color-on-dark-link, var(--color-primary, #1a5276));
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    display: none;
    background: var(--color-dark, #fff);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1rem 1.5rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-link {
    display: block;
    padding: 0.9rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-on-dark-link, #333);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link.active { color: var(--color-primary); font-weight: 600; }
.mobile-cta {
    display: block;
    margin-top: 1rem;
    padding: 0.75rem;
    text-align: center;
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .navbar-links, .navbar-cta { display: none; }
    .hamburger { display: flex; }
    .navbar-inner { min-height: 84px; }
    .navbar-logo { height: 66px; }
}

/* --- Hero -------------------------------------------------- */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem;
    color: #fff;
    position: relative;
}

.hero-content {
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-headline {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.hero-subheadline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 400;
    opacity: 0.9;
    max-width: 580px;
    line-height: 1.65;
}

.hero-cta {
    font-size: 1.05rem;
    padding: 0.9rem 2.2rem;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

/* --- Page header (Pro multi-page subpages) ------------------ */
/* Stands in for the hero on /about, /services, etc. so a subpage still
   opens with a titled band instead of dropping straight into a section. */
.page-header {
    background: var(--color-primary);
    color: #fff;
    padding: 4rem 0 3.25rem;
    text-align: center;
}
.page-header-title {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.page-header-subtitle {
    max-width: 640px;
    margin: 0.75rem auto 0;
    font-size: 1.05rem;
    opacity: 0.9;
}

/* --- Sections ---------------------------------------------- */
.section {
    padding: 5rem 0;
}
.section:nth-child(even) {
    background: var(--color-bg-alt, #f7f9fc);
}

.section-title {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--color-heading, var(--color-primary));
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.section-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    color: var(--color-text-muted, #555);
    font-size: 1.05rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.service-card {
    background: var(--color-bg, #fff);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.service-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.service-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-heading, #1a1a2e); }
.service-desc { color: var(--color-text-muted, #666); font-size: 0.95rem; line-height: 1.6; }

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.feature-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.75rem;
    border-left: 4px solid var(--color-accent, #e74c3c);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: #1a1a2e; }
.feature-desc { color: #666; font-size: 0.9rem; line-height: 1.6; }

/* About */
.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.about-text .section-title { text-align: left; }
.about-body { color: var(--color-text-muted, #555); font-size: 1.05rem; line-height: 1.8; margin-top: 1rem; }
.about-image img { border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.12); }

@media (max-width: 700px) {
    .about-inner { grid-template-columns: 1fr; }
}

/* Contact */
.contact-grid {
    display: grid;
    /* Form left, location right — the live site's order. minmax(0,…) so a long
       address or email can wrap instead of forcing the grid wider than the
       viewport; a grid track's default `min-width:auto` is what lets one long
       unbroken string push a phone layout sideways. */
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 3rem;
    margin-top: 2.5rem;
    align-items: start;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    color: #444;
}
.contact-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.contact-link {
    color: var(--color-primary);
    font-weight: 500;
    transition: opacity 0.15s;
}
.contact-link:hover { opacity: 0.75; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    color: #1a1a2e;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,82,118,0.12);
}
.form-success {
    margin-top: 0.5rem;
    color: #27ae60;
    font-weight: 500;
    font-size: 0.95rem;
}

@media (max-width: 700px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* --- Footer ------------------------------------------------ */
.footer {
    background: var(--color-dark, #1a1a2e);
    color: var(--color-on-dark, #ccc);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Columns */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.footer-col-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-on-dark-link, #fff);
    margin: 0 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Left col: brand */
.footer-col-brand { align-items: flex-start; }
.footer-logo { height: 60px; }
.footer-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-on-dark-link, #fff);
}
.footer-partner-badge { display: inline-block; }
.footer-badge-img { height: 80px; width: auto; }

/* Center col: nav */
.footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-nav-link {
    color: var(--color-on-dark-link, #aac);
    font-size: 0.95rem;
    transition: opacity 0.15s;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.footer-nav-link:hover { opacity: 0.75; }

/* Right col: contact */
.footer-col-contact { gap: 0.6rem; }
.footer-link {
    color: var(--color-on-dark-link, #aac);
    font-size: 0.95rem;
    transition: opacity 0.15s;
    text-decoration: underline;
    text-underline-offset: 4px;
    /* Addresses and emails are data-derived and long. Without these two a
       62-character string runs straight off a 390px screen. */
    overflow-wrap: anywhere;
    min-width: 0;
}
.footer-link:hover { opacity: 0.75; }

.footer-socials {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.25rem;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #ccc;
    transition: background 0.2s, color 0.2s;
}
.social-link:hover {
    background: var(--color-accent, #e74c3c);
    color: #fff;
}

/* ForWardAI attribution */
.footer-forwardai {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    width: fit-content;
}
.footer-forwardai:hover { opacity: 1; }
.footer-forwardai-img {
    height: 40px;
    width: auto;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    padding: 1.25rem 1.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .footer-col-nav { text-align: center; align-items: center; }
    .footer-col-contact { align-items: center; }
}

/* --- About enhancements (#3) ------------------------------- */
.about-inner.no-image .about-title { text-align: center; }
.about-inner.no-image .about-body { text-align: center; max-width: 680px; margin-left: auto; margin-right: auto; }

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
}
.about-highlights li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.97rem;
    color: #333;
}
.highlight-icon { font-size: 1.15rem; }

/* --- Services image variant (#4) --------------------------- */
.service-card-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 16/9;
}
.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}
.service-card:hover .service-card-image img { transform: scale(1.04); }

/* --- Testimonials (#5) ------------------------------------- */
.section-testimonials { }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}
@media (max-width: 900px) {
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .testimonials-grid { grid-template-columns: 1fr; }
}

.testimonial-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    border-top: 3px solid var(--color-accent, #e74c3c);
}

.testimonial-stars {
    display: flex;
    gap: 2px;
    color: var(--color-accent, #e74c3c);
    font-size: 1.1rem;
    line-height: 1;
}

.testimonial-quote {
    font-size: 0.97rem;
    line-height: 1.75;
    color: #444;
    font-style: italic;
    flex: 1;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.testimonial-photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary, #1a5276);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.testimonial-byline { display: flex; flex-direction: column; gap: 0.1rem; }
.testimonial-name { font-weight: 700; font-size: 0.9rem; color: #1a1a2e; }
.testimonial-role { font-size: 0.8rem; color: #888; }

/* --- Before/After Gallery (#6) ----------------------------- */
.before-after-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.before-after-pair {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,0.1);
    margin: 0;
}

.before-after-images {
    display: grid;
    grid-template-columns: 1fr 3px 1fr;
    align-items: stretch;
}

.ba-divider {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.ba-divider::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255,255,255,0.8);
}

.ba-panel {
    position: relative;
    overflow: hidden;
}
.ba-panel img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.ba-label {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    background: rgba(0,0,0,0.62);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.ba-caption {
    background: #fff;
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    color: #555;
    font-style: italic;
    border-top: 1px solid #eee;
}

@media (max-width: 500px) {
    .before-after-images { grid-template-columns: 1fr; }
    .ba-divider { height: 3px; width: 100%; }
    .ba-panel img { height: 180px; }
}

/* --- Contact enhancements (#7) ----------------------------- */
.contact-map {
    margin-top: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.contact-map iframe {
    display: block;
    width: 100%;
    /* 300px, not the template's 220px: the live site gives its map block 356px
       and at 220 the pin sits close enough to the frame edge that the street
       the studio is on is partly cropped. */
    height: 300px;
    border: none;
}
.form-group select {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #1a1a2e;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,82,118,0.12);
}
.required { color: var(--color-accent, #e74c3c); margin-left: 2px; }
.optional { color: #999; font-weight: 400; font-size: 0.82em; }
.form-error {
    color: #c0392b;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
}
.form-success-box {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 2rem 1.75rem;
    text-align: center;
    color: #166534;
}
.form-success-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.form-success-box p { font-size: 0.95rem; opacity: 0.85; margin: 0; }

/* Honeypot: visually hidden from humans, invisible to screen readers too */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

/* --- Service Area (#8) ------------------------------------- */
.section-service-area { text-align: center; }

.service-area-desc {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 640px;
    margin: 1.25rem auto 2rem;
}

.cities-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    margin: 0 auto 2rem;
    max-width: 760px;
}
.city-tag {
    background: var(--color-primary, #1a5276);
    color: #fff;
    padding: 0.4rem 1.1rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
}

.map-embed {
    max-width: 860px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,0.1);
}
.map-embed iframe {
    display: block;
    width: 100%;
    height: 340px;
    border: none;
}

/* --- Blazor error UI --------------------------------------- */
#blazor-error-ui {
    background: #ffedcc;
    border-top: 1px solid #f5b800;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; font-weight: bold; }
/* --- Gallery + lightbox ------------------------------------ */
.section-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

.section-gallery .gallery-tile {
    position: relative;
    border: 0;
    padding: 0;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s, box-shadow 0.15s;
}
.section-gallery .gallery-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}
.section-gallery .gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.section-gallery .gallery-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
    color: #fff;
    padding: 2.5rem 0.75rem 0.75rem;
    font-size: 0.83rem;
    font-weight: 500;
    text-align: left;
    line-height: 1.3;
}

/* Lightbox overlay — injected once by gallery-lightbox.js. */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-overlay .lightbox-figure {
    max-width: min(1200px, 95vw);
    max-height: 90vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.lightbox-overlay .lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.lightbox-overlay .lightbox-caption {
    color: #eee;
    font-size: 0.95rem;
    text-align: center;
    max-width: 80ch;
}
.lightbox-overlay .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
}
.lightbox-overlay .lightbox-nav {
    background: rgba(0, 0, 0, 0.35);
    border: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem 1.15rem;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.15s;
}
.lightbox-overlay .lightbox-nav:hover { background: rgba(255, 255, 255, 0.15); }
.lightbox-overlay .lightbox-prev { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-overlay .lightbox-next { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }




/* ============================================================
   #3 — hero media, map escape hatch, phone-width guards
   ============================================================ */

/* --- Hero background media --------------------------------- */
/* Three stacked layers inside .hero (position: relative):
     .hero-media   still image  — z 0
     .hero-video   video        — z 1, covers the still once it plays
     .hero-scrim   dark wash    — z 2, keeps the headline legible
     .hero-content copy         — z 3
   The still is NOT swapped out for the video; it sits underneath it, so a
   video that is still buffering, fails, is blocked, or is suppressed for
   reduced motion leaves a real photograph behind rather than a bare colour. */
.hero-media,
.hero-video,
.hero-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media {
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-video {
    z-index: 1;
    object-fit: cover;
    border: none;
    pointer-events: none;
}

.hero-scrim {
    z-index: 2;
    background: rgba(0, 0, 0, var(--hero-scrim, 0.55));
}

.hero-content {
    position: relative;
    z-index: 3;
}

/* Honour an OS-level request to reduce motion. The video element is removed
   from the layout entirely rather than merely paused, so nothing animates and
   nothing downloads further; the still underneath becomes what is shown. */
@media (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
}

/* --- Contact: location column ------------------------------ */
.contact-info-intro {
    color: var(--color-text-muted, #555);
    line-height: 1.7;
    margin: 0;
}

.contact-label {
    font-weight: 700;
    color: var(--color-heading, #1a1a2e);
    margin-right: 0.35rem;
}

.contact-item {
    overflow-wrap: anywhere;
    min-width: 0;
}

/* The always-present route out to Google Maps. Styled as an ordinary link and
   rendered whether or not the embed above it drew anything, because nothing in
   this page can tell a working iframe from a grey box. */
.contact-map-link {
    display: inline-block;
    margin-top: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--color-heading, var(--color-primary));
}
.contact-map-link:hover { opacity: 0.75; }

@media (max-width: 700px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* NOTE: .team-grid / .team-photo-wrap are NOT overridden here. They live in
   TeamSection.razor.css, whose compiled selectors carry a [b-xxxxxxxxxx] scope
   attribute and therefore outrank any plain class selector in this file. A
   rule written here would be silently ignored -- clean build, clean page, no
   effect. The team layout is changed in that scoped stylesheet instead. */

/* --- Phone-width guard ------------------------------------- */
/* Nothing may scroll the page sideways on a phone. */
html, body { overflow-x: hidden; }

/* --- Programmatic-focus ring on the hero headline ----------- */
/* Issue #12. Joey reported this repeatedly, across more than one site: a white
   outline box around the hero headline on every fresh load, which vanishes as
   soon as you click. Do not delete this rule without reading the whole comment.

   CAUSE. It is not our CSS and not our JS. `Components/Routes.razor` uses
   Blazor's stock <FocusOnNavigate RouteData="routeData" Selector="h1" />. On
   every navigation -- including the very first page load -- blazor.web.js adds
   tabindex="-1" to the first <h1> and calls .focus() on it, so assistive tech
   announces the new view. The server HTML ships `<h1 class="hero-headline">`
   with no tabindex at all (confirmed by curl); the attribute only exists at
   runtime, which is why grepping our source for a cause kept coming up empty.
   Chrome then paints its default focus ring -- outline-style:auto, white
   against the dark hero -- and it clears the moment focus moves elsewhere.

   WHY THIS RULE IS SAFE. An element with tabindex="-1" is by definition NOT
   reachable with Tab, so no keyboard user can ever navigate to it and lose a
   focus indicator. This suppresses the ring only where focus arrived
   programmatically.

   WHY NOT A GLOBAL `outline: none`. It would strip keyboard focus visibility
   from every control on the site. JZAuto #16 called that out explicitly and
   was right. Keep this scoped to [tabindex="-1"].

   WHY NOT :focus:not(:focus-visible). That was tried first on JZ Auto and was
   NOT enough: on a fresh load, before any user interaction, Chrome's heuristic
   treats this script-driven focus AS focus-visible, so the ring still painted
   and only cleared after the first tap -- exactly what Joey saw on his phone.
   Verified over CDP on 2026-10-08: the hero <h1> matches :focus-visible even
   with the ring suppressed. Match on :focus, not :focus-visible. */
[tabindex="-1"]:focus {
    outline: none;
}
