/* Prevent horizontal scrollbar caused by 100vw breakout */
html:has(.sv-detail),
html:has(.sv-detail) body {
    overflow-x: hidden;
}

/* Spaans reference layout: gold accents, wide hero image, section rhythm */
.sv-detail {
    --sv-gold: #c9a227;
    --sv-gold-hover: #b08f1c;
    --sv-text: #333;
    --sv-text-muted: #666;
    /*
     * Break out of Bootstrap's fixed-width .container so the hero can span
     * the full viewport. Use negative margins to cancel the parent padding.
     */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    margin-bottom: 0;
    color: var(--sv-text);
    overflow-x: hidden;
}

.sv-detail__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.sv-detail__back {
    display: inline-block;
    margin: 16px 0 12px;
    text-decoration: none;
    color: var(--sv-text-muted);
}

/* First section after hero gets top breathing room */
.sv-detail__container > .sv-section:first-child,
.sv-detail__container > .sv-project-feature:first-child {
    margin-top: 48px;
}

.sv-detail__back:hover {
    color: var(--sv-gold);
}

.sv-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
    /* No margin-bottom here; the sv-detail__container below provides spacing */
    margin-bottom: 0;
    width: 100%;
}

/* Media column: prevent content from blowing out grid column */
.sv-hero__media {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.sv-hero-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.sv-hero-gallery__viewport {
    overflow: hidden;
    width: 100%;
    /* Mobile: fixed 50vh height */
    height: 50vh;
    min-height: 240px;
    min-width: 0;
    touch-action: pan-y pinch-zoom;
}

.sv-hero-gallery__track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease-out;
    will-change: transform;
}

.sv-hero-gallery__slide {
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 100%;
    /* Width is set by JS layout(); CSS just prevents shrink */
}

.sv-hero-gallery__zoom {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    text-align: left;
    overflow: hidden;
}

.sv-hero-gallery__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.sv-hero-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--sv-gold);
    color: #fff;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.sv-hero-gallery__arrow:hover {
    background: var(--sv-gold-hover);
}

.sv-hero-gallery__arrow--prev {
    left: 10px;
}

.sv-hero-gallery__arrow--next {
    right: 10px;
}

.sv-hero-gallery__arrow-icon {
    pointer-events: none;
    display: block;
    font-size: 1.75rem;
    margin-top: -2px;
}

@media (min-width: 961px) {
    .sv-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 2.5rem;
        min-height: calc(100vh - 12rem);
        max-height: 900px;
    }

    .sv-hero__media {
        height: 100%;
        min-height: inherit;
        min-width: 0;
        overflow: hidden;
    }

    .sv-hero-gallery,
    .sv-hero-gallery__viewport {
        height: 100%;
        min-height: inherit;
    }

    .sv-hero__content {
        padding: 48px 64px 48px 48px;
        overflow-y: auto;
        align-self: center;
        min-width: 0;
    }
}

/* Content column base (mobile-first) */
.sv-hero__content {
    padding: 28px 20px;
}

.sv-hero__title {
    margin: 0 0 10px;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.15;
    color: #1a1a1a;
}

.sv-hero__ref {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--sv-text-muted);
}

.sv-hero__address {
    margin: 0 0 14px;
    color: var(--sv-text-muted);
    font-size: 0.95rem;
}

.sv-hero__street,
.sv-hero__location {
    margin: 0 0 6px;
    color: var(--sv-text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.sv-hero__ref-row {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--sv-text-muted);
}

.sv-hero__ref-row .sv-hero__ref-label::after {
    content: '.';
}

.sv-hero__ref-row .sv-hero__ref-num {
    margin-left: 0.25em;
}

.sv-hero__rule {
    display: block;
    border: 0;
    clear: both;
    height: 1px;
    background: var(--sv-gold);
    margin: 0 0 20px;
    width: 8rem;
    max-width: 100%;
}

.sv-hero__intro {
    margin: 0 0 16px;
    line-height: 1.65;
    font-size: 1rem;
    color: var(--sv-text);
}

.sv-hero__price {
    margin: 0 0 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--sv-text);
}

.sv-hero__slogan {
    margin: 0 0 16px;
    font-style: italic;
    color: var(--sv-text-muted);
}

.sv-hero__share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 8px 0 0;
}

.sv-hero__share-label {
    font-size: 0.95rem;
    color: var(--sv-text);
    margin: 0;
}

