/* =========================================
   1. STILI GENERALI (Base & Layout)
   ========================================= */
body { 
    font-family: sans-serif; 
    background: #f4f7f6; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

.container {
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   2. ANIMAZIONE CLESSIDRA (Loader)
   ========================================= */
/* Loader con immagine reale */
.clessidra-custom {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto;
    /* Puntiamo al file fisico invece della stringa infinita */
    background: url('../img/clessidra.png') no-repeat center center;
    background-size: contain;
    animation: pulse-loader 1.5s infinite ease-in-out;
}

@keyframes pulse-loader {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

#initial-loader {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: white; 
    z-index: 10001; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}



/* =========================================
   3. LOGIN & BOTTONI PRINCIPALI
   ========================================= */
.login-container { 
    max-width: 400px; 
    margin: 20px auto; 
    padding: 25px; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.input-field { margin-bottom: 15px; }

.input-field label { 
    display: block; 
    font-size: 0.9em; 
    font-weight: bold; 
    margin-bottom: 5px; 
    color: #333; 
}

.input-field input { 
    width: 100%; 
    padding: 12px; 
    box-sizing: border-box; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    font-size: 16px; 
}

.date-flex { display: flex; gap: 10px; }

.main-btn { 
    width: 100%; 
    padding: 14px; 
    background: #4A0404; 
    color: white; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    border-radius: 6px; 
    font-size: 1.1em; 
}

/* =========================================
   4. BARRA INFO OSPITE (Dashboard)
   ========================================= */
.guest-info-container {
    max-width: 800px;
    margin: 0 auto 15px auto;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    border: 1px solid #eee;
}

#barra-ospite-info {
    font-size: 0.9em; 
    color: #4A0404; 
    font-weight: bold;
    text-align: left;
}

#display-dates {
    font-weight: normal; 
    font-size: 0.85em; 
    color: #666;
}

.logout-btn {
    background: #f4f7f6;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    color: #333;
}

/* =========================================
   5. SELETTORE LINGUE & CARD GUIDA
   ========================================= */
.lang-nav { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-bottom: 20px; 
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

/* =========================================
   6. AREA CONTENUTO GUIDA (Sticky Header)
   ========================================= */
#content-area {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: white; 
    z-index: 9999; 
    overflow-y: auto;
}

.guide-header {
    background: #4A0404; 
    color: white; 
    padding: 12px; 
    display: flex; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 10000; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    height: 60px;
    box-sizing: border-box;
}

#inner-guide-title {
    font-size: 1.1em;
    font-weight: bold;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   7. OTTIMIZZAZIONE MOBILE (Media Queries)
   ========================================= */
@media (max-width: 600px) {
    .guide-header {
        height: 70px !important;
    }
    
    #inner-guide-title { 
        font-size: 18px !important; 
    }
    
    .main-btn {
        padding: 16px;
        font-size: 1.2em;
    }
}

/* --- NUOVA STRUTTURA VETRINA --- */

.text-main-color { color: #4A0404 !important; }

/* Fascia dedicata sopra l'immagine */
.hero-text-strip {
    background: #f2efe0; /* Colore sfondo header */
    text-align: center;
    padding: 20px 10px;
    margin: 0;
}

.hero-text-strip h2 { 
    font-size: 1.8rem; 
    margin: 0 0 5px 0; 
    text-transform: uppercase;
}

.hero-text-strip p { 
    font-size: 1.1rem; 
    margin: 0; 
    font-style: italic;
}

/* --- STILI VETRINA COMPACT --- */

.text-main-color { color: #4A0404 !important; }

/* Fascia ridotta in altezza e font più piccolo */
.hero-text-strip {
    background-color: #f2efe0; /* Colore sfondo header */
    text-align: center;
    padding: 10px 8px; /* Ridotto da 25px a 12px per altezza minore */
    margin: 0;
}

.hero-text-strip h2 {
    font-size: 1.4rem; /* Ridotto da 1.8rem */
    margin: 0 0 2px 0;
    font-weight: bold;
}

.hero-text-strip p {
    font-size: 1rem; /* Ridotto da 1.2rem */
    margin: 0;
}

.hero-image-only {
    height: 50vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    border-top: 1px solid #4A0404; /* Bordo marrone di giunzione */
}

.section-box { margin: 20px 0; }

.showcase-text p {
    margin-bottom: 12px;
    line-height: 1.5;
    text-align: center;
    font-size: 0.95rem;
}

.amenity-card {
     background: #f2efe0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #4A0404;
}

@media (max-width: 768px) {
    .hero-text-strip h2 { font-size: 1.1rem; }
    .hero-text-strip p { font-size: 0.9rem; }
    .hero-image-only { height: 35vh; }
}

.page-intro {
    margin-bottom: 2.5rem;
    color: #4A0404;
    text-align: center;
}

.room-section { 
    margin-bottom: 2.5rem; 
    padding: 15px 20px; 
    background: #f2efe0; 
    border: 1px solid #4A0404; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #4A0404;
}

.page-intro h1 { margin: 0 0 15px 0; }
.page-intro p { 
    line-height: 1.7; 
    margin-bottom: 0;
    text-align: justify;
}

.room-header { 
    margin-top: 0;
    margin-bottom: 1rem; 
    padding-bottom: 0.5rem; 
    color: #4A0404; 
}

.room-desc { 
    margin-bottom: 1.5rem; 
    line-height: 1.6; 
    color: #4A0404; 
    font-weight: 500; 
    text-align: justify;
}

.features-list { 
    list-style: none; 
    padding: 0; 
    margin-bottom: 1.5rem; 
}

.features-list li { 
    margin-bottom: 0.5rem; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: #4A0404; 
}

.features-list li::before { 
    content: "•"; 
    color: #FFD700; 
    font-weight: bold; 
}

.photo-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 
    gap: 10px; 
    margin-bottom: 15px; 
}

.photo-grid img { 
    width: 100%; 
    height: 90px; 
    object-fit: cover; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: 0.3s; 
    border: 2px solid transparent; 
}

.photo-grid img:hover { transform: scale(1.05); }

.photo-grid img.active { 
    border-color: #a3c16a; 
    box-shadow: 0 0 8px rgba(163, 193, 106, 0.5); 
}

.main-photo-viewer { 
    width: fit-content; 
    max-width: 100%; 
    margin: 0 auto 20px auto; 
    border: 1px solid #4A0404; 
    border-radius: 8px; 
    overflow: hidden; 
    display: none; 
    background: transparent; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

.main-photo-viewer img { 
    display: block; 
    max-width: 100%; 
    max-height: 75vh; 
    object-fit: contain; 
}