/* ==================================================================
   Public-site styles
   ================================================================== */

body.public {
    background: var(--bg);
}

/* Header */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em 1.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}
.site-brand {
    font-family: var(--brand);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-color, var(--accent));
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.6em;
    line-height: 1;
}
.site-logo {
    height: 48px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    transition: background 0.2s ease, padding 0.2s ease;
}
html[data-theme="dark"] .site-logo {
    background: rgba(247, 241, 232, 0.92);
    padding: 3px;
}
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .site-logo {
        background: rgba(247, 241, 232, 0.92);
        padding: 3px;
    }
}
.site-brand-text {
    white-space: nowrap;
    text-transform: uppercase;
}
.site-nav {
    display: flex;
    gap: 1.5em;
}
.site-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}
.site-nav a:hover { color: var(--accent); }

.site-header-controls {
    display: flex;
    align-items: center;
    gap: 1em;
}
.lang-switch {
    display: flex;
    gap: 0.2em;
    font-size: 0.8rem;
    font-weight: 600;
}
.lang-link {
    padding: 0.25em 0.55em;
    border-radius: var(--radius);
    color: var(--text-soft);
    letter-spacing: 0.05em;
}
.lang-link.active {
    background: var(--accent);
    color: #fff;
}
.lang-link:not(.active):hover {
    color: var(--text);
    background: var(--bg-alt);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--line);
    width: 2.2em;
    height: 2.2em;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text);
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    background: var(--bg-alt);
    transform: none;
    box-shadow: none;
}
.theme-toggle .theme-icon-dark  { display: none; }
.theme-toggle .theme-icon-light { display: inline; }
html[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-dark  { display: inline; }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .theme-toggle .theme-icon-light { display: none; }
    html:not([data-theme="light"]) .theme-toggle .theme-icon-dark  { display: inline; }
}

@media (max-width: 640px) {
    .site-header-inner {
        flex-wrap: wrap;
        gap: 0.5em 0.8em;
        padding: 0.7em 1em;
    }
    .site-logo { height: 36px; max-width: 44px; }
    .site-brand { font-size: 1.2rem; order: 1; }
    .site-header-controls { order: 2; margin-left: auto; gap: 0.6em; }
    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1.4em;
        padding-top: 0.55em;
        border-top: 1px solid var(--line);
    }
}

.site-main { min-height: calc(100vh - 200px); }

.site-footer {
    background: #16130f;
    color: #f2ece1;
    padding: 3em 1.5em 1.5em;
    margin-top: 4em;
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2em;
}
.footer-col h4 {
    color: var(--gold);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8em;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li {
    margin-bottom: 0.5em;
    font-size: 0.92rem;
    color: rgba(242,236,225,0.75);
}
.footer-col a {
    color: rgba(242,236,225,0.75);
}
.footer-col a:hover { color: var(--gold); }
.footer-name {
    font-family: var(--brand);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3em;
    text-transform: uppercase;
}
.footer-tagline {
    color: rgba(242,236,225,0.6);
    font-size: 0.92rem;
    max-width: 22em;
    margin: 0;
}
.site-footer-bottom {
    max-width: 1200px;
    margin: 2.5em auto 0;
    padding-top: 1.5em;
    border-top: 1px solid rgba(242,236,225,0.12);
    font-size: 0.85rem;
    color: rgba(242,236,225,0.5);
    text-align: center;
}
@media (max-width: 760px) {
    .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5em; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
    .site-footer-inner { grid-template-columns: 1fr; }
}

/* Section */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3em 1.5em;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5em;
    gap: 1em;
    flex-wrap: wrap;
}
.link-more { font-weight: 500; }