.sv-hero__share {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sv-hero__share-row .sv-btn--hero-contact {
    margin-left: auto;
}

.sv-hero__share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    color: var(--sv-text);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sv-hero__share-link svg {
    flex-shrink: 0;
}

.sv-hero__share-link:hover {
    border-color: var(--sv-gold);
    color: var(--sv-gold);
}

.sv-hero__actions {
    margin-top: 4px;
}

/* Project feature blocks (Payload ProjectFeatures) */
.sv-project-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    align-items: center;
    margin: 0 0 48px;
}

.sv-project-feature--reverse .sv-project-feature__media {
    order: 2;
}

.sv-project-feature--reverse .sv-project-feature__body {
    order: 1;
}

.sv-project-feature__img-wrap {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #eee;
}

.sv-project-feature__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.sv-project-feature__body {
    padding: 12px 0;
}

.sv-project-feature__title {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: #1a1a1a;
}

.sv-project-feature__html {
    margin-top: 0;
}

/* Virtual tour */
.sv-virtual-tour__frame {
    max-width: 72rem;
    margin: 0 auto;
}

.sv-virtual-tour__iframe {
    display: block;
    width: 100%;
    height: min(66vh, 640px);
    border: 0;
    border-radius: 4px;
}

.sv-btn {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    border: 1px solid #222;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sv-btn--hero-contact {
    color: #111;
    background: #fff;
    border-color: #111;
}

.sv-btn--hero-contact:hover {
    background: #111;
    color: #fff;
}

.sv-btn--block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.sv-btn--primary {
    color: #fff;
    background: #444;
}

.sv-btn--secondary {
    color: #444;
    background: #fff;
}

.sv-gallery-block {
    margin-bottom: 48px;
}

.sv-gallery-block__frame {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    gap: 8px;
    margin-top: 8px;
}

.sv-gallery-block__scroll {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 8px;
}

.sv-gallery-block__scroll::-webkit-scrollbar {
    display: none;
}

.sv-gallery-block__arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--sv-gold);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease;
}

.sv-gallery-block__arrow:hover {
    background: var(--sv-gold-hover);
}

@media (max-width: 600px) {
    .sv-gallery-block__arrow {
        width: 38px;
        height: 38px;
        font-size: 1.25rem;
    }
}

.sv-gallery-strip {
    display: flex;
    gap: 12px;
    margin: 0;
    scroll-snap-type: x mandatory;
}

.sv-gallery-strip__thumb {
    border: 1px solid #ddd;
    background: #fff;
    padding: 0;
    width: 160px;
    min-width: 160px;
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: opacity 0.2s ease;
}

.sv-gallery-strip__thumb:hover {
    opacity: 0.92;
}

.sv-gallery-strip__thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.sv-section {
    margin-bottom: 40px;
}

.sv-section--prose {
    margin-bottom: 48px;
}

.sv-section__title {
    margin: 0 0 10px;
    color: var(--sv-gold);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: inherit;
}

.sv-section__title--accent {
    color: var(--sv-gold);
}

.sv-section__title--center {
    text-align: center;
}

.sv-characteristics-block {
    margin-top: 0;
    margin-bottom: 48px;
    clear: both;
}

.sv-section__rule {
    display: block;
    border: 0;
    clear: both;
    height: 2px;
    margin: 0 0 22px;
    width: 4rem;
    max-width: 100%;
    background: var(--sv-gold);
    opacity: 1;
}

.sv-section__rule--accent {
    background: var(--sv-gold);
}

.sv-section__rule--center {
    margin-left: auto;
    margin-right: auto;
}

.sv-section__content--prose {
    line-height: 1.7;
    font-size: 1rem;
    color: var(--sv-text);
}

.sv-section__content--prose h3,
.sv-section__content--prose h4 {
    color: var(--sv-gold);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.75rem;
}

.sv-characteristics-grid {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 1.5rem;
    row-gap: 0.25rem;
}

@media (min-width: 768px) {
    .sv-characteristics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .sv-characteristics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sv-characteristics-grid__item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.sv-characteristics-grid__check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    color: var(--sv-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-characteristics-grid__text {
    color: inherit;
}

.sv-table-wrap {
    overflow-x: auto;
}

.sv-units-table {
    width: 100%;
    border-collapse: collapse;
}

.sv-units-table th,
.sv-units-table td {
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
    font-size: 0.9rem;
}

.sv-units-table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--sv-text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--sv-gold);
}

.sv-units-table__th-narrow {
    text-align: center;
}

.sv-units-table__th-narrow abbr {
    text-decoration: none;
    border-bottom: 0;
    cursor: help;
}

.sv-units-table__cell-center {
    text-align: center;
}

.sv-units-table__cell-plan {
    text-align: center;
}

