/* PALETTE COLORI */
:root {
    /* Colori principali */
    --color-bg-page: #000000;
    --color-bg-image-overlay: rgba(0, 0, 0, 0.35);
    --color-main-bg: #0c2135;                /* nav / blocchi principali */
    --color-main-bg-strong: rgba(12, 33, 53, 0.95);
    --color-main-bg-soft: rgba(12, 33, 53, 0.85);
    --color-main-border-soft: rgba(255, 255, 255, 0.25);
    --color-main-border-light: rgba(255, 255, 255, 0.12);
    /* Testi */
    --color-text-body: #ffffff;
    --color-text-body-muted: rgba(255, 255, 255, 0.85);
    --color-text-title: #E0B12B;
    --color-text-link: #ffffff;
    /* Hero overlay */
    --color-hero-overlay-top: rgba(0, 0, 0, 0.7);
    --color-hero-overlay-bottom: rgba(0, 0, 0, 0.2);
    /* Galleria */
    --color-gallery-bg: #000000;
    /* Bottoni / bordi */
    --color-btn-border: rgba(255, 255, 255, 0.6);
    --color-btn-hover-bg: rgba(255, 255, 255, 0.15);
    /* Footer */
    --color-footer-bg: var(--color-main-bg-strong);
    /* Effetti */
    --color-shadow-soft: rgba(0, 0, 0, 0.4);
    --color-shadow-strong: rgba(0, 0, 0, 0.6);
    --color-shadow-hover: rgba(0, 0, 0, 0.7);
    /* Colori per scritta Zapfino */
    --logo-ink: #ffffff;
    --logo-ink-soft: rgba(255, 255, 255, 0.85);
}
/* FONT LUMINARI */
@font-face {
    font-family: 'Luminari';
    src: url('font/luminari/Luminari-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* FONT ZAPFINO */
@font-face {
    font-family: 'Zapfino';
    src: url('font/zapfino/Zapfino.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-text-body);
    background-image: url("sfondo.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.page-overlay {
    min-height: 100vh;
    background: var(--color-bg-image-overlay);
}
/* Titoli: Luminari */
h1,
h2,
h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    font-family: 'Luminari', 'Times New Roman', serif;
    color: var(--color-text-title);
}
a {
    color: var(--color-text-link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
/* NAV DESKTOP – FISSA IN ALTO */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-main-bg);
    color: var(--color-text-body);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Logo ai bordi */
.nav-logo-link {
    display: inline-flex;
    align-items: center;
}
.nav-logo {
    height: 40px;
    width: auto;
}
/* Menu centrato tra i loghi */
.nav-menu {
    display: inline-flex;
    align-items: center;
    gap: 2.0rem;
}
/* Link nav */
.nav-menu a {
    color: var(--color-text-body);
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    font-family: 'Georgia', 'Times New Roman', serif;
}
/* Evidenziazione voce attiva */
.nav-menu a.active {
    font-weight: 600;
    text-decoration: underline;
}
/* NAV MOBILE (hamburger) – FISSA IN ALTO */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: none;
    background-color: var(--color-main-bg);
    color: var(--color-text-body);
}
.mobile-nav-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
/* Logo mobile (stendardo solo a sinistra) */
.mobile-nav-header .nav-logo-link .nav-logo {
    height: 36px;
}
/* Hamburger */
.hamburger {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-body);
    border-radius: 2px;
}
.mobile-nav-menu {
    max-width: 1100px;
    margin: 0 auto;
    display: none;
    flex-direction: column;
    padding: 0.5rem 1rem 0.8rem 1rem;
    gap: 0.4rem;
    background-color: var(--color-main-bg);
}
.mobile-nav-menu a {
    font-size: 0.95rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-main-border-light);
    font-family: 'Georgia', 'Times New Roman', serif;
}
.mobile-nav-menu a:last-child {
    border-bottom: none;
}
.mobile-nav-menu a.active {
    font-weight: 600;
    text-decoration: underline;
}
/* HERO CON LOGO + SCRITTA GUESTHOUSE */
.hero {
    position: relative;
    width: 100%;
    min-height: 280px;
    padding-top: 72px; /* spazio sotto la nav fissa */
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--color-hero-overlay-top),
        var(--color-hero-overlay-bottom)
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;  /* garantisce stendardo sopra, logo sotto, poi wordmark */
    align-items: center;
    justify-content: center;
    min-height: 280px;
    text-align: center;
    padding: 1.5rem;
    gap: 0.25rem; /* piccolo spazio tra stendardo e logo */
}
/* STENDARDO */
.hero-stendardo {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
}
/* LOGO SOTTO LO STENDARDO */
.hero-logo {
    display: block;
    max-width: 520px;
    width: 100%;
    height: auto;
}
/* WORDMARK 'Il Pittore - Guesthouse' sotto il logo */
.hero-wordmark {
    margin-top: 5rem;
    text-align: center;
}
/* LOGO / WORDMARK CON ZAPFINO */
.slide-title {
    margin: 0;
    font-family: 'Zapfino', cursive;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--logo-ink);
    text-rendering: geometricPrecision;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.slide-sub {
    margin: 0;
    margin-left: 300px;
    font-family: 'Zapfino', cursive;
    font-size: clamp(16px, 2.6vw, 20px);
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--logo-ink-soft);
    white-space: nowrap;
    line-height: 1.05;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.slide-underline {
    width: clamp(100px, 14vw, 180px);
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.25) 80%,
        transparent 100%
    );
    margin: 0.3rem auto 0;
}
.slide-title .wordmark {
    display: inline-block;
    transform: none;
}
/* LAYOUT CONTENUTO PRINCIPALE */
main {
    max-width: 1100px;
    margin: 2rem auto 3rem auto;
    padding: 72px 1.5rem 90px 1.5rem; /* top: sotto nav; bottom: sopra footer fisso desktop */
    color: var(--color-text-body);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInMain 0.6s ease-out forwards;
}
@keyframes fadeInMain {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* BOX GENERICI */
.section-box {
    background-color: var(--color-main-bg-soft);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--color-shadow-soft);
    margin-bottom: 1.5rem;
}
.section-box h2 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}
.section-box p {
    margin-bottom: 0.8rem;
}
/* ============================= */
/* SEZIONE GUESTHOUSE (Dormire)  */
/* ============================= */
.section-box.hero-guesthouse {
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--color-shadow-soft);
    margin-bottom: 1.5rem;
}
/* Contenitore generale della sezione, con bordo arrotondato e sfondo scuro */
.hero-guesthouse-overlay {
    position: relative;
    border-radius: 8px;
    margin: 0.75rem;                         /* piccolo margine ai bordi */
    background-color: rgba(0, 0, 0, 0.75);   /* sfondo dietro immagine + testo */
}
/* Layout interno: immagine + testo affiancati */
.hero-guesthouse-inner {
    position: relative;
    z-index: 1;
    padding: 1.8rem 2.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}
