/* ==========================================================================
   Fontana Leone - shared stylesheet
   Navbar, language selector, mobile menu, footer, cookie banner, :root tokens
   (rules that are identical on every page). Page-specific CSS stays inline.
   ========================================================================== */

html { scroll-behavior: smooth; }

/* --- STICKY NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    width: 100%;
    background: rgba(30, 30, 30, 0.60);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.nav-links li {
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-links li:not(:last-child)::after {
    content: "|";
    color: rgba(255, 255, 255, 0.5);
    margin-left: 15px;
    font-weight: 300;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    padding: 4px 0;
    transition: opacity 0.3s, color 0.3s;
}

/* --- LANGUAGE DROPDOWN --- */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 300;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.3s;
}

.lang-btn:hover {
    opacity: 0.7;
}

.lang-caret {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.lang-selector.open .lang-caret {
    transform: rotate(180deg);
}

.nav-links .lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 130px;
    list-style: none;
    padding: 8px 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    z-index: 1001;
}

.lang-selector.open .lang-menu {
    display: block;
}

.nav-links .lang-menu li {
    display: block !important;
    width: 100%;
}

.nav-links .lang-menu li:not(:last-child)::after {
    display: none !important;
}

.nav-links .lang-menu a {
    display: block !important;
    padding: 8px 15px !important;
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

/* --- COOKIE BANNER & PANEL STYLES --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #252321;
    color: #fff;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.4);
    border-top: 3px solid #a25e49;
    padding: 20px 24px;
    font-family: 'DM Sans', Arial, sans-serif;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-inner {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}

.cookie-inner p {
    margin: 0;
    color: #f0ece8;
    font-size: 0.89rem;
    line-height: 1.6;
}

.cookie-inner a {
    color: #f4b39a;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 11px 16px;
    border: 1px solid #cbbab0;
    border-radius: 3px;
    background: transparent;
    color: white;
    font-weight: bold;
    cursor: pointer;
    min-width: 105px;
    font-size: 0.82rem;
    transition: filter 0.2s;
}

.cookie-btn.primary {
    background: #a25e49;
    border-color: #a25e49;
}

.cookie-btn:hover {
    filter: brightness(1.15);
}

.cookie-panel {
    max-width: 1100px;
    margin: 14px auto 0;
    padding: 16px;
    border: 1px solid #756a63;
    border-radius: 4px;
}

.cookie-panel[hidden] {
    display: none;
}

.cookie-panel p {
    color: #f0ece8;
    font-size: 0.85rem;
    margin: 0 0 12px;
}

.cookie-choice {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.cookie-choice input {
    width: 18px;
    height: 18px;
    accent-color: #a25e49;
}

.cookie-panel .cookie-btn {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .mobile-menu-btn { display: block; }
    .nav-links li:not(:last-child)::after {
            display: none;
        }
    .nav-links.active { display: flex; }
    .lang-selector { flex-direction: column; width: 100%; text-align: center; }
    .lang-btn { width: 100%; justify-content: center; padding: 8px 0; }
    .nav-links .lang-menu {
            position: static;
            display: none;
            width: 100%;
            margin-top: 5px;
            background: rgba(255, 255, 255, 0.04);
            box-shadow: none;
        }
    .lang-selector.open .lang-menu { display: block; }
    .nav-links .lang-menu a { justify-content: center; }
}

/* --- ACCESSIBILITY: visible keyboard focus (mouse users are not affected) --- */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid #a25e49;
    outline-offset: 2px;
}

.cookie-banner a:focus-visible,
.cookie-banner button:focus-visible,
.cookie-banner input:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.navbar a:focus-visible,
.navbar button:focus-visible,
.lightbox-modal button:focus-visible {
    outline-color: #f4b39a;
}

/* --- ACCESSIBILITY: respect "reduce motion" --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Apartment hero: tall enough for the title, subtitle and button --- */
.page-hero.page-hero--cta {
    height: auto;
    min-height: 340px;
    padding: 96px 20px 56px;
}

/* --- LANGUAGES: hidden until the Greek / German pages are ready.
       Delete these two rules to show the language selector again. --- */
.lang-selector { display: none !important; }
.nav-links > li:nth-last-child(2)::after { display: none !important; }

/* --- BOOKING SHORTCUTS (apartment pages) --- */
#availability, #inquiry { scroll-margin-top: 90px; }

.hero-cta {
    display: inline-block;
    margin-top: 22px;
    padding: 12px 30px;
    background: #a25e49;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.25s ease, transform 0.2s ease;
}

.hero-cta:hover { background: #8a4e3b; transform: translateY(-2px); }

.sticky-cta { display: none; }

@media (max-width: 768px) {
    .sticky-cta {
        display: block;
        position: fixed;
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);
        z-index: 900;
        padding: 14px 28px;
        background: #a25e49;
        color: #fff;
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        line-height: 1;
        text-transform: uppercase;
        text-decoration: none;
        white-space: nowrap;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .sticky-cta.is-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 12px);
    }

    body:has(#cookieBanner:not([hidden])) .sticky-cta,
    body:has(.lightbox-modal.active) .sticky-cta { display: none; }
}

/* --- "OUR OTHER HOME" card (apartment pages) --- */
.other-home {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(22px, 4vw, 42px) 90px;
}

.other-home h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #262522;
    margin: 0 0 18px;
}

.other-home-card {
    display: flex;
    max-width: 760px;
    background: #f7f4ef;
    border: 1px solid #e7e1d8;
    border-radius: 3px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.other-home-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.other-home-card img { width: 260px; min-height: 170px; object-fit: cover; flex-shrink: 0; }

.oh-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 22px 26px;
}

.oh-body h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 400; margin: 0; color: #262522; }
.oh-body p { margin: 0; font-size: 0.9rem; color: #6f6b65; }

.oh-link {
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a25e49;
}

@media (max-width: 600px) {
    .other-home-card { flex-direction: column; }
    .other-home-card img { width: 100%; height: 190px; }
}

/* --- HOME PAGE: key facts on the apartment cards --- */
.card-facts {
    margin: 2px 0 10px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: #6f6b65;
}

/* --- FORMS: field-level error state --- */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: #b3261e !important;
    box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12) !important;
}

[role="group"][aria-invalid="true"] {
    outline: 1px solid #b3261e;
    outline-offset: 6px;
    border-radius: 2px;
}