.sv-units-table__cell-marquee {
    text-align: center;
}

.sv-units-table__marquee {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.sv-units-table__plan-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    text-decoration: none;
    color: var(--sv-text);
    font-size: 1.1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.sv-units-table__plan-link:hover {
    border-color: var(--sv-gold);
    color: var(--sv-gold);
}

.sv-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 40px;
    align-items: start;
    margin-top: 8px;
}

.sv-contact__grid--form-only {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.sv-contact__col--centered {
    max-width: 760px;
    margin: 0 auto;
}

.sv-contact__lead {
    margin: 0 0 20px;
    line-height: 1.65;
    color: var(--sv-text);
}

.sv-contact__aside-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sv-gold);
}

.sv-contact__manager-photo {
    width: 100%;
    max-width: 220px;
    height: auto;
    display: block;
    margin-bottom: 14px;
    border: 1px solid #e8e8e8;
}

.sv-contact__manager-name {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1.05rem;
}

.sv-contact__manager-role {
    margin: 0 0 12px;
    color: var(--sv-text-muted);
    font-size: 0.9rem;
}

.sv-contact__manager-line {
    margin: 0 0 6px;
}

.sv-contact__manager-line a {
    color: var(--sv-text);
    text-decoration: none;
}

.sv-contact__manager-line a:hover {
    color: var(--sv-gold);
}

.sv-contact__aside-placeholder {
    margin: 0;
    line-height: 1.6;
    color: var(--sv-text-muted);
    font-size: 0.95rem;
}

/* Contact form */
.sv-contact-form {
    width: 100%;
}

.sv-contact-form__row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sv-contact-form__field {
    margin-bottom: 12px;
}

.sv-contact-form input[type="text"],
.sv-contact-form input[type="email"],
.sv-contact-form input[type="tel"],
.sv-contact-form textarea {
    display: block;
    width: 100%;
    padding: 16px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--sv-text);
    background: #f7f7f7;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sv-contact-form input::placeholder,
.sv-contact-form textarea::placeholder {
    color: #888;
}

.sv-contact-form input:focus,
.sv-contact-form textarea:focus {
    outline: none;
    border-color: var(--sv-gold);
    background: #fff;
}

.sv-contact-form textarea {
    resize: vertical;
    min-height: 130px;
}

.sv-contact-form__privacy {
    margin: 20px 0 8px;
    font-size: 0.9rem;
    color: var(--sv-text-muted);
    line-height: 1.5;
}

.sv-contact-form__privacy label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.sv-contact-form__privacy input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--sv-gold);
}

.sv-contact-form__consent {
    margin: 8px 0 24px;
    font-size: 0.85rem;
    color: var(--sv-text-muted);
    line-height: 1.6;
}

.sv-contact-form__consent a {
    color: var(--sv-text);
    text-decoration: underline;
}

.sv-contact-form__actions {
    text-align: center;
    margin-bottom: 14px;
}

.sv-contact-form__actions .sv-btn {
    display: inline-block;
    min-width: 200px;
    padding: 16px 40px;
    font-size: 0.95rem;
    text-align: center;
    letter-spacing: 0.04em;
}

.sv-contact-form__feedback {
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sv-contact-form__feedback--ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.sv-contact-form__feedback--err {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

@media (max-width: 600px) {
    .sv-contact-form__row--2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .sv-hero {
        grid-template-columns: 1fr;
        min-height: unset;
        max-height: unset;
    }

    .sv-hero__content {
        padding: 24px 16px;
    }

    .sv-hero__share-row .sv-btn--hero-contact {
        margin-left: 0;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .sv-project-feature,
    .sv-project-feature--reverse {
        grid-template-columns: 1fr;
    }

    .sv-project-feature--reverse .sv-project-feature__media,
    .sv-project-feature--reverse .sv-project-feature__body {
        order: unset;
    }

    .sv-contact__grid {
        grid-template-columns: 1fr;
    }
}

/* Fullscreen lightbox */
.sv-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100050;
    background: rgba(0, 0, 0, 0.94);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    box-sizing: border-box;
}

.sv-lightbox--open {
    display: flex;
}

.sv-lightbox__viewport {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.sv-lightbox__track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease-out;
    will-change: transform;
}

.sv-lightbox__slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px;
}

.sv-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sv-lightbox__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sv-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.sv-lightbox__nav--prev {
    left: 8px;
}

.sv-lightbox__nav--next {
    right: 8px;
}

.sv-lightbox--single .sv-lightbox__nav {
    display: none;
}

body.sv-lightbox-open {
    overflow: hidden;
}

