﻿/* ============================
   HERO FULLSCREEN
============================ */

.hero {
    position: relative;
    z-index: 1;
    height: 100vh;
    background: #1a2740;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/img/home/esterno.JPG');
    background-size: cover;
    background-position: var(--hero-x, 50%) var(--hero-y, 50%);
    background-repeat: no-repeat;
    transform: scale(var(--hero-s, 1));
    transform-origin: var(--hero-x, 50%) var(--hero-y, 50%);
    z-index: 0;
}

.header-premium {
    z-index: 9999;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.hero-content {
    position: relative;
    color: white;
    animation: fadeIn 1.2s ease-out;
    margin-top: 100px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-style: italic;
    opacity: 0.92;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
}

.btn-cta {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 28px;
    background: #b48a4a;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: 0.3s;
}

    .btn-cta:hover {
        background: #d1a45c;
    }

/* ============================
   INTRO SECTION
============================ */

.intro {
    max-width: 800px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
}

.intro-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #444;
}

/* ============================
   FULL WIDTH IMAGES
============================ */

.full-image img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 60px 0;
}

@media (max-width: 768px) {
    .full-image img {
        height: 260px;
    }
}

/* ============================
   STORY SECTION
============================ */

.story {
    max-width: 900px;
    margin: 100px auto;
    text-align: center;
    padding: 0 20px;
}

.story-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
}

/* ============================
   FINAL CTA
============================ */

.final-cta {
    text-align: center;
    margin: 80px 0 120px;
}

