/* ============================================================
   ADAMI CMS — Frontend Stylesheet
   Modern, clean design with Inter font
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #1d1d1f;
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: #2563eb; text-decoration: none; transition: color 0.15s; }
a:hover { color: #1d4ed8; }

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo:hover { color: #1d1d1f; }

/* === Navigation === */
.site-nav__list {
    display: flex;
    list-style: none;
    gap: 4px;
}

.site-nav__link {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    border-radius: 8px;
    transition: all 0.15s;
}

.site-nav__link:hover {
    color: #1d1d1f;
    background: #f3f4f6;
}

/* Dropdown */
.site-nav__item { position: relative; }

.site-nav__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 8px;
    list-style: none;
    z-index: 110;
}

.site-nav__item:hover .site-nav__dropdown { display: block; }

.site-nav__dropdown a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #4b5563;
    border-radius: 8px;
    transition: all 0.15s;
}

.site-nav__dropdown a:hover {
    color: #1d1d1f;
    background: #f3f4f6;
}

/* === Header Actions === */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.lang-switcher__link {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.15s;
}

.lang-switcher__link.active {
    background: #fff;
    color: #1d1d1f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.lang-switcher__link:hover { color: #1d1d1f; }

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
    transition: all 0.2s;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Main Content === */
.page-content {
    min-height: calc(100vh - 64px - 120px);
}

/* === Block Styles === */
.block-section {
    padding: 60px 24px;
}

.block-section__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.block-columns {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.block-column {
    flex: 1;
    min-width: 0;
}

/* Headings */
.block-heading { margin-bottom: 16px; }
.block-heading h1 { font-size: 48px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.block-heading h2 { font-size: 36px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.2; }
.block-heading h3 { font-size: 28px; font-weight: 600; line-height: 1.3; }
.block-heading h4 { font-size: 22px; font-weight: 600; line-height: 1.4; }
.block-heading h5 { font-size: 18px; font-weight: 600; line-height: 1.5; }
.block-heading h6 { font-size: 16px; font-weight: 600; line-height: 1.6; }

/* Text */
.block-text {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 16px;
}

.block-text p { margin-bottom: 12px; }
.block-text strong { font-weight: 600; color: #1d1d1f; }
.block-text ul, .block-text ol { margin-left: 24px; margin-bottom: 12px; }

/* Image */
.block-image { margin-bottom: 16px; }
.block-image img { border-radius: 12px; }
.block-image figcaption {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    margin-top: 8px;
}

/* Button */
.block-button { margin-bottom: 16px; }

.block-button a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.15s;
}

.block-button--primary a { background: #2563eb; color: #fff; }
.block-button--primary a:hover { background: #1d4ed8; color: #fff; }
.block-button--secondary a { background: #f3f4f6; color: #1d1d1f; }
.block-button--secondary a:hover { background: #e5e7eb; }
.block-button--outline a { border: 2px solid #d1d5db; color: #1d1d1f; background: transparent; }
.block-button--outline a:hover { border-color: #2563eb; color: #2563eb; }

/* Spacer */
.block-spacer { height: var(--spacer-height, 40px); }

/* Divider */
.block-divider {
    margin: 24px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Video */
.block-video { margin-bottom: 16px; }
.block-video__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
}
.block-video__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery — column count comes from the inline `--cols` custom property,
   set by GalleryBlock.php; media queries below step it down on small screens. */
.block-gallery {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.block-gallery img { border-radius: 8px; width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Accordion */
.block-accordion { margin-bottom: 16px; }

.block-accordion__item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.block-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-weight: 500;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s;
}

.block-accordion__header:hover { background: #f3f4f6; }

.block-accordion__body {
    padding: 0 20px 16px;
    color: #4b5563;
    line-height: 1.7;
    display: none;
}

.block-accordion__item.active .block-accordion__body { display: block; }

/* Tabs */
.block-tabs { margin-bottom: 16px; }

.block-tabs__nav {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    list-style: none;
}

.block-tabs__nav-link {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    margin-bottom: -1px;
}

.block-tabs__nav-link:hover { color: #1d1d1f; }
.block-tabs__nav-link.active { color: #2563eb; border-bottom-color: #2563eb; }

.block-tabs__panel { display: none; }
.block-tabs__panel.active { display: block; }

/* Testimonial */
.block-testimonial {
    padding: 32px;
    background: #f9fafb;
    border-radius: 16px;
    margin-bottom: 16px;
}

.block-testimonial__text {
    font-size: 18px;
    font-style: italic;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 16px;
}

.block-testimonial__author {
    font-weight: 600;
    color: #1d1d1f;
}

.block-testimonial__role {
    font-size: 14px;
    color: #9ca3af;
}

/* Pricing Table — a single plan card (PricingTableBlock.php). Place several
   side by side inside a Columns block; each card fills its column. */
.block-pricing {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    text-align: center;
    background: #fff;
    margin-bottom: 16px;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.block-pricing:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.block-pricing--highlighted {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.block-pricing__title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}

.block-pricing__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 16px 0;
}

.block-pricing__amount {
    font-size: 48px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1;
}

.block-pricing__period {
    font-size: 15px;
    color: #9ca3af;
    font-weight: 500;
}

.block-pricing__features {
    list-style: none;
    margin: 20px 0;
    padding: 0;
    text-align: left;
    flex: 1;
}

.block-pricing__features li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.block-pricing__features li:last-child { border-bottom: none; }

.block-pricing__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.15s;
}

.block-pricing__button:hover { background: #1d4ed8; color: #fff; }

.block-pricing__button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.block-pricing--highlighted .block-pricing__button { background: #1d4ed8; }

/* Form */
.block-form { margin-bottom: 16px; }

.block-form .form-field {
    margin-bottom: 16px;
}

.block-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.block-form input,
.block-form textarea,
.block-form select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fafafa;
    color: #1d1d1f;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.block-form input:focus,
.block-form textarea:focus,
.block-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.block-form textarea { min-height: 120px; resize: vertical; }

.block-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.block-form button[type="submit"]:hover { background: #1d4ed8; }

.form-success {
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #166534;
}

/* Form validation states & status slot */
.block-form .form-field-label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.block-form .adami-form-required { color: #dc2626; margin-left: 2px; }
.block-form .is-invalid { border-color: #dc2626; background: #fef2f2; }
.block-form .is-invalid:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.block-form .adami-form-error { display: block; min-height: 1em; margin-top: 4px; color: #dc2626; font-size: 12px; }
.block-form .adami-form-error:empty { display: none; }
.block-form .adami-form-status { margin-top: 12px; font-size: 14px; }
.block-form .adami-form-status.is-success { padding: 12px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; color: #166534; }
.block-form .adami-form-status.is-error   { padding: 12px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; color: #991b1b; }
.block-form .form-radio-group { display: flex; flex-direction: column; gap: 6px; }
.block-form .form-field-checkbox label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: #111; }

/* Icon Box (IconBoxBlock.php) — `--top` stacks icon over text (default),
   `--left` places the icon beside the text. */
.block-icon-box {
    padding: 24px;
    margin-bottom: 16px;
}

.block-icon-box__icon {
    font-size: 48px;
    line-height: 1;
    color: #2563eb;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.block-icon-box__title {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.block-icon-box__text {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.block-icon-box--top { text-align: center; }
.block-icon-box--top .block-icon-box__icon { margin: 0 auto 16px; }

.block-icon-box--left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
}

.block-icon-box--left .block-icon-box__icon { margin-bottom: 0; }

/* Social Icons */
.block-social {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.block-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    transition: all 0.15s;
}

.block-social a:hover { background: #2563eb; color: #fff; }

/* CTA */
.block-cta {
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 20px;
    color: #fff;
    margin-bottom: 16px;
}

.block-cta h2 { color: #fff; margin-bottom: 12px; }
.block-cta p { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }
.block-cta a { background: #fff; color: #2563eb; padding: 12px 28px; border-radius: 10px; font-weight: 500; }
.block-cta a:hover { background: rgba(255, 255, 255, 0.9); color: #1d4ed8; }

/* FAQ */
.block-faq { margin-bottom: 16px; }

/* Team — column count comes from the inline `--cols` set by TeamBlock.php. */
.block-team {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
    margin-bottom: 16px;
}

.block-team__member { text-align: center; }
.block-team__photo,
.block-team__member img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin: 0 auto 16px;
}
.block-team__name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.block-team__role { font-size: 14px; color: #6b7280; }
.block-team__bio { font-size: 14px; color: #4b5563; margin-top: 8px; line-height: 1.6; }

/* Slider */
.block-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
}

.block-slider__track {
    display: flex;
    transition: transform 0.4s ease;
}

.block-slider__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.block-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.block-slider__nav--prev { left: 12px; }
.block-slider__nav--next { right: 12px; }

/* Google Map */
.block-map {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.block-map iframe { width: 100%; height: 400px; border: none; }

/* Countdown */
.block-countdown {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.block-countdown__unit {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    min-width: 80px;
}

.block-countdown__value {
    font-size: 36px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1;
}

.block-countdown__label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Progress Bar */
.block-progress { margin-bottom: 16px; }

.block-progress__bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.block-progress__fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* === Footer === */
.site-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 40px 24px;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-nav__list {
    display: flex;
    list-style: none;
    gap: 24px;
}

.footer-nav__list a {
    font-size: 14px;
    color: #6b7280;
}

.footer-nav__list a:hover { color: #1d1d1f; }

.site-footer__copy {
    font-size: 13px;
    color: #9ca3af;
}

/* === Responsive === */
@media (max-width: 768px) {
    .site-header__inner { padding: 0 16px; }

    .mobile-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        padding: 16px;
    }

    .site-nav.open { display: block; }

    .site-nav__list {
        flex-direction: column;
        gap: 0;
    }

    .site-nav__link { padding: 12px 16px; }

    .site-nav__dropdown {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
    }

    .site-nav__item:hover .site-nav__dropdown { display: block; }

    .block-heading h1 { font-size: 32px; }
    .block-heading h2 { font-size: 26px; }

    .block-columns { flex-direction: column; }

    .block-cta { padding: 40px 24px; }

    .block-countdown { flex-wrap: wrap; }

    .site-footer__inner { flex-direction: column; text-align: center; }
    .footer-nav__list { justify-content: center; }
}

/* ============================================================
   Lightbox Gallery
   ============================================================ */
.block-lightbox-gallery {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    margin-bottom: 16px;
}

.block-lightbox-gallery__item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.block-lightbox-gallery__item:hover,
.block-lightbox-gallery__item:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    outline: none;
}

.block-lightbox-gallery__item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.block-lightbox-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lock background scroll while the lightbox is visible. */
html.adami-lightbox-locked,
html.adami-lightbox-locked body {
    overflow: hidden;
}

.adami-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.adami-lightbox--open {
    opacity: 1;
    pointer-events: auto;
}

.adami-lightbox[hidden] { display: none; }

.adami-lightbox__figure {
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.adami-lightbox__image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.adami-lightbox__caption {
    color: #f3f4f6;
    font-size: 14px;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
}

.adami-lightbox__caption[hidden] { display: none; }

.adami-lightbox__nav,
.adami-lightbox__close {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.adami-lightbox__nav:hover,
.adami-lightbox__close:hover,
.adami-lightbox__nav:focus-visible,
.adami-lightbox__close:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.adami-lightbox__nav:focus-visible,
.adami-lightbox__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.adami-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding: 0 0 4px;
}

.adami-lightbox__nav--prev { left: 16px; }
.adami-lightbox__nav--next { right: 16px; }

.adami-lightbox__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0 0 4px;
    font-size: 28px;
}

.adami-lightbox__nav[hidden],
.adami-lightbox__close[hidden] { display: none; }

/* ============================================================
   Before / After Compare Slider
   ============================================================ */
.block-before-after {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    user-select: none;
    touch-action: none; /* required for pointer-capture drag on touch devices */
    cursor: col-resize;
}

.block-before-after__pane {
    position: relative;
}

.block-before-after__pane img {
    display: block;
    width: 100%;
    height: auto;
}

/* Stack the after-pane on top of the before-pane; clip-path reveals the
   before-pane as the handle moves left. */
.block-before-after__pane--after {
    position: absolute;
    inset: 0;
    /* clip-path is written dynamically via JS; default reveals 50%. */
    clip-path: inset(0 50% 0 0);
}

.block-before-after__pane--after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-before-after__label {
    position: absolute;
    bottom: 12px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    pointer-events: none;
}

.block-before-after__pane--before .block-before-after__label { left: 12px; }
.block-before-after__pane--after .block-before-after__label { right: 12px; }

.block-before-after__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: #fff;
    border: none;
    padding: 0;
    cursor: col-resize;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.block-before-after__handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.block-before-after__handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    /* Two-arrow chevron baked in via box-shadow to avoid inline SVG. */
    border-left: 2px solid #1d1d1f;
    border-right: 2px solid #1d1d1f;
    background: transparent;
}

.block-before-after__handle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

/* ============================================================
   Modal Trigger (<dialog>)
   ============================================================ */
.block-modal-trigger { display: inline-block; }

.block-modal {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    background: #fff;
    color: #1d1d1f;
}

.block-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.block-modal--sm { width: 400px; }
.block-modal--md { width: 600px; }
.block-modal--lg { width: 900px; }

.block-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
}

.block-modal__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.block-modal__close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    color: #6b7280;
    border-radius: 6px;
    transition: background 0.15s;
}

.block-modal__close:hover,
.block-modal__close:focus-visible {
    background: #f3f4f6;
    color: #1d1d1f;
    outline: none;
}

.block-modal__close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.block-modal__body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 64px);
    line-height: 1.6;
}

/* ============================================================
   Copy-to-Clipboard Feedback
   ============================================================ */
.adami-copy-button--success {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
    transition: background 0.15s ease, color 0.15s ease;
}

/* ============================================================
   Code Snippet (shared with copy-to-clipboard above)
   ============================================================ */
.block-code {
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', ui-monospace, monospace;
}

.block-code--dark { background: #1e293b; color: #f1f5f9; }
.block-code--light { background: #f3f4f6; color: #1d1d1f; }

.block-code__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.block-code--light .block-code__header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.block-code__filename {
    font-weight: 600;
    opacity: 0.8;
}

.block-code__copy {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.block-code__copy:hover,
.block-code__copy:focus-visible {
    opacity: 1;
    outline: none;
}

.block-code__copy:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.block-code__pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.block-code__pre code {
    font-family: inherit;
}

/* ============================================================
   Share Buttons
   ============================================================ */
.block-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.block-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #1d1d1f;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.block-share__btn:hover,
.block-share__btn:focus-visible {
    background: #f3f4f6;
    color: #1d1d1f;
    outline: none;
}

.block-share__btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ============================================================
   BLOG INDEX / TAXONOMY LIST
   ============================================================ */
.blog-index {
    padding: 64px 24px;
}
.blog-index__container {
    max-width: 1120px;
    margin: 0 auto;
}
.blog-index__header {
    margin-bottom: 48px;
    text-align: center;
}
.blog-index__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 8px;
}
.blog-index__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: #1d1d1f;
    margin-bottom: 8px;
}
.blog-index__lead {
    color: #4b5563;
    font-size: 1.125rem;
}
.blog-index__empty {
    text-align: center;
    color: #6b7280;
    padding: 48px 0;
}

.blog-post-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .blog-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .blog-post-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-post-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.blog-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: #d1d5db;
}
.blog-post-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.blog-post-card__link:hover { color: inherit; }
.blog-post-card__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.blog-post-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}
.blog-post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.blog-post-card:hover .blog-post-card__img { transform: scale(1.04); }
.blog-post-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.blog-post-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1d1d1f;
}
.blog-post-card__excerpt {
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: auto;
}
.blog-post-meta__author { font-weight: 500; color: #1f2937; }
.blog-post-meta__reading-time {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.75rem;
}

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
}
.blog-pagination__link {
    padding: 8px 16px;
    border-radius: 8px;
    color: #2563eb;
    font-weight: 500;
    transition: background 0.15s;
}
.blog-pagination__link:hover { background: #eff6ff; }
.blog-pagination__link:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.blog-pagination__link.is-disabled {
    color: #9ca3af;
    pointer-events: none;
}
.blog-pagination__info { color: #6b7280; font-size: 0.875rem; }

/* ============================================================
   BLOG SINGLE POST
   ============================================================ */
.blog-post {
    padding-bottom: 96px;
}
.blog-post-header {
    margin-bottom: 48px;
}
.blog-post-header__media {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background: #f3f4f6;
}
.blog-post-header__img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.blog-post-header__inner {
    max-width: 760px;
    margin: -48px auto 0;
    padding: 32px 24px 0;
    background: #fff;
    position: relative;
    border-radius: 12px 12px 0 0;
    text-align: center;
}
.blog-post-header:not(:has(.blog-post-header__media)) .blog-post-header__inner {
    margin-top: 48px;
    background: transparent;
    padding-top: 0;
}
.blog-post-header__category {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    margin-bottom: 12px;
}
.blog-post-header__category a { color: #2563eb; font-weight: 600; }
.blog-post-header__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #1d1d1f;
}
.blog-post-header__lead {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}
.blog-post-header__meta {
    justify-content: center;
}

.blog-post-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}
.blog-post-content > * + * { margin-top: 20px; }
.blog-post-content h2,
.blog-post-content h3 {
    margin-top: 40px;
    margin-bottom: 12px;
    line-height: 1.3;
}
.blog-post-content p { line-height: 1.8; color: #374151; }
.blog-post-content img { border-radius: 8px; margin: 24px 0; }

.blog-post-footer {
    max-width: 760px;
    margin: 48px auto 0;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-post-footer__tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.blog-post-footer__tag {
    display: inline-flex;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 999px;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}
.blog-post-footer__tag:hover { background: #dbeafe; color: #1e40af; }
.blog-post-footer__tag:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.blog-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
}
.blog-share__label { color: #6b7280; }
.blog-share__link {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    transition: all 0.15s;
}
.blog-share__link:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.blog-share__link:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ============================================================
 * Blog comments (Task #76)
 * ============================================================ */
.blog-comments-section {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.blog-comments-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}
.blog-comments-section__count { color: #6b7280; font-weight: 500; }
.blog-comments-empty,
.blog-comments-closed { color: #6b7280; font-style: italic; }

.blog-comments,
.blog-comments__replies {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.blog-comments__replies {
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px solid #e5e7eb;
}
.blog-comment {
    display: block;
}
.blog-comment--depth-0 > .blog-comment__body { background: #f9fafb; }
.blog-comment--depth-1 > .blog-comment__body { background: #fff; }
.blog-comment--depth-2 > .blog-comment__body { background: #f9fafb; }

.blog-comment__body {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.blog-comment__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.blog-comment__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #e5e7eb;
}
.blog-comment__author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.blog-comment__author-name,
.blog-comment__author-link {
    font-weight: 600;
    color: #111827;
}
.blog-comment__author-link { text-decoration: none; }
.blog-comment__author-link:hover { color: #2563eb; text-decoration: underline; }
.blog-comment__time {
    font-size: 0.8125rem;
    color: #6b7280;
}
.blog-comment__content {
    color: #374151;
    line-height: 1.6;
}
.blog-comment__content p { margin: 0 0 8px; }
.blog-comment__content p:last-child { margin-bottom: 0; }
.blog-comment__actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}
.blog-comment__reply,
.blog-comment__reply-link {
    background: transparent;
    border: 0;
    padding: 4px 8px;
    color: #2563eb;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
}
.blog-comment__reply:hover { background: #eff6ff; }
.blog-comment__reply:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Comment form ---------------------------------------------- */
.blog-comment-form {
    margin-top: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.blog-comment-form__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}
.blog-comment-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 640px) {
    .blog-comment-form__row { grid-template-columns: 1fr; }
}
.blog-comment-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.blog-comment-form__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}
.blog-comment-form__field input,
.blog-comment-form__field textarea {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.blog-comment-form__field input:focus,
.blog-comment-form__field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.blog-comment-form__field input.is-invalid,
.blog-comment-form__field textarea.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.blog-comment-form__hint {
    font-size: 0.75rem;
    color: #6b7280;
}
.blog-comment-form__error {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 2px;
}

.blog-comment-form__reply-indicator {
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.875rem;
    color: #1e40af;
}
.blog-comment-form__reply-indicator[hidden] { display: none; }
.blog-comment-form__reply-indicator button {
    background: transparent;
    border: 0;
    color: #1d4ed8;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
}

.blog-comment-form__actions { display: flex; justify-content: flex-end; }
.blog-comment-form__submit {
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.blog-comment-form__submit:hover:not([disabled]) { background: #1d4ed8; }
.blog-comment-form__submit:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.blog-comment-form__submit[disabled] {
    background: #9ca3af;
    cursor: wait;
}

.blog-comment-form__notice {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9375rem;
}
.blog-comment-form__notice[hidden] { display: none; }
.blog-comment-form__notice--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.blog-comment-form__notice--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ============================================================
 * Newsletter subscribe block (Task #77)
 * Counterpart to the legacy .block-newsletter — plain form layout.
 * ============================================================ */
.block-newsletter-subscribe {
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.block-newsletter-subscribe__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}
.block-newsletter-subscribe__lead {
    margin: 0;
    color: #4b5563;
}
.block-newsletter-subscribe__form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.block-newsletter-subscribe__input {
    flex: 1 1 220px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    font-size: 0.9375rem;
}
.block-newsletter-subscribe__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.block-newsletter-subscribe__submit {
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.block-newsletter-subscribe__submit:hover { background: #1d4ed8; }
.block-newsletter-subscribe__submit:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.block-newsletter-subscribe__hint {
    font-size: 0.8125rem;
    color: #6b7280;
}
.block-newsletter-subscribe__notice {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
}
.block-newsletter-subscribe__notice--success {
    background: #d1fae5;
    color: #065f46;
}
.block-newsletter-subscribe__notice--error {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================================
   MODERN LAYOUT BLOCKS
   These blocks are emitted by the newer *Block.php renderers. Grid
   column counts arrive via the inline `--cols` custom property; the
   stylesheet owns the actual grid template so media queries can reflow
   the layout on tablet/mobile without any client-side JS.

   Breakpoints used throughout: tablet ≤ 768px, mobile ≤ 480px.
   ============================================================ */

/* --- Shared CTA button (heroes, banners) ------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.btn--primary { background: #2563eb; color: #fff; }
.btn--primary:hover { background: #1d4ed8; color: #fff; }
.btn--secondary { background: #f3f4f6; color: #1d1d1f; }
.btn--secondary:hover { background: #e5e7eb; color: #1d1d1f; }

/* --- Hero: split (HeroSplitBlock) -------------------------- */
.block-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto 16px;
    padding: 64px 24px;
}
/* `--reverse` flips the visual order so the image sits on the left while
   keeping content first in the DOM for reading/screen-reader order. */
.block-hero-split--reverse .block-hero-split__content { order: 2; }
.block-hero-split--reverse .block-hero-split__media { order: 1; }
.block-hero-split__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 12px;
}
.block-hero-split__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: #1d1d1f;
    margin-bottom: 16px;
}
.block-hero-split__text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 28px;
}
.block-hero-split__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.block-hero-split__media img,
.block-hero-split__media picture {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* --- Hero: centered (HeroCenteredBlock) -------------------- */
.block-hero-centered {
    position: relative;
    overflow: hidden;
    padding: 96px 24px;
}
.block-hero-centered__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.block-hero-centered__content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}
.block-hero-centered__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 12px;
}
.block-hero-centered__title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.block-hero-centered__text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 28px;
}
/* When the hero has a dark image background the renderer paints an overlay;
   inherit colour so author-set text_color (or white) stays readable. */
.block-hero-centered__overlay ~ .block-hero-centered__content .block-hero-centered__text { color: inherit; }
.block-hero-centered__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.block-hero-centered[style*="text-align:left"] .block-hero-centered__ctas { justify-content: flex-start; }
.block-hero-centered[style*="text-align:right"] .block-hero-centered__ctas { justify-content: flex-end; }

/* --- Heroes on a colored/image background -------------------------------
   When a hero sets an inline background (colour or image) the default
   dark-on-light palette becomes unreadable. Flip text to light and give the
   CTAs high-contrast treatment (solid white primary, outlined secondary). */
.block-hero-split[style*="background"] .block-hero-split__eyebrow,
.block-hero-centered[style*="background"] .block-hero-centered__eyebrow { color: rgba(255, 255, 255, 0.85); }
.block-hero-split[style*="background"] .block-hero-split__title,
.block-hero-centered[style*="background"] .block-hero-centered__title { color: #fff; }
.block-hero-split[style*="background"] .block-hero-split__text,
.block-hero-centered[style*="background"] .block-hero-centered__text { color: rgba(255, 255, 255, 0.9); }
.block-hero-split[style*="background"] .btn--primary,
.block-hero-centered[style*="background"] .btn--primary { background: #fff; color: #111827; }
.block-hero-split[style*="background"] .btn--primary:hover,
.block-hero-centered[style*="background"] .btn--primary:hover { background: rgba(255, 255, 255, 0.9); color: #111827; }
.block-hero-split[style*="background"] .btn--secondary,
.block-hero-centered[style*="background"] .btn--secondary { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }
.block-hero-split[style*="background"] .btn--secondary:hover,
.block-hero-centered[style*="background"] .btn--secondary:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* --- Hero: video background (HeroVideoBackgroundBlock) ------ */
.block-hero-video {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 96px 24px;
    color: #fff;
}
.block-hero-video__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.block-hero-video__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.block-hero-video__content {
    position: relative;
    z-index: 3;
    max-width: 760px;
}
.block-hero-video__title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 16px;
}
.block-hero-video__text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}
.block-hero-video__cta { background: #fff; color: #1d1d1f; }
.block-hero-video__cta:hover { background: rgba(255, 255, 255, 0.9); color: #1d1d1f; }

/* --- Card grid (CardGridBlock) ----------------------------- */
.block-card-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
    margin-bottom: 16px;
}
.block-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.block-card--elevated { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.block-card--elevated:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1); transform: translateY(-3px); }
.block-card--bordered { border: 1px solid #e5e7eb; }
.block-card--bordered:hover { border-color: #d1d5db; transform: translateY(-3px); }
.block-card--flat { background: #f9fafb; }
.block-card__image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.block-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.block-card__title { font-size: 18px; font-weight: 600; color: #1d1d1f; line-height: 1.3; }
.block-card__text { font-size: 15px; line-height: 1.6; color: #4b5563; }
.block-card__link {
    margin-top: auto;
    padding-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}
.block-card__link:hover { color: #1d4ed8; }

/* --- Stats grid (StatsGridBlock) --------------------------- */
.block-stats-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 24px;
    margin-bottom: 16px;
}
.block-stats-grid__item { display: flex; flex-direction: column; gap: 6px; }
.block-stats-grid__icon { font-size: 28px; color: #2563eb; }
.block-stats-grid__value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    color: #1d1d1f;
}
.block-stats-grid__label { font-size: 15px; font-weight: 600; color: #1d1d1f; }
.block-stats-grid__description { font-size: 14px; color: #6b7280; line-height: 1.5; }

/* --- Feature list (FeatureListBlock) ----------------------- */
.block-feature-list {
    display: grid;
    grid-template-columns: repeat(var(--cols, 1), 1fr);
    gap: 16px 24px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.block-feature-list__item { display: flex; align-items: flex-start; gap: 12px; }
.block-feature-list__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    color: #2563eb;
    background: currentColor;
    border-radius: 50%;
    position: relative;
}
/* Icon glyphs drawn with a mask-free pseudo element so no icon font is needed. */
.block-feature-list__icon::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
}
.block-feature-list__icon--check::before {
    width: 6px;
    height: 11px;
    margin-top: 4px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.block-feature-list__icon--star::before {
    width: 0;
    height: 0;
    top: 5px;
    left: 5px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 10px solid #fff;
}
.block-feature-list__icon--arrow::before {
    width: 6px;
    height: 6px;
    border: solid #fff;
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
}
.block-feature-list__title { font-size: 16px; font-weight: 600; color: #1d1d1f; margin-bottom: 2px; }
.block-feature-list__text { font-size: 15px; line-height: 1.6; color: #4b5563; }

/* --- Benefits grid (BenefitsGridBlock) --------------------- */
.block-benefits {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 32px;
    margin-bottom: 16px;
}
.block-benefits__item { text-align: center; }
.block-benefits__icon {
    display: inline-block;
    margin-bottom: 16px;
    line-height: 1;
}
.block-benefits__title { font-size: 18px; font-weight: 600; color: #1d1d1f; margin-bottom: 8px; }
.block-benefits__text { font-size: 15px; line-height: 1.7; color: #4b5563; }

/* --- Logo cloud (LogoCloudBlock) --------------------------- */
.block-logo-cloud { margin-bottom: 16px; }
.block-logo-cloud__title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 24px;
}
.block-logo-cloud__grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 24px;
    align-items: center;
}
.block-logo-cloud__link,
.block-logo-cloud__item {
    display: flex;
    align-items: center;
    justify-content: center;
}
.block-logo-cloud__img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}
.block-logo-cloud--grayscale .block-logo-cloud__img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.2s, opacity 0.2s;
}
.block-logo-cloud--grayscale.block-logo-cloud--hover-color .block-logo-cloud__link:hover .block-logo-cloud__img {
    filter: grayscale(0);
    opacity: 1;
}

/* --- Reviews (ReviewsBlock) -------------------------------- */
.block-reviews {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
    margin-bottom: 16px;
}
.block-reviews__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}
.block-reviews__rating { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }
.block-reviews__quote {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    flex: 1;
}
.block-reviews__footer { display: flex; align-items: center; gap: 12px; }
.block-reviews__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.block-reviews__meta { display: flex; flex-direction: column; }
.block-reviews__name { font-weight: 600; font-style: normal; color: #1d1d1f; }
.block-reviews__role,
.block-reviews__sub { font-size: 13px; color: #9ca3af; }

/* --- Bento grid (BentoGridBlock) --------------------------- */
.block-bento-grid {
    display: grid;
    grid-template-columns: repeat(var(--bento-cols, 12), 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.block-bento-grid__cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    padding: 20px;
    border-radius: 14px;
    background-color: #f9fafb;
    overflow: hidden;
}
/* Cells with a background image get a readability scrim and light text. */
.block-bento-grid__cell[style*="background-image"] { color: #fff; }
.block-bento-grid__cell[style*="background-image"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
}
.block-bento-grid__title,
.block-bento-grid__text { position: relative; z-index: 2; }
.block-bento-grid__title { font-size: 18px; font-weight: 600; }
.block-bento-grid__text { font-size: 14px; line-height: 1.6; }

/* --- CTA banner (CtaBannerBlock) --------------------------- */
.block-cta-banner {
    padding: 64px 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
}
.block-cta-banner__inner { max-width: 760px; margin: 0 auto; }
.block-cta-banner__title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; color: #fff; margin-bottom: 12px; }
.block-cta-banner__text { font-size: 1.125rem; line-height: 1.7; color: rgba(255, 255, 255, 0.9); margin-bottom: 28px; }
.block-cta-banner__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.block-cta-banner[style*="text-align:left"] .block-cta-banner__ctas { justify-content: flex-start; }
.block-cta-banner[style*="text-align:right"] .block-cta-banner__ctas { justify-content: flex-end; }
.block-cta-banner .btn--primary { background: #fff; color: #2563eb; }
.block-cta-banner .btn--primary:hover { background: rgba(255, 255, 255, 0.9); color: #1d4ed8; }
.block-cta-banner .btn--secondary { background: rgba(255, 255, 255, 0.15); color: #fff; }
.block-cta-banner .btn--secondary:hover { background: rgba(255, 255, 255, 0.25); color: #fff; }

/* --- Callout (CalloutBlock) -------------------------------- */
.block-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid;
    margin-bottom: 16px;
}
.block-callout__icon { font-size: 20px; line-height: 1.4; flex-shrink: 0; }
.block-callout__body { flex: 1; }
.block-callout__title { display: block; font-weight: 600; margin-bottom: 4px; }
.block-callout__text { font-size: 15px; line-height: 1.6; }
.block-callout__dismiss {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    padding: 0 4px;
}
.block-callout__dismiss:hover { opacity: 1; }
.block-callout__dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.block-callout--info { background: #eff6ff; border-color: #2563eb; color: #1e40af; }
.block-callout--success { background: #f0fdf4; border-color: #16a34a; color: #166534; }
.block-callout--warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.block-callout--danger { background: #fef2f2; border-color: #dc2626; color: #991b1b; }
.block-callout--tip { background: #f5f3ff; border-color: #7c3aed; color: #5b21b6; }

/* --- Timeline (TimelineBlock) ------------------------------ */
.block-timeline {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.block-timeline--vertical .block-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 16px;
    padding-bottom: 28px;
}
.block-timeline--vertical .block-timeline__item:last-child { padding-bottom: 0; }
.block-timeline--vertical .block-timeline__marker {
    position: relative;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border-radius: 50%;
    background: #2563eb;
    z-index: 1;
}
/* Connector line linking each marker to the next. */
.block-timeline--vertical .block-timeline__item:not(:last-child) .block-timeline__marker::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 28px);
    background: #e5e7eb;
}
.block-timeline__date { display: block; font-size: 13px; font-weight: 600; color: #2563eb; margin-bottom: 2px; }
.block-timeline__title { font-size: 16px; font-weight: 600; color: #1d1d1f; margin-bottom: 4px; }
.block-timeline__text { font-size: 15px; line-height: 1.6; color: #4b5563; }
.block-timeline--horizontal {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.block-timeline--horizontal .block-timeline__item {
    flex: 0 0 240px;
    border-top: 2px solid #e5e7eb;
    padding-top: 16px;
}
.block-timeline--horizontal .block-timeline__marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: -23px;
    margin-bottom: 8px;
}

/* --- Process steps (ProcessStepsBlock) --------------------- */
.block-process {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    gap: 24px;
}
.block-process--horizontal { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.block-process--vertical { display: flex; flex-direction: column; }
.block-process__step { display: flex; flex-direction: column; gap: 12px; }
.block-process--vertical .block-process__step { flex-direction: row; align-items: flex-start; }
.block-process__marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.block-process__title { font-size: 16px; font-weight: 600; color: #1d1d1f; margin-bottom: 4px; }
.block-process__text { font-size: 15px; line-height: 1.6; color: #4b5563; }

/* ============================================================
   RESPONSIVE — modern layout blocks
   ============================================================ */
@media (max-width: 768px) {
    /* Heroes stack on tablet/mobile. */
    .block-hero-split {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 24px;
    }
    .block-hero-split--reverse .block-hero-split__content,
    .block-hero-split--reverse .block-hero-split__media { order: 0; }
    .block-hero-centered { padding: 64px 24px; }
    .block-hero-video { min-height: 60vh; padding: 64px 24px; }

    /* Multi-column grids drop to two columns. */
    .block-card-grid,
    .block-stats-grid,
    .block-benefits,
    .block-reviews,
    .block-logo-cloud__grid,
    .block-team,
    .block-gallery,
    .block-lightbox-gallery { grid-template-columns: repeat(2, 1fr); }

    /* Single-column-on-desktop grids that requested more columns collapse. */
    .block-feature-list { grid-template-columns: 1fr; }

    /* Bento: drop to a 2-track grid and let cells span full rows. */
    .block-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .block-bento-grid__cell { grid-column: span 1 !important; grid-row: auto !important; }

    .block-cta-banner { padding: 48px 24px; }
}

@media (max-width: 480px) {
    /* Everything collapses to a single column on phones. */
    .block-card-grid,
    .block-stats-grid,
    .block-benefits,
    .block-reviews,
    .block-team,
    .block-bento-grid { grid-template-columns: 1fr; }

    /* Logos and galleries keep two columns so they don't become oversized. */
    .block-logo-cloud__grid,
    .block-gallery,
    .block-lightbox-gallery { grid-template-columns: repeat(2, 1fr); }

    .block-icon-box--left { flex-direction: column; text-align: center; }
    .block-icon-box--left .block-icon-box__icon { margin: 0 auto 16px; }

    .block-process--horizontal { grid-template-columns: 1fr; }
    .block-timeline--horizontal { gap: 16px; }

    .block-hero-centered { padding: 48px 20px; }
    .block-cta-banner { padding: 40px 20px; }
}

/* ===========================================================================
   Per-device block visibility
   The builder writes settings.responsive.{hideMobile,hideTablet,hideDesktop};
   the PHP renderer wraps such blocks in `.block-responsive` plus the matching
   `b-hide-*` class. These static media queries do the actual hiding.
   Breakpoints match the rest of this file: mobile ≤ 480px, tablet 481–768px.
   =========================================================================== */
@media (max-width: 480px) {
    .b-hide-mobile { display: none !important; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .b-hide-tablet { display: none !important; }
}

@media (min-width: 769px) {
    .b-hide-desktop { display: none !important; }
}