/* Hero */
.hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 420px;
    max-height: 720px;
    overflow: hidden;
    background: var(--text);
}
.hero-photo, .hero-photo picture, .hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 25% 65%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 55%, transparent 100%),
        linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    color: var(--bg);
    padding: 2em 1.5em 4em;
}
.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
}
.hero-overlay h1 {
    color: #fff;
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    margin-bottom: 0.3em;
    max-width: 16em;
    text-shadow:
        0 1px 2px rgba(0,0,0,0.9),
        0 2px 8px rgba(0,0,0,0.8),
        0 4px 32px rgba(0,0,0,0.6);
}
.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    margin-bottom: 1.6em;
    max-width: 34em;
    opacity: 1;
    color: #fff;
    text-shadow:
        0 1px 2px rgba(0,0,0,0.95),
        0 2px 10px rgba(0,0,0,0.7);
}
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
}
.btn-outline-hero {
    border: 1.5px solid var(--gold);
    background: rgba(0,0,0,0.15);
    color: #fff;
    padding: 0.85em 2em;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(2px);
}
.btn-outline-hero:hover {
    background: var(--gold);
    color: #1a1410;
    transform: translateY(-2px);
}
.section-head-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-sub {
    color: var(--text-soft);
    font-size: 1.1rem;
    margin-top: -0.3em;
    max-width: 36em;
}

/* Services carousel (home) — horizontally scrollable slides built from the live
   list of services. Each slide previews a service and links to its full section. */
.services-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.carousel-track {
    display: flex;
    gap: 1.3em;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.4em 0.2em 1em;
    flex: 1;
    /* hide scrollbar but keep scrollability */
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.service-slide {
    scroll-snap-align: start;
    flex: 0 0 clamp(230px, 80%, 300px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.8em 1.5em;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--gold);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.service-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.service-slide-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.8em;
    background: var(--bg-alt);
    flex: 0 0 auto;
}
.service-slide-avatar img, .service-slide-avatar picture {
    width: 100%; height: 100%; object-fit: cover;
}
.service-slide h3 { margin-bottom: 0.4em; color: var(--text); }
.service-slide-text {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin: 0 0 0.9em;
    line-height: 1.6;
}
.service-slide-more {
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.92rem;
}

.carousel-arrow {
    flex: 0 0 auto;
    width: 2.4em;
    height: 2.4em;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.carousel-arrow:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }
/* On touch screens the arrows are redundant (swipe), so hide them. */
@media (max-width: 640px) {
    .carousel-arrow { display: none; }
}

/* Testimonials */
.testimonials-section {
    background: var(--bg-alt);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
}
.testimonial {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.8em;
    margin: 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.testimonial-stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.6em;
}
.testimonial blockquote {
    margin: 0 0 1em;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
    flex: 1;
}
.testimonial figcaption strong {
    display: block;
    color: var(--text);
}
.testimonial figcaption span {
    color: var(--text-soft);
    font-size: 0.88rem;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8em;
}
.card {
    color: inherit;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(31,27,22,0.14);
}
.card-photo {
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
    position: relative;
    overflow: hidden;
}
.card-photo picture, .card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 3rem; color: var(--text-soft);
}
.card-feat {
    position: absolute;
    top: 0.8em; right: 0.8em;
    background: var(--gold);
    color: var(--bg);
    padding: 0.2em 0.5em;
    border-radius: 999px;
    font-size: 0.85rem;
}
.card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2.4rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.7);
    pointer-events: none;
}
.card-body { padding: 1em 1.2em 1.3em; }
.card-meta { font-size: 0.8rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3em; }
.card-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 0.4em; }
.card-loc { font-size: 0.9rem; color: var(--text-soft); margin-bottom: 0.5em; }
.card-price { font-size: 1.1rem; font-weight: 600; color: var(--accent); }
.card-price small { font-weight: 400; color: var(--text-soft); font-size: 0.8em; margin-left: 0.2em; }

/* About */
.about p {
    max-width: 42em;
    font-size: 1.1rem;
    color: var(--text-soft);
}