.btn-cta.big {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* ============================
   ANIMATIONS
============================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   RESPONSIVE
============================ */

@media (max-width: 768px) {
    .hero {
        height: 85vh;
    }

    .hero-bg {
        background-position: var(--hero-mx, var(--hero-x, 50%)) var(--hero-my, var(--hero-y, 50%));
        transform: scale(var(--hero-ms, var(--hero-s, 1)));
        transform-origin: var(--hero-mx, var(--hero-x, 50%)) var(--hero-my, var(--hero-y, 50%));
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* ============================
   CHRISTMAS BANNER
============================ */

.christmas-banner {
    background: linear-gradient(90deg, #14532d, #166534, #15803d, #166534, #14532d);
    color: #d1fae5;
    padding: 13px 0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow: hidden;
    white-space: nowrap;
}

.christmas-ticker {
    display: inline-block;
    animation: ticker-scroll 40s linear infinite;
    padding-left: 100%;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ============================
   CHRISTMAS HERO
============================ */

.hero.christmas-hero .hero-bg {
    background-image: url('/img/natale/IMG001.JPG');
}

/* ============================
   SNOWFLAKES
============================ */

.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
    height: 100vh;
}

.snowflake {
    position: absolute;
    top: -60px;
    color: #c7e9ff;
    font-size: 1.2rem;
    opacity: 0.75;
    animation: snow-fall linear infinite;
    user-select: none;
}

.snowflake:nth-child(1)  { left:  5%; animation-duration: 8s;  animation-delay: 0s;    font-size: 1rem; }
.snowflake:nth-child(2)  { left: 14%; animation-duration: 12s; animation-delay: 2s;    font-size: 0.8rem; }
.snowflake:nth-child(3)  { left: 23%; animation-duration: 9s;  animation-delay: 4s;    font-size: 1.3rem; }
.snowflake:nth-child(4)  { left: 34%; animation-duration: 11s; animation-delay: 1s;    font-size: 0.9rem; }
.snowflake:nth-child(5)  { left: 45%; animation-duration: 7s;  animation-delay: 3s;    font-size: 1.1rem; }
.snowflake:nth-child(6)  { left: 56%; animation-duration: 13s; animation-delay: 0.5s;  font-size: 0.85rem; }
.snowflake:nth-child(7)  { left: 65%; animation-duration: 10s; animation-delay: 2.5s;  font-size: 1.2rem; }
.snowflake:nth-child(8)  { left: 74%; animation-duration: 8s;  animation-delay: 1.5s;  font-size: 0.95rem; }
.snowflake:nth-child(9)  { left: 83%; animation-duration: 12s; animation-delay: 3.5s;  font-size: 1rem; }
.snowflake:nth-child(10) { left: 93%; animation-duration: 9s;  animation-delay: 0.8s;  font-size: 0.9rem; }

@keyframes snow-fall {
    0%   { transform: translateY(-60px) rotate(0deg);   opacity: 0.8; }
    10%  { opacity: 0.75; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

/* ============================
   COLAZIONE / BREAKFAST
============================ */

.colazione-section {
    padding: 90px 24px;
    background: #faf8f5;
}

.colazione-header {
    text-align: center;
    margin-bottom: 42px;
}

.colazione-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: #1c1917;
    margin-bottom: 12px;
}

.colazione-sub {
    font-size: 1.05rem;
    color: #78716c;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.colazione-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 1060px;
    margin: 0 auto;
}

.colazione-grid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.colazione-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

@media (max-width: 900px) {
    .colazione-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .colazione-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .colazione-grid img {
        height: 160px;
    }

    .colazione-title {
        font-size: 1.3rem;
    }
}

/* ============================
   LE CAMERE HOME
============================ */

.camere-home {
    padding: 90px 24px;
    background: #fff;
}

.camere-home-header {
    text-align: center;
    margin-bottom: 40px;
}

.camere-home-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: #1c1917;
    text-transform: uppercase;
}

.camere-home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

.chc {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 3 / 4;
    text-decoration: none;
}

    .chc img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .chc:hover img {
        transform: scale(1.06);
    }

.chc-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 18px 18px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-style: italic;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .camere-home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .camere-home-grid {
        gap: 8px;
    }
}

/* ============================
   GLI SPAZI — BENTO
============================ */

.spazi-section {
    background: #f5f0e8;
    padding: 40px 24px;
}

.spazi-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 360px 360px;
    grid-template-areas:
        "a b c"
        "a d e";
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
}

    .spazi-bento > div {
        overflow: hidden;
        border-radius: 10px;
        box-shadow: 0 4px 18px rgba(0,0,0,0.10);
    }

    .spazi-bento img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.45s ease;
    }

    .spazi-bento img:hover {
        transform: scale(1.04);
    }

.sba { grid-area: a; }
.sbb { grid-area: b; }
.sbc { grid-area: c; }
.sbd { grid-area: d; }
.sbe { grid-area: e; }

@media (max-width: 768px) {
    .spazi-bento {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 200px 200px 200px;
        grid-template-areas:
            "a a"
            "b c"
            "d e";
    }
}

/* ============================
   INTORNO A NOI
============================ */

.territorio-section {
    padding: 90px 24px;
    background: #faf8f5;
}

.territorio-header {
    text-align: center;
    margin-bottom: 40px;
}

.territorio-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: #1c1917;
    text-transform: uppercase;
}

.territorio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

.tg-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    text-decoration: none;
}

    .tg-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.45s ease;
    }

    .tg-card:hover img {
        transform: scale(1.06);
    }

.tg-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 14px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.62));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .territorio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .territorio-grid {
        gap: 8px;
    }

    .tg-label {
        font-size: 0.7rem;
    }
}

.full-image {
    overflow: hidden;
}

.full-image img {
    transition: object-position .1s, transform .1s;
}

/* CSS custom-property-based positioning (set via inline style by Razor) */
.full-image img,
.colazione-cell img,
.spazi-bento img {
    object-position: var(--obj-x, 50%) var(--obj-y, 50%);
    transform: scale(var(--obj-s, 1.00));
    transform-origin: var(--obj-x, 50%) var(--obj-y, 50%);
}

@media (max-width: 480px) {
    .full-image img,
    .colazione-cell img,
    .spazi-bento img {
        object-position: var(--mob-x, var(--obj-x, 50%)) var(--mob-y, var(--obj-y, 50%));
        transform: scale(var(--mob-s, var(--obj-s, 1.00)));
        transform-origin: var(--mob-x, var(--obj-x, 50%)) var(--mob-y, var(--obj-y, 50%));
    }
}

