:root {
    --bg-dark: #f5f5f7;
    --bg-section: #ffffff;
    --accent: #c89a3c;
    --accent-soft: rgba(200,154,60,0.2);
    --text-main: #222222;
    --text-muted: #666666;
    --max-width: 1080px;
}

* {
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* LINK GLOBALI */
a {
    color: #1f2933;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid rgba(15,23,42,0.06);
    box-shadow: 0 6px 18px rgba(15,23,42,0.04);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: #1f2933;
}

.brand span {
    font-weight: 700;
    color: var(--accent);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

nav a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    nav a {
        margin-left: 0;
    }
}

main {
    margin-top: 64px;
}

/* HERO */
.hero {
    position: relative;
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.5rem 3.5rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -2;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/bg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.03);
    filter: brightness(0.8) saturate(1.05);
}

/* overlay alleggerito */
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(255,255,255,0.35),
            rgba(255,255,255,0.65));
}

/* CONTENITORE HERO */
.hero-content {
    max-width: var(--max-width);
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: stretch; /* stessa altezza per le due colonne */
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
}

/* CARD COMUNE HERO (trasparenza e stile uguale) */
.hero-box {
    background: rgba(255,255,255,0.88);
    border-radius: 1.6rem;
    box-shadow: 0 18px 45px rgba(15,23,42,0.10);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* COLONNA SINISTRA */
.hero-text {
    position: relative;
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hero-text h1 {
    font-size: clamp(2.1rem, 4vw, 2.9rem);
    margin: 0 0 0.3rem;
    color: #111827;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.hero-text h1 span {
    color: var(--accent);
    font-weight: 700;
}

.subtitle {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #4b5563;
    margin-bottom: 1.15rem;
}

.hero-text p {
    max-width: 40rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

/* PILL (se deciderai di riattivarla) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 8px 20px rgba(15,23,42,0.06);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(200,154,60,0.85);
}

/* BOTTONI HERO */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.btn {
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

/* bottone bianco */
.btn.secondary {
    background: #ffffff;
    color: #1f2933;
    border-color: rgba(15,23,42,0.12);
}

/* hover bottone oro */
.btn:not(.secondary):hover {
    background: #b5892f;
    border-color: #b5892f;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* hover bottone bianco */
.btn.secondary:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px rgba(15,23,42,0.15);
}

/* COLONNA DESTRA HERO */
.hero-card {
    padding: 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hero-card h2 {
    margin-top: 0;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111827;
    margin-bottom: 1rem;
}

.hero-card-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.9rem;
    font-size: 0.95rem;
	text-align: justify;
    text-justify: inter-word;
}

.label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* SEZIONI GENERALI */
section {
    padding: 3.5rem 1.5rem;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #111827;
}

/* Testi principali giustificati */
.section-text,
.highlight-box,
.hero-text p,
.contact-grid p {
    text-align: justify;
    text-justify: inter-word;
}

/* DIMORA */
.section-text {
    color: var(--text-muted);
}

.highlight-box {
    margin-top: 1.5rem;
    padding: 1.1rem 1.2rem;
    border-radius: 1.1rem;
    background: var(--bg-section);
    border: 1px solid rgba(15,23,42,0.06);
    box-shadow: 0 10px 30px rgba(15,23,42,0.04);
    font-size: 0.95rem;
}

.bullet-row {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.bullet-dot {
    margin-top: 0.3rem;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
}

/* GALLERY */
.gallery {
    background: var(--bg-section);
    border-top: 1px solid rgba(15,23,42,0.04);
    border-bottom: 1px solid rgba(15,23,42,0.04);
}

.gallery-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

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

@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.8rem;
    border: 1px solid rgba(15,23,42,0.08);
    cursor: pointer;
    background: #f3f4f6;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.03);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item::after {
    content: "Vedi";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(to bottom,
                rgba(15,23,42,0.0),
                rgba(15,23,42,0.45));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1.5rem;
}

.lightbox.open {
    display: flex;
}

.lightbox-img-wrapper {
    max-width: 100%;
    max-height: 100%;
}

.lightbox-img-wrapper img {
    max-width: min(100vw, 1100px);
    max-height: 80vh;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 20px 60px rgba(0,0,0,0.85);
    background: #000;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    background: rgba(0,0,0,0.75);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.45);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    color: #fff;
}

/* Frecce */
.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.75);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.45);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    color: #fff;
    user-select: none;
}

.lightbox-arrow.left {
    left: 18px;
}

.lightbox-arrow.right {
    right: 18px;
}

.lightbox-arrow:hover,
.lightbox-close:hover {
    background: rgba(0,0,0,0.9);
}

/* CONTATTI */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.2rem;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.contact-card {
    padding: 1.4rem 1.5rem;
    border-radius: 1.3rem;
    background: var(--bg-section);
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 14px 34px rgba(15,23,42,0.06);
}

.contact-card dl {
    margin: 0;
}

.contact-card dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 0.6rem;
}

.contact-card dd {
    margin: 0.1rem 0 0.4rem;
    color: #111827;
}

.cin {
    font-family: "Fira Code", Menlo, Consolas, monospace;
    font-size: 0.9rem;
    background: rgba(249,250,251,0.9);
    padding: 0.35rem 0.5rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(15,23,42,0.1);
}

/* FOOTER */
footer {
    padding: 1.7rem 1.5rem 1.9rem;
    border-top: 1px solid rgba(15,23,42,0.06);
    background: #ffffff;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-inner a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-inner a:hover {
    color: var(--accent);
    text-decoration: underline;
}