/* Property detail */
.property-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 1.5em 4em;
}
.property-header { margin-bottom: 2em; }
.link-back {
    display: inline-block;
    margin-bottom: 1em;
    font-size: 0.95rem;
    color: var(--text-soft);
}
.property-subhead { color: var(--text-soft); margin-top: 0.4em; }

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4em;
    margin-bottom: 2.5em;
}
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    position: relative;
}
.gallery-item-main {
    grid-column: span 4;
    aspect-ratio: 16 / 9;
}
.gallery-item picture, .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-item:not(.gallery-item-video):hover img { transform: scale(1.03); }

/* Property listing gallery: big lead image + a one-row carousel of the rest
   (so a long photo set doesn't push the contact/details far down). Both keep
   the .gallery class so the lightbox spans every picture. Arrows + scroll in
   app.js. */
.property-gallery-lead { margin-bottom: 0.6em; }
.property-carousel {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 2.5em;
}
.property-carousel .carousel-track {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 0.6em;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.property-carousel .carousel-track::-webkit-scrollbar { display: none; }
.property-carousel .gallery-item,
.property-carousel .gallery-item-main {
    flex: 0 0 clamp(240px, 70%, 380px);
    aspect-ratio: 16 / 9;
    scroll-snap-align: start;
}

.gallery-item-video { cursor: default; }
.video-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.property-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5em;
}
@media (max-width: 800px) {
    .property-layout { grid-template-columns: 1fr; }
}

.property-body h2 {
    margin-top: 0;
    color: var(--text);
}
.property-description {
    font-size: 1.05rem;
    color: var(--text-soft);
    line-height: 1.7;
}
.property-description p { margin: 0 0 1em; }
.property-description ul, .property-description ol { margin: 0 0 1em; padding-left: 1.4em; }
.property-description li { margin-bottom: 0.3em; }
.property-description h3, .property-description h4 { color: var(--text); margin: 1.2em 0 0.4em; }
.property-description a { color: var(--accent); text-decoration: underline; }
.property-description blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 3px solid var(--gold);
    font-style: italic;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    margin: 1em 0 2em;
}

/* --- Share this listing --- */
.property-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 0.75em;
    margin: 0 0 2em;
}
.share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted, inherit);
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}
.share-btn {
    font-size: 0.85rem;
    padding: 0.45em 0.8em;
}
.share-toast {
    flex-basis: 100%;
    font-size: 0.85rem;
    color: var(--accent, inherit);
}
.share-toast[hidden] { display: none; }

.property-aside {
    background: var(--card);
    padding: 1.5em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    align-self: start;
}
.property-attrs dt {
    font-size: 0.8rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.8em;
}
.property-attrs dt:first-child { margin-top: 0; }
.property-attrs dd {
    margin: 0.1em 0 0;
    font-size: 1.05rem;
    font-weight: 500;
}
.property-price {
    color: var(--accent) !important;
    font-size: 1.5rem !important;
    font-family: var(--serif);
}
.property-price small {
    font-size: 0.65em;
    font-weight: 400;
    color: var(--text-soft);
    font-family: var(--sans);
}

/* Preview banner */
.preview-banner {
    background: var(--warn);
    color: #fff;
    padding: 0.7em 1em;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2em;
    flex-wrap: wrap;
}
.preview-banner > span { text-transform: uppercase; }
.preview-back {
    background: rgba(0,0,0,0.25);
    color: #fff;
    padding: 0.3em 0.9em;
    border-radius: var(--radius);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    white-space: nowrap;
}
.preview-back:hover { background: rgba(0,0,0,0.4); color: #fff; }

/* Contact page */
.contact-section { max-width: 900px; }
.contact-intro {
    font-size: 1.1rem;
    color: var(--text-soft);
    max-width: 40em;
    margin-bottom: 2em;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1em;
    margin-bottom: 3em;
}
.contact-card {
    background: var(--card);
    padding: 1.4em 1.2em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    display: block;
}
.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(31,27,22,0.14);
    color: inherit;
}
.contact-icon {
    font-size: 1.6rem;
    margin-bottom: 0.4em;
}
.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
    margin-bottom: 0.3em;
}
.contact-value {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}
.contact-footer {
    color: var(--text-soft);
    font-style: italic;
    font-size: 0.95rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2em;
}
.lightbox.open { display: flex; }
.lightbox-content {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content picture,
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 1em; right: 1em; }
.lightbox-prev  { left: 1em; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1em; top: 50%; transform: translateY(-50%); }
/* Keep the vertical centering on hover — otherwise the global `button:hover`
   transform (translateY(-1px)) overrides translateY(-50%) and the arrows jump. */
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%); }
.lightbox-close:hover { transform: none; }

