/* AOpartments - stili del sito (Bootstrap 5.3 + Inter, come Linking Space).
   Bootstrap, Font Awesome e Inter sono serviti in locale (nessuna richiesta a CDN o Google Fonts). */

/* ── Font: Inter variabile (stesso font di Linking Space), self-hosted ───── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ao-primary: #b3121a;
    --ao-primary-dark: #8f0e15;
    --ao-red-bright: #e0343d;   /* rosso più chiaro per i fondi scuri */
    --ao-dark: #1a1b1d;
    --ao-light: #f1f2f3;
    --ao-white: #ffffff;
    --ao-gray: #a3a5a8;
    --ao-accent: #b3121a;
    --ao-text: #1a1b1d;
    --ao-border: #e5e7eb;
    --ao-radius: 10px;
    --ao-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);

    /* Bootstrap 5: font e colori del sito */
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-color: var(--ao-text);
    --bs-primary: var(--ao-primary);
    --bs-primary-rgb: 179, 18, 26;
    --bs-link-color: #b3121a;
    --bs-link-hover-color: #8f0e15;
    --bs-link-color-rgb: 179, 18, 26;
    --bs-link-hover-color-rgb: 143, 14, 21;
    --bs-border-radius: 8px;
}

html { background: #fff; }

body {
    font-family: var(--bs-font-sans-serif);
    color: var(--ao-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Tipografia ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-font-sans-serif);
    color: var(--ao-dark);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }

/* ── Bottoni ─────────────────────────────────────────────────────────────── */
.btn { font-weight: 600; border-radius: 8px; }
.btn-primary {
    --bs-btn-bg: var(--ao-primary);
    --bs-btn-border-color: var(--ao-primary);
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: var(--ao-primary-dark);
    --bs-btn-hover-border-color: var(--ao-primary-dark);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: var(--ao-primary-dark);
    --bs-btn-active-border-color: var(--ao-primary-dark);
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-bg: var(--ao-primary);
    --bs-btn-disabled-border-color: var(--ao-primary);
}
.btn-outline-primary {
    --bs-btn-color: #b3121a;
    --bs-btn-border-color: var(--ao-primary);
    --bs-btn-hover-bg: var(--ao-primary);
    --bs-btn-hover-border-color: var(--ao-primary);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: var(--ao-primary);
    --bs-btn-active-border-color: var(--ao-primary);
    --bs-btn-active-color: #ffffff;
}
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ao-accent);
    --bs-btn-border-color: var(--ao-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #8f0e15;
    --bs-btn-hover-border-color: #8f0e15;
    --bs-btn-active-bg: #8f0e15;
    --bs-btn-active-border-color: #8f0e15;
}
.text-accent { color: var(--ao-accent) !important; }
.bg-primary { background-color: var(--ao-primary) !important; color: #ffffff !important; }
.text-primary { color: #b3121a !important; }
.badge.bg-primary { color: #ffffff !important; }
.badge.bg-warning { background-color: var(--ao-dark) !important; color: #fff !important; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--ao-primary);
    box-shadow: 0 0 0 0.2rem rgba(179, 18, 26, 0.25);
}
.form-check-input:checked { background-color: var(--ao-primary); border-color: var(--ao-primary); }
.page-link { color: #b3121a; }
.page-item.active .page-link { background: var(--ao-primary); border-color: var(--ao-primary); color: #ffffff; }

/* ── Navbar (struttura come Linking Space: link al centro, azioni a destra; sfondo scuro AOpartments) ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--ao-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.site-nav .navbar { padding: 0.65rem 0; background: transparent !important; }
.site-nav .navbar-brand { padding: 0; margin-right: 1.5rem; }
.site-nav .navbar-brand img { height: 40px; width: auto; max-width: 60vw; display: block; }
.site-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus, .site-nav .nav-link.active { color: var(--ao-red-bright) !important; }
.site-nav .navbar-toggler { border: 1px solid rgba(255, 255, 255, 0.35); padding: 0.4rem 0.6rem; }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 0.2rem rgba(179, 18, 26, 0.35); }
.site-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.site-nav__actions { display: flex; align-items: center; gap: 0.6rem; }
.site-nav__actions .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-login {
    --bs-btn-color: #fff;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: rgba(255, 255, 255, 0.4);
    --bs-btn-hover-color: var(--ao-dark);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: var(--ao-dark);
    --bs-btn-active-bg: #fff;
    --bs-btn-active-border-color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
@media (max-width: 991.98px) {
    .site-nav .navbar-collapse { padding: 0.75rem 0 0.5rem; }
    .site-nav .nav-link { padding-left: 0; }
    .site-nav__actions { padding-top: 0.5rem; flex-wrap: wrap; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(20, 20, 22, 0.30), rgba(20, 20, 22, 0.55)),
                url('../images/hero-valle-aosta.jpg') center 38% / cover no-repeat;
    padding: 96px 0 120px;
    overflow: hidden;
}
.hero-section:not(:has(> .hero-overlay)) {
    min-height: clamp(540px, 74vh, 760px);
    display: flex;
    align-items: center;
}
.hero-section:not(:has(> .hero-overlay)) > .container { width: 100%; }
.hero-section:has(> .hero-overlay) { padding: 0; }
.hero-section h1 {
    color: var(--ao-white);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.hero-section .lead { color: var(--ao-light); font-size: 1.2rem; font-weight: 400; }
.hero-section .text-primary { color: var(--ao-red-bright) !important; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 20, 22, 0.75), rgba(20, 20, 22, 0.2));
}

/* ── Ricerca ─────────────────────────────────────────────────────────────── */
.search-form {
    background: rgba(255, 255, 255, 0.96);
    padding: 24px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.search-form .form-select, .search-form .form-control {
    border: 1px solid #d5d9de;
    padding: 0.7rem 0.9rem;
}

/* ── Card alloggi ────────────────────────────────────────────────────────── */
.property-card {
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius);
    overflow: hidden;
    box-shadow: var(--ao-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.property-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12); }
.property-card .card-img-top { height: 220px; object-fit: cover; }
.property-card .card-body { padding: 20px; }
.property-card .card-title { font-size: 1.1rem; font-weight: 600; color: var(--ao-dark); margin-bottom: 8px; }
.property-card .price { color: #b3121a; font-weight: 700; font-size: 1.2rem; }
.property-card .location { color: #6b7280; font-size: 0.9rem; }

/* ── Sezioni ─────────────────────────────────────────────────────────────── */
.feature-box {
    background: var(--ao-white);
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius);
    box-shadow: var(--ao-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-box:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1); }
.feature-box i { color: var(--ao-primary); }
.feature-box h4 { font-weight: 600; color: var(--ao-dark); }

/* Abbonamenti nella home */
.plan-card {
    position: relative;
    background: var(--ao-white);
    border: 1px solid var(--ao-border);
    border-radius: var(--ao-radius);
    box-shadow: var(--ao-shadow);
    display: flex; flex-direction: column;
}
.plan-card-featured { border: 2px solid var(--ao-primary); }
.plan-badge {
    position: absolute; top: -12px; right: 18px;
    background: var(--ao-primary); color: #fff; font-size: 0.75rem; font-weight: 600;
    padding: 2px 12px; border-radius: 999px;
}
.plan-price { font-size: 2rem; font-weight: 700; color: var(--ao-dark); }
.plan-per { font-size: 1rem; font-weight: 400; color: #6b7280; }
.plan-list { list-style: none; padding: 0; margin: 0 0 1.5rem; flex-grow: 1; }   /* il bottone resta in fondo alla card */
.plan-list li { padding: 4px 0; }
.plan-list i { color: #2f8a46; margin-right: 8px; }

.main-content { min-height: 50vh; }

section > .container > h2, section > h2 {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 28px;
}
section > .container > h2::after, section > h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background: var(--ao-primary);
}
.text-center > h2::after { left: 50%; transform: translateX(-50%); }

.booking-form { border: 1px solid var(--ao-border); border-radius: var(--ao-radius); padding: 20px; box-shadow: var(--ao-shadow); }

/* Footer (struttura come Linking Space, colori AOpartments) */
.site-footer {
    background: var(--ao-dark);
    color: var(--ao-gray);
    padding-top: 56px;
    margin-top: 3rem;
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.site-footer__logo { height: 44px; width: auto; max-width: 100%; margin-bottom: 16px; }

.site-footer__desc {
    font-size: 14px;
    line-height: 1.6;
    max-width: 340px;
    margin: 0;
    text-align: left;
    color: var(--ao-gray);
}

.site-footer__col h4 {
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--ao-white);
    margin: 0 0 20px;
}

.site-footer__col a {
    display: block;
    font-size: 14px;
    color: var(--ao-light);
    margin-bottom: 12px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer__col a:hover,
.site-footer__bottom a:hover { color: var(--ao-red-bright); }

.site-footer__col h4.site-footer__h-spaced { margin-top: 28px; }

.site-footer__made, .site-footer__info {
    font-size: 14px;
    color: var(--ao-gray);
    margin: 0 0 12px;
    text-align: left;
}

.site-footer__made .heart { color: #e11d48; }
.site-footer__social { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.site-footer__col .site-footer__social a {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
    font-size: 15px;
    color: var(--ao-light);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.site-footer__col .site-footer__social a:hover { color: var(--ao-red-bright); border-color: var(--ao-red-bright); background: rgba(255, 255, 255, 0.04); }
.site-footer__ls { display: flex; align-items: center; gap: 14px; }
.site-footer__ls img { width: 64px; height: auto; border-radius: 4px; display: block; background: #fff; }
.site-footer__col .site-footer__ls > a { display: block; margin: 0; flex: none; }
.site-footer__ls p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ao-gray); text-align: left; }
.site-footer__ls p a { color: var(--ao-light); text-decoration: underline; text-underline-offset: 2px; }
.site-footer__ls p a:hover { color: var(--ao-red-bright); }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--ao-gray);
}

.site-footer__bottom .sep { margin: 0 6px; color: rgba(255, 255, 255, 0.3); }
.site-footer__bottom a { color: var(--ao-gray); text-decoration: none; transition: color 0.15s ease; }

@media (max-width: 992px) {
    .site-footer__top { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .site-footer__top { grid-template-columns: 1fr; gap: 32px; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section::after {
        border-bottom: 40px solid var(--ao-white);
    }
    
    .search-form {
        padding: 15px;
    }
}

/* Badges */
.badge.bg-primary {
    background: var(--ao-primary) !important;
}

/* Pill del tipo di alloggio: un colore per tipo (fuori elenco: grigio) */
.badge.type-pill {
    --pill: #5b6068;
    background: var(--pill);
    color: #fff;
    font-weight: 600;
}
.type-pill.type-monolocale { --pill: #b3121a; }
.type-pill.type-bilocale { --pill: #2f4858; }
.type-pill.type-camera { --pill: #2f6b4f; }
.type-pill.type-appartamento { --pill: #a8731a; }
.type-pill.type-affittacamere { --pill: #6b2d5c; }
.type-pill.type-bed-breakfast { --pill: #0f766e; }

/* Links */
a {
    color: var(--ao-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: #8f0e15;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card {
    animation: fadeInUp 0.5s ease forwards;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }
.property-card:nth-child(4) { animation-delay: 0.4s; }
.property-card:nth-child(5) { animation-delay: 0.5s; }
.property-card:nth-child(6) { animation-delay: 0.6s; }
/* ── Pagine di accesso (modello Linking Safe: card su sfondo sfocato) ────── */
.auth-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
    background: #1a1b1d;
}
.auth-page::before {
    content: "";
    position: fixed;
    inset: -40px;
    background: url('../images/hero-valle-aosta.jpg') center 38% / cover no-repeat;
    filter: blur(14px) brightness(0.72) saturate(1.05);
    z-index: 0;
}
.auth-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #f8f9fb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.auth-card__head {
    background: var(--ao-dark);
    padding: 26px 24px 22px;
    text-align: center;
}
.auth-card__head img { height: 44px; width: auto; max-width: 90%; }
.auth-card__head h1 {
    margin: 16px 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0;
    color: #fff;
}
.auth-card__body { padding: 26px 32px 28px; }
.auth-card__body .form-control { padding: 0.65rem 0.8rem; background: #fff; }
.auth-card__body .input-group .form-control { border-right: 0; }
.auth-card__body .input-group .btn { border-color: #ced4da; color: #6b7280; background: #fff; }
.auth-card__body .input-group .btn:hover { color: var(--ao-dark); background: #f1f3f5; }
.auth-card__foot {
    border-top: 1px solid var(--ao-border);
    padding: 16px 24px;
    text-align: center;
    background: #f3f5f8;
    font-size: 0.95rem;
}
.auth-link { color: var(--ao-primary); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.auth-link:hover { color: var(--ao-primary-dark); }
.auth-note {
    margin: 16px 0 0;
    max-width: 420px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}
@media (max-width: 480px) {
    .auth-card__body { padding: 22px 20px 24px; }
}


/* Badge di stato delle prenotazioni (area ospite) */
.ao-bk-badge { color: #1a1b1d; font-weight: 600; border-left: 3px solid transparent; }
.bk-pending { background: #fdecc8; border-left-color: #e0a100; }
.bk-confirmed { background: #d8ecdc; border-left-color: #2f8a46; }
.bk-completed { background: #e6e8ec; border-left-color: #8a909c; }
.bk-cancelled, .bk-no_show { background: #f8d9db; border-left-color: #b3121a; }

/* Chi siamo: testo (italiano + patois) e foto della stessa altezza; la foto si ritaglia per riempire lo spazio. */
.about-story p { margin-bottom: .6rem; line-height: 1.5; }
.about-story .lead { font-size: 1.1rem; }
.about-photo { display: flex; flex-direction: column; height: 100%; }
.about-photo-frame { position: relative; flex: 1 1 auto; aspect-ratio: 3 / 2; }
.about-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 992px) { .about-photo-frame { aspect-ratio: auto; min-height: 0; } }