/* ============================
   COLAZIONE CELL (wraps img for CSS scale clip)
============================ */

.colazione-cell {
    overflow: hidden;
    border-radius: 10px;
    height: 280px;
    position: relative;
}

.colazione-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: object-position .1s, transform .35s ease, box-shadow .35s ease;
}

.colazione-cell:hover img {
    box-shadow: 0 12px 36px rgba(0,0,0,.18);
}

@media (max-width: 560px) {
    .colazione-cell { height: 160px; }
}

/* keep direct img fallback for legacy markup */
.colazione-grid > img {
    border-radius: 10px;
    height: 280px;
    object-fit: cover;
    overflow: hidden;
}

/* ============================
   HALLOWEEN HERO / PASQUA HERO
============================ */

.hero.halloween-hero {
    filter: hue-rotate(25deg) saturate(1.3);
}

.hero.halloween-hero .hero-bg {
    background-image: url('/img/home/esterno.JPG');
}

.hero.pasqua-hero {
    filter: hue-rotate(280deg) saturate(0.9) brightness(1.05);
}

.hero.pasqua-hero .hero-bg {
    background-image: url('/img/home/esterno.JPG');
}

/* ============================
   SEASONAL BANNERS (Halloween / Pasqua)
============================ */

.seasonal-banner {
    padding: 13px 0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow: hidden;
    white-space: nowrap;
}

.seasonal-ticker {
    display: inline-block;
    animation: ticker-scroll 38s linear infinite;
    padding-left: 100%;
}

.halloween-banner {
    background: linear-gradient(90deg, #431407, #7c2d12, #9a3412, #7c2d12, #431407);
    color: #fed7aa;
}

.pasqua-banner {
    background: linear-gradient(90deg, #312e81, #4338ca, #6366f1, #4338ca, #312e81);
    color: #e0e7ff;
}

/* ============================
   MOBILE (≤ 480px)
============================ */

@media (max-width: 480px) {

    /* — Hero — */
    .hero {
        height: 88vh !important;
    }

    .hero-content {
        margin-top: 60px;
        padding: 0 18px;
    }

    .hero-title {
        font-size: 2rem !important;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }

    .hero-tagline {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .btn-cta {
        margin-top: 18px;
        padding: 11px 24px;
        font-size: 0.95rem;
    }

    /* — Intro — */
    .intro {
        margin: 44px auto;
    }

    .intro-title {
        font-size: 1.15rem;
        letter-spacing: 2px;
    }

    .intro-text {
        font-size: 1rem;
    }

    /* — Full image — */
    .full-image img {
        height: 200px !important;
        margin: 28px 0;
    }

    /* — Story — */
    .story {
        margin: 52px auto;
    }

    .story-title {
        font-size: 1.25rem;
        letter-spacing: 2px;
    }

    .story-text {
        font-size: 1rem;
    }

    /* — Camere home — */
    .camere-home {
        padding: 50px 14px;
    }

    .camere-home-title {
        font-size: 1.15rem;
        letter-spacing: 2px;
    }

    /* — Colazione — */
    .colazione-section {
        padding: 50px 14px;
    }

    .colazione-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .colazione-sub {
        font-size: 0.95rem;
    }

    .colazione-cell {
        height: 140px;
    }

    /* — Spazi bento — */
    .spazi-bento {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: 160px 160px 160px !important;
        grid-template-areas:
            "a a"
            "b c"
            "d e" !important;
    }

    /* — Territorio — */
    .territorio-section {
        padding: 50px 14px;
    }

    .territorio-title {
        font-size: 1.15rem;
        letter-spacing: 2px;
    }

    /* — Final CTA — */
    .final-cta {
        margin: 50px 0 70px;
    }

    .btn-cta.big {
        padding: 13px 28px;
        font-size: 1rem;
    }
}