/* Mobile */
@media (max-width: 640px) {
    .site-nav a { font-size: 0.9rem; }
    .section { padding: 2em 1em; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery-item-main { grid-column: span 2; aspect-ratio: 4 / 3; }
    .hero { height: 60vh; min-height: 360px; }
}

/* ==================================================================
   Navigation: dropdowns + hamburger (added with the menu redesign)
   ================================================================== */
.site-nav { gap: 1.2em; align-items: center; }
.nav-toggle { display: none; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item .nav-top { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav-item .nav-top:hover { color: var(--accent); }
.has-dropdown > .nav-top::after {
    content: "▾";
    font-size: 0.7em;
    margin-left: 0.3em;
    color: var(--text-soft);
}
.nav-caret { display: none; }   /* desktop opens on hover; caret button is mobile-only */

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    margin: 0;
    padding: 0.4em 0;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 200;
}
.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown,
.nav-item.open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown li { margin: 0; }
.nav-dropdown a {
    display: block;
    padding: 0.5em 1.1em;
    color: var(--text);
    font-size: 0.92rem;
    white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--bg-alt); color: var(--accent); }

/* ==================================================================
   Call-to-action bar
   ================================================================== */
.cta-bar { background: var(--accent); }
.cta-bar--top { border-top: 1px solid rgba(0, 0, 0, 0.08); }
/* Footer-variant CTA floats at the bottom of the viewport while scrolling, then
   docks into its natural spot just above the footer at the end of the page. Works
   because it's a direct <body> child whose containing block spans the whole
   document, giving bottom-sticky room to lift the bar into view. */
.cta-bar--footer {
    margin-top: 2em;
    position: sticky;
    bottom: 0;
    z-index: 50;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.14);
}
/* Footer-variant CTA sits flush on top of the footer (no gap between them). */
.cta-bar--footer + .site-footer { margin-top: 0; }
.cta-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5em 1.5em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
    justify-content: center;
    align-items: center;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.5em 1.1em;
    border-radius: var(--radius);
    /* Solid dark button on the gold bar — readable in both light and dark themes
       (the bar is always gold, so these colours are intentionally fixed). */
    background: #2a2018;
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}
.cta-btn:hover { background: #fff; color: #2a2018; transform: translateY(-1px); }
.cta-ic { font-size: 1.05em; }

/* ==================================================================
   Listings category filter
   ================================================================== */
.listings-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: 0 0 1.6em;
}
.filter-chip {
    padding: 0.4em 0.95em;
    border: 1px solid var(--line);
    border-radius: 2em;
    font-size: 0.9rem;
    color: var(--text-soft);
    background: var(--card);
}
.filter-chip:hover { color: var(--accent); border-color: var(--accent); }
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ==================================================================
   Content sections: Služby / Projekty / O nás / Referencie
   ================================================================== */
