:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, .12);
    --brand: #0b1b4d;
    --brand-2: #c8a35a;
    --shadow: 0 10px 30px rgba(2, 6, 23, .10);
    --radius: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

html {
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container,
.lx-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 18px;
    padding-right: 18px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: .92rem;
}

.page {
    padding: 28px 18px;
}

.page-head {
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.spacer {
    height: 22px;
}

/* =========================
   BUTTONS
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 700;
    line-height: 1;
    transition: .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1f2937, #374151);
}

.btn-ghost {
    background: #fff;
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, .04);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .92rem;
}

/* =========================
   HEADER
   ========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
}

.brand-name {
    letter-spacing: .2px;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav,
.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a,
.main-nav a {
    padding: 10px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.nav a:hover,
.main-nav a:hover {
    background: rgba(15, 23, 42, .05);
}

.header-cta,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle,
.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
}

/* =========================
   SECTIONS / HERO GENERIC
   ========================= */

.hero {
    padding: 46px 0 24px;
    background: linear-gradient(180deg, rgba(31, 59, 45, .08), rgba(31, 59, 45, 0));
}

.kicker {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(31, 59, 45, .10);
    color: var(--brand);
    font-weight: 650;
    font-size: .95rem;
    margin-bottom: 14px;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.08;
    margin: 0 0 12px;
}

.lead {
    font-size: 1.12rem;
    line-height: 1.6;
    margin: 0 0 18px;
}

.hero-actions,
.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.trust > div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.media-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.media-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55));
    color: #fff;
}

.media-title {
    font-weight: 800;
    font-size: 1.2rem;
}

.media-sub {
    opacity: .9;
}

.section {
    padding: 44px 0;
}

.section.alt {
    background: rgba(198, 167, 94, .08);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.6rem;
}

.section-actions {
    margin-top: 18px;
}

/* =========================
   CARDS / TILES / BADGES
   ========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(2, 6, 23, .06);
}

.card:hover {
    transform: translateY(-2px);
    transition: .15s;
}

.card-top,
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title {
    font-weight: 800;
    margin: 12px 0 6px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .95rem;
}

.card-foot {
    margin-top: 12px;
}

.arrow {
    font-weight: 900;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .4px;
}

.badge.disponibile {
    background: rgba(31, 59, 45, .12);
    color: #166534;
}

.badge.opzionato {
    background: rgba(198, 167, 94, .18);
    color: #7a5b12;
}

.badge.venduto {
    background: rgba(239, 68, 68, .14);
    color: #991b1b;
}

.price {
    font-weight: 900;
}

.price-big {
    font-size: 1.5rem;
    font-weight: 900;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tile {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
}

.tile-title {
    font-weight: 900;
    font-size: 1.2rem;
}

.tile-sub {
    color: var(--muted);
    margin-top: 8px;
}

/* =========================
   FORMS / LEADS
   ========================= */

.lead-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.form {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(2, 6, 23, .06);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.field label {
    font-weight: 700;
    font-size: .95rem;
}

.field input,
.field select,
.field textarea {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    font-size: 1rem;
}

.field textarea {
    resize: vertical;
}

.field.checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.field.checkbox input {
    margin-top: 4px;
}

.fineprint {
    margin-top: 10px;
    font-size: .92rem;
}

.lead-inline {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: rgba(31, 59, 45, .06);
}

.lead-inline h2 {
    margin: 0 0 8px;
}

/* =========================
   FILTERS / BREADCRUMBS / PROPERTY
   ========================= */

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.filters .field {
    min-width: 220px;
    margin-bottom: 0;
}

.breadcrumbs {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: .95rem;
    margin: 10px 0 14px;
}

.breadcrumbs a {
    color: var(--brand);
}

.property-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 16px;
}

.property-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.spec {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.spec-k {
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
}

.spec-v {
    font-weight: 900;
}

.content {
    line-height: 1.7;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.gallery img {
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(2, 6, 23, .06);
}

.embed iframe {
    width: 100%;
    height: 72vh;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    background: #0b0c0f;
    color: #fff;
    padding-top: 60px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-brand img {
    height: 70px;
    width: auto;
}

.footer-title {
    font-weight: 900;
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a,
.footer-bottom a {
    color: var(--brand-2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 25px 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: .3px;
    color: rgba(255, 255, 255, .75);
}

/* =========================
   ALERTS / ADMIN
   ========================= */

.alert {
    border: 1px solid rgba(239, 68, 68, .35);
    background: rgba(239, 68, 68, .08);
    color: #7f1d1d;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
}

.alert.success {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .10);
    color: #14532d;
}

.admin-top {
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
}

.admin-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
}

.admin-links {
    display: flex;
    gap: 12px;
}

.admin-card {
    max-width: 520px;
    margin: 48px auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
    background: #fff;
}

.admin-section {
    margin: 22px 0;
}

.table {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.tr {
    display: grid;
    grid-template-columns: 80px 120px 1.4fr 1fr 140px 120px 120px;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.tr.th {
    background: rgba(31, 59, 45, .06);
    font-weight: 900;
}

.tr:last-child {
    border-bottom: none;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.img-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.img-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.img-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 980px) {
    .container,
    .lx-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-grid,
    .lead-grid,
    .property-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-card img {
        height: 340px;
    }

    .tr {
        grid-template-columns: 60px 90px 1.2fr 1fr 120px 110px 110px;
    }

    .main-nav {
        display: none;
    }

    .header-inner {
        gap: 12px;
    }

    .logo img {
        height: 44px;
    }
}

@media (max-width: 680px) {
    .nav {
        display: none;
    }

    .nav.is-open {
        display: flex;
        position: absolute;
        left: 0;
        right: 0;
        top: 62px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        padding: 12px 18px;
        flex-direction: column;
    }

    .nav-toggle,
    .menu-toggle {
        display: inline-flex;
    }

    .cards,
    .grid-2,
    .grid-3,
    .trust {
        grid-template-columns: 1fr;
    }

    .filters .field {
        min-width: 100%;
    }
}
