:root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-alt: #ece9e2;
    --surface-soft: #f8f7f4;
    --text: #1f2a36;
    --muted: #5f6974;
    --border: #d9dcd9;
    --accent: #22354a;
    --accent-2: #3a5269;
    --max-width: 1200px;
    --radius: 16px;
    --shadow: 0 14px 34px rgba(20, 32, 44, 0.06);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

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

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

a:hover {
    text-decoration: underline;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.narrow {
    width: min(100% - 2rem, 860px);
    margin: 0 auto;
}

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

.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(34, 53, 74, 0.12);
    flex: 0 0 auto;
}

.brand-kicker,
.card-kicker,
.mini-card-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--muted);
}

.brand-text {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #14202c;
    white-space: nowrap;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 600;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

.site-main {
    min-height: calc(100vh - 170px);
}

.hero,
.page-hero {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #fbfaf7, #f3f1eb);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 2rem;
    align-items: start;
}

.hero-main {
    padding-top: 1.5rem;
}

.hero-card,
.teaser-card,
.info-card,
.content-card,
.mini-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
}

.hero-card h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-list {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.feature-list li + li {
    margin-top: 0.45rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: var(--muted);
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin-top: 0;
    color: #14202c;
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}
h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    margin: 0;
    font-size: 1.42rem;
    color: #243242;
}

.lead,
.section-heading p,
.flow-content p,
.two-col-intro p,
.mini-card p,
.info-card p,
.content-card p,
.teaser-card p {
    color: var(--muted);
}

.hero-lead {
    max-width: 46rem;
    font-size: 1.13rem;
}