/* Rendered rich text (admin-authored HTML: headings, lists, links, emphasis). */
.rt-content { line-height: 1.7; }
.rt-content > :first-child { margin-top: 0; }
.rt-content > :last-child { margin-bottom: 0; }
.rt-content p { margin: 0 0 0.9em; }
.rt-content h3, .rt-content h4 { margin: 1.1em 0 0.4em; line-height: 1.25; color: var(--text); }
.rt-content ul, .rt-content ol { margin: 0 0 0.9em; padding-left: 1.3em; }
.rt-content li { margin: 0.2em 0; }
.rt-content a { color: var(--accent); text-decoration: underline; }
.rt-content blockquote {
    margin: 0.9em 0;
    padding: 0.2em 0 0.2em 1em;
    border-left: 3px solid var(--gold);
    color: var(--text-soft);
}

.page-intro { color: var(--text-soft); margin: 0 0 2em; line-height: 1.7; }

.service-block {
    padding: 2.2em 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 150px;   /* clear the sticky header + CTA bar on #anchor jumps */
}
.service-block:last-child { border-bottom: none; }
.service-block h2 { margin-bottom: 0.4em; }
.service-block .rt-content { color: var(--text-soft); line-height: 1.7; }

/* Služby as separate "pages": sidebar of services + a single visible panel.
   The two-column grid + single-panel view only apply once JS adds .js-tabs;
   without JS the panels render as the full stacked list (graceful fallback). */
.services-layout { margin-top: 1.6em; }
.services-layout.js-tabs {
    display: grid;
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 2.4em;
    align-items: start;
}
.services-nav { display: none; }
.services-layout.js-tabs .services-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    position: sticky;
    top: 90px;
}
.services-nav-link {
    display: block;
    padding: 0.6em 0.9em;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
    color: var(--text-soft);
    font-weight: 500;
    line-height: 1.35;
}
.services-nav-link:hover { color: var(--accent); background: var(--card); }
.services-nav-link.active {
    color: var(--accent);
    background: var(--card);
    border-left-color: var(--accent);
    font-weight: 600;
}
/* In tab mode the panels share one slot: the active one is shown, no dividers. */
.services-layout.js-tabs .service-block { display: none; padding-top: 0; border-bottom: none; }
.services-layout.js-tabs .service-block.active { display: block; }

@media (max-width: 760px) {
    .services-layout.js-tabs { grid-template-columns: 1fr; gap: 1.2em; }
    .services-layout.js-tabs .services-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5em;
    }
    .services-nav-link {
        border-left: none;
        border: 1px solid var(--line);
        border-radius: 2em;
        padding: 0.4em 0.95em;
        font-size: 0.9rem;
    }
    .services-nav-link.active { border-color: var(--accent); }
}

.project-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.8em;
}
.project-card .project-body { padding: 1.4em 1.6em; }
.project-card h2 { margin-bottom: 0.4em; }
.project-card .rt-content { color: var(--text-soft); line-height: 1.7; }

/* Team: one member per row. Odd members put the photo on the left with the text
   wrapping around it; even members mirror to the right. A thin rule separates each
   person for readability. */
.team-zigzag { margin: 2.5em 0; }
.team-member {
    padding: 1.8em 0;
    border-bottom: 1px solid var(--line);
}
.team-member:first-child { padding-top: 0; }
.team-member:last-child { border-bottom: none; padding-bottom: 0; }
.team-member::after { content: ""; display: block; clear: both; }   /* contain the float */

.team-photo {
    width: 150px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-alt);
}
.team-photo-empty { box-shadow: inset 0 0 0 1px var(--line); }
.team-photo img, .team-photo picture { width: 100%; height: 100%; object-fit: cover; }

/* Odd: photo floats left, text wraps to its right. */
.team-member:nth-child(odd)  .team-photo { float: left;  margin: 0 1.6em 0.6em 0; }
.team-member:nth-child(odd)  .team-info  { text-align: left; }
/* Even: photo floats right, text wraps to its left. */
.team-member:nth-child(even) .team-photo { float: right; margin: 0 0 0.6em 1.6em; }
.team-member:nth-child(even) .team-info  { text-align: right; }