/* Wrapper immagine - la foto si vede tutta */
.hero-guesthouse-image {
    flex: 0 1 420px;      /* dimensione target dell'immagine */
    max-width: 100%;
    display: flex;
    justify-content: center;
}
.hero-guesthouse-image img {
    width: 100%;
    height: auto;         /* mantiene le proporzioni originali */
    object-fit: contain;  /* NON taglia nulla: immagine intera */
    border-radius: 6px;
}
/* Colonna testo */
.hero-guesthouse-text {
    flex: 1 1 280px;
    min-width: 260px;
    color: var(--color-text-body);
}
.hero-guesthouse-text h1 {
    font-family: 'Zapfino';
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--color-text-title);
}
.hero-guesthouse-text p {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
    color: var(--color-text-body-muted);
}
/* Logo Booking nella pagina Dormire */
.booking-logo {
    max-width: 110px;   /* modifica qui per cambiare la dimensione */
    width: 100%;
    height: auto;
    display: block;
}
/* Responsive: su mobile immagine sopra, testo sotto */
@media (max-width: 768px) {
    .hero-guesthouse-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-guesthouse-image,
    .hero-guesthouse-text {
        flex: 1 1 100%;
    }
    .hero-guesthouse-overlay {
        margin: 0.5rem;
        padding: 0.4rem 0;
    }
}
/* GALLERIA – STILE ALLINEATO */
.gallery-box {
    background-color: var(--color-main-bg-soft);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--color-shadow-soft);
}
/* Viewer singola immagine (pagina galleria principale) */
.gallery-viewer {
    position: relative;
    width: 100%;
    padding-top: 62%;
    background-color: var(--color-gallery-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}
/* Immagine galleria con fade su ogni cambio */
.gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--color-gallery-bg);
    opacity: 0;
    animation: galleryFadeIn 0.45s ease-in forwards;
}
/* Keyframes per fade-in galleria */
@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1.0);
    }
}
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.gallery-button {
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--color-btn-border);
    background: transparent;
    color: var(--color-text-body);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Georgia', 'Times New Roman', serif;
}
.gallery-button:hover {
    background-color: var(--color-btn-hover-bg);
}
.gallery-counter {
    font-size: 0.85rem;
    opacity: 0.8;
    font-family: 'Georgia', 'Times New Roman', serif;
}
/* GALLERIA GRIGLIA PER LA GUESTHOUSE (Dormire) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.gallery-item {
    background-color: var(--color-gallery-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--color-shadow-soft);
    position: relative;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: translateY(4px);
    animation: galleryFadeIn 0.45s ease-in forwards;
}
/* FOOTER SOCIAL – FISSO IN BASSO (DESKTOP) */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-top: 1px solid var(--color-main-border-soft);
    color: var(--color-text-body);
    background-color: var(--color-footer-bg);
    backdrop-filter: blur(4px);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}