.hero-actions {
    display: flex;
    gap: 0.95rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.compact-actions {
    margin-top: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.82rem 1.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
}

.btn-secondary:hover {
    background: rgba(34, 53, 74, 0.06);
    color: var(--accent);
}

.section {
    padding: 4.5rem 0;
}

.section-alt {
    background: var(--surface-alt);
}

.section-heading {
    max-width: 52rem;
    margin-bottom: 2rem;
}

.teaser-grid,
.cards-3,
.cards-4,
.two-col-layout,
.mini-card-grid {
    display: grid;
    gap: 1.5rem;
}

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

.teaser-grid-3,
.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4,
.two-col-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teaser-card,
.info-card,
.content-card,
.mini-card {
    padding: 1.6rem;
}

.teaser-card .btn {
    margin-top: 0.75rem;
}

.two-col-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.flow-content > * + * {
    margin-top: 1rem;
}

.site-footer {
    background: #0e1623;
    color: #cfd6df;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer a {
    color: #e4e9f0;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer small {
    color: #aab4c0;
}

.footer-inner {
    color: #cfd6df;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-inner a {
    color: #e6edf5;
    text-decoration: none;
}

.footer-inner a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-inner small,
.footer-inner p {
    color: #b8c2cf;
}

@media (max-width: 980px) {
    .hero-layout,
    .two-col-intro,
    .teaser-grid,
    .teaser-grid-3,
    .cards-3,
    .cards-4,
    .two-col-layout,
    .gallery-grid,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding: 1rem 0;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    h1 {
        word-break: normal;
    }

    .brand-text {
        white-space: normal;
    }
}


.hero-layout-home {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.section {
    padding: 4.5rem 0;
}

.section-alt {
    background: var(--surface-alt);
}

.section-heading {
    max-width: 52rem;
    margin-bottom: 2rem;
}

.teaser-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.teaser-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teaser-card,
.info-card,
.content-card {
    padding: 1.6rem;
}

.teaser-content {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
}

.cards-3,
.cards-4,
.two-col-layout,
.mini-card-grid {
    display: grid;
    gap: 1.5rem;
}

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

.cards-4,
.two-col-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card-wide {
    grid-column: span 2;
}

.two-col-intro,
.split-showcase,
.callout-band {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

.stack-cards {
    display: grid;
    gap: 1rem;
}

.mini-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
    padding: 1.4rem;
}

.mini-card a,
.text-link {
    font-weight: 700;
}

.callout-band {
    padding: 2rem;
    background: linear-gradient(to right, #fbfaf7, #f0ede6);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
}

.footer-inner {
    padding: 2rem 0 3rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

@media (max-width: 980px) {
    .hero-layout,
    .hero-layout-home,
    .two-col-intro,
    .split-showcase,
    .callout-band,
    .teaser-grid,
    .teaser-grid-3,
    .cards-3,
    .cards-4,
    .two-col-layout,
    .mini-card-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .content-card-wide {
        grid-column: auto;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0;
    }

    .main-nav ul {
        flex-wrap: wrap;
        row-gap: 0.6rem;
    }
}

@media (max-width: 640px) {
    .hero,
    .page-hero,
    .section {
        padding: 3.5rem 0;
    }

    .footer-inner {
        flex-direction: column;
    }
}


/* ===== HOME EDITORIALE ===== */

.section {
    padding: 80px 0;
}

.section.alt {
    background: #f5f5f3;
}

.container.narrow {
    max-width: 760px;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.section p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 18px;
}

.text-link {
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #999;
}

.text-link:hover {
    border-color: #333;
}

.hero {
    padding: 120px 0 100px 0;
}

.hero .lead {
    font-size: 22px;
    margin-top: 20px;
}

.hero .lead-secondary {
    font-size: 18px;
    margin-top: 10px;
    color: #555;
}

.hero-actions {
    margin-top: 30px;
}

.gallery-preview {
    background: #f0f0ec;
    text-align: center;
}



.gallery-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

footer {
    background: #1a1a1a;
    color: #d0d0d0;
}

footer a {
    color: #ffffff;
}

footer a:hover {
    text-decoration: underline;
}

.footer-meta {
    color: #b8b8b8;
}

body {
    line-height: 1.6;
}

.site-title {
    white-space: nowrap;
}

.main-nav a {
    position: relative;
    text-decoration: none;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.25s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.btn {
    transition: all 0.2s ease;
}

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

/* HERO CON IMMAGINE */

.hero-image {
    position: relative;
    background-image: url("/assets/images/hero-nobile.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    min-height: 480px;
    display: flex;
    align-items: center;
}

/* overlay scuro per leggibilità */

.hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero-image .hero-layout {
    position: relative;
    z-index: 2;
}

/* testo hero */

.hero-image h1 {
    color: white;
}

.hero-image .lead {
    color: #f0f0f0;
}

.hero-image .lead-secondary {
    color: #dcdcdc;
}

.hero-image .btn-secondary {
    background: rgba(255,255,255,0.9);
    color: #000;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  text-align: center;
}


.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav:hover,
.lightbox-nav:focus {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}


/* ===== GALLERY ===== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    align-items: start;
}

.gallery-card {
    margin: 0;
}

.gallery-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.gallery-caption {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #4f5965;
}

/* ===== LIGHTBOX ===== */

.lightbox[hidden] {
    display: none !important;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 15, 28, 0.88);
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100% - 32px));
    height: calc(100% - 32px);
    margin: 16px auto;
    padding: 56px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    background: #fff;
}

.lightbox-caption {
    margin: 14px auto 0;
    max-width: 820px;
    color: #f3f5f7;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(255, 255, 255, 0.24);
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 18px;
    }

    .lightbox-dialog {
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        margin: 10px auto;
        padding: 52px 10px 20px;
    }

    #lightbox-image {
        max-height: calc(100vh - 140px);
    }

    .lightbox-caption {
        font-size: 0.9rem;
    }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    font-size: 28px;
    color: white;
    background: rgba(255,255,255,0.18);
    cursor: pointer;

    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.lightbox-dialog:hover .lightbox-nav {
    opacity: 1;
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.35);
}


.contact-callout {
    margin: 2rem 0;
    padding: 1.75rem 2rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid #c7a15a;
}

.contact-callout h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.contact-email {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0;
}

.contact-email a {
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}