.team-info h3 { margin: 0 0 0.15em; }
.team-role { color: var(--accent); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.6em; }
.team-bio { color: var(--text-soft); font-size: 0.97rem; line-height: 1.65; }
.team-contact {
    margin-top: 0.7em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 1.2em;
}
.team-member:nth-child(even) .team-contact { justify-content: flex-end; }
.team-contact-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-soft);
    white-space: nowrap;
}
.team-contact-link:hover { color: var(--accent); }
@media (max-width: 560px) {
    .team-member:nth-child(even) .team-contact { justify-content: flex-start; }
}

/* Narrow screens: always photo-left, text left-aligned, smaller photo. */
@media (max-width: 560px) {
    .team-member:nth-child(even) .team-photo { float: left; margin: 0 1.3em 0.6em 0; }
    .team-member:nth-child(even) .team-info  { text-align: left; }
    .team-photo { width: 120px; }
}

.story-card {
    background: var(--card);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4em 1.6em;
    margin-bottom: 1.4em;
    display: flex;
    gap: 1.4em;
    align-items: flex-start;
}
.story-photo { flex: 0 0 120px; border-radius: var(--radius); overflow: hidden; }
.story-photo img, .story-photo picture { width: 100%; height: 100%; object-fit: cover; }
.story-body h3 { margin-bottom: 0.3em; }
.story-body p { color: var(--text-soft); line-height: 1.7; margin: 0; }

.subsection-head { margin: 2.5em 0 1.2em; scroll-margin-top: 150px; }
.subsection-head h2 { font-size: 1.4rem; }

/* Public photo gallery (reuses the .gallery lightbox in app.js) */
.content-gallery {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    margin-top: 1.2em;
}
.content-gallery .gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
}
.content-gallery .gallery-item img,
.content-gallery .gallery-item picture { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Single image: full text-width banner at the bottom, uncropped */
.content-gallery-single {
    display: block;
    grid-template-columns: none;
}
.content-gallery-single .gallery-item {
    aspect-ratio: auto;
    width: 100%;
}
.content-gallery-single .gallery-item img,
.content-gallery-single .gallery-item picture { height: auto; object-fit: contain; }

/* ==================================================================
   Collapse the nav into a hamburger once the full menu no longer fits
   ================================================================== */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 2.6em;
        height: 2.4em;
        padding: 0 0.55em;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        cursor: pointer;
        order: 2;
        margin-left: auto;
    }
    .nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; }
    .nav-toggle:hover { background: var(--bg-alt); box-shadow: none; transform: none; }

    .site-header-inner { flex-wrap: wrap; }
    .site-brand { order: 1; }
    .site-header-controls { order: 3; }

    .site-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 0.6em;
        padding-top: 0.4em;
        border-top: 1px solid var(--line);
    }
    .site-nav.open { display: flex; }
    .site-nav > a,
    .nav-item .nav-top { padding: 0.75em 0.2em; width: 100%; }
    .nav-item { flex-wrap: wrap; justify-content: space-between; }
    .nav-item .nav-top { width: auto; flex: 1; }
    .has-dropdown > .nav-top::after { display: none; }
    .nav-caret {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.2em;
        height: 2.2em;
        background: transparent;
        border: none;
        color: var(--text-soft);
        font-size: 1rem;
        cursor: pointer;
    }
    .nav-item.open .nav-caret { color: var(--accent); transform: rotate(180deg); }
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        width: 100%;
        min-width: 0;
        padding: 0 0 0.4em 1em;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    .nav-item.open > .nav-dropdown { display: block; }
    .nav-dropdown a { padding: 0.5em 0.4em; }

    .cta-btn { font-size: 0.82rem; padding: 0.45em 0.7em; flex: 1 1 auto; justify-content: center; }
    .story-card { flex-direction: column; }
    .story-photo { flex-basis: auto; width: 100%; max-width: 220px; }
}