.footer-text {
    font-size: 0.9rem;
    opacity: 0.85;
    font-family: 'Georgia', 'Times New Roman', serif;
}
/* PULSANTE "TORNA SU" (se riattivato) */
.back-to-top {
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.9;
    border: 1px solid var(--color-btn-border);
    border-radius: 16px;
    padding: 0.25rem 0.7rem;
    background: transparent;
    color: var(--color-text-body);
    margin-left: 1rem;
    white-space: nowrap;
    font-family: 'Georgia', 'Times New Roman', serif;
}
.back-to-top:hover {
    background-color: var(--color-btn-hover-bg);
    opacity: 1;
}
/* FOOTER SOCIAL ICONS */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0.0rem;
}
/* Wrapper per controllare gli spazi tra icone */
.fb-link {
    margin-right: 0.0rem;
}
.ig-link {
    margin-right: 0.6rem;
}
.ta-link {
    margin-right: 1.2rem;
}
.gm-link {
    margin-right: 0;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Stile icone social */
.footer-social img {
    object-fit: cover;
    display: block;
    background-color: transparent;
    border-radius: 50%;
    filter: drop-shadow(0 1px 3px var(--color-shadow-strong));
    transition: transform 0.15s ease, filter 0.15s ease;
}
/* Dimensioni custom */
.logo-fb {
    width: 52px;
    height: 52px;
}
.logo-ig {
    width: 50px;
    height: 50px;
}
.logo-ta {
    width: 30px;
    height: 30px;
}
.logo-gm {
    width: 30px;
    height: 30px;
}
/* Logo Booking nella pagina Dormire (già usato sopra, ribadito per chiarezza) */
.booking-logo {
    max-width: 110px;
    width: 100%;
    height: auto;
    display: block;
}
.footer-social img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 2px 5px var(--color-shadow-hover));
}
/* FOOTER RIGHT: lingua */
.footer-right {
    font-size: 0.85rem;
    text-align: right;
}
/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        min-height: 220px;
    }
    .main-nav {
        display: none;
    }
    .mobile-nav {
        display: block;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    /* Footer NON fisso su mobile: in fondo alla pagina */
    .footer {
        position: static;
        padding: 1rem 0;
    }
    /* Il main non deve più lasciare spazio extra per il footer fisso */
    main {
        padding: 72px 1.5rem 1.5rem 1.5rem;
        margin-bottom: 2rem;
    }
    /* Galleria griglia: 2 colonne su tablet */
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    /* Galleria griglia: 1 colonna su schermi piccoli */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.team-section {
    background-color: var(--color-main-bg-soft);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--color-shadow-soft);
    margin-bottom: 1.5rem;
}
.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.team-card {
    max-width: 220px;
    text-align: center;
}
/* FOTO CON DIMENSIONI UGUALI */
.team-photo {
    width: 200px;              /* larghezza fissa uguale per entrambe */
    height: 300px;             /* altezza fissa uguale per entrambe */
    object-fit: cover;         /* riempie il riquadro, ritagliando se necessario */
    border-radius: 8px;
    display: block;
    margin: 0 auto;            /* centra l'immagine nella card */
    box-shadow: 0 4px 12px var(--color-shadow-soft);
}
.team-caption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-body-muted);
    font-family: 'Georgia', 'Times New Roman', serif;
}
