/* ============================================
   Case Vacanze Baia Peschici - Modern CSS
   ============================================ */

:root {
    --blue-dark: #0A4D68;
    --blue: #088395;
    --teal: #05BFDB;
    --sand: #F9F7F2;
    --green: #2D5A3D;
    --text: #1a1a1a;
    --text-light: #555;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --font: 'Inter', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--sand);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

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

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-dark); }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--blue-dark);
    font-weight: 700;
    line-height: 1.2;
}

.logo-icon { font-size: 1.8rem; }
.logo-text small { font-weight: 500; font-size: 0.75rem; color: var(--blue); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a.active,
.main-nav a:hover { color: var(--blue); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--blue-dark);
    transition: .3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all .25s;
    text-decoration: none;
}

.btn-primary {
    background: var(--blue);
    color: var(--white) !important;
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue) !important;
}

.btn-outline:hover {
    background: var(--blue);
    color: var(--white) !important;
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--teal) 100%);
    color: var(--white);
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    position: relative;
}

.hero p {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    position: relative;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* Cards */
.section { padding: 4rem 0; }

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--blue-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    height: 220px;
    background: linear-gradient(45deg, var(--blue), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.8);
}

.card-body { padding: 1.5rem; }

.card-body h3 {
    font-family: var(--font-display);
    color: var(--blue-dark);
    margin-bottom: 0.5rem;
}

.card-body p { color: var(--text-light); margin-bottom: 1.25rem; font-size: 0.95rem; }

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.feature h4 { color: var(--blue-dark); margin-bottom: 0.35rem; font-size: 1rem; }
.feature p { font-size: 0.85rem; color: var(--text-light); }

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.gallery a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #ddd;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery a:hover img { transform: scale(1.05); }

/* Prices table */
.table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--blue-dark);
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
}

tr:hover td { background: #f8fbfc; }

td.price { font-weight: 600; color: var(--blue); }



/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-info h3 { color: var(--blue-dark); margin-bottom: 1rem; }

.contact-info p { margin-bottom: 0.75rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
}

/* Admin */
.admin-header {
    background: var(--blue-dark);
    color: white;
    padding: 1rem 0;
}

.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; }

.admin-nav a { color: rgba(255,255,255,0.85); }
.admin-nav a:hover { color: white; }

.admin-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

/* Footer */
.site-footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,0.85);
    margin-top: auto;
    padding-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col a { color: rgba(255,255,255,0.8); }
.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom .small { opacity: 0.7; margin-top: 0.35rem; }

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.badge {
    display: inline-block;
    background: var(--teal);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: var(--shadow);
        transform: translateY(-120%);
        opacity: 0;
        transition: .3s;
        pointer-events: none;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .contact-grid { grid-template-columns: 1fr; }

    .hero { padding: 3.5rem 0 3rem; }
}

/* ===== AGGIORNAMENTI: logo, hero, tabella mobile ===== */

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.logo-text { display: none; }

/* Hero con immagine di sfondo */
.hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,77,104,0.75) 0%, rgba(8,131,149,0.65) 60%, rgba(5,191,219,0.5) 100%);
}

.hero-image .container {
    position: relative;
    z-index: 1;
}

.card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-img {
    height: 220px;
    overflow: hidden;
    background: #ddd;
}

/* Tabella prezzi: scroll + card alternative su mobile */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    min-width: 520px;
}

td.price { white-space: nowrap; }

.price-cards { display: none; }

.price-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.price-card .periodo {
    font-weight: 600;
    color: var(--blue-dark);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.price-card .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.price-card .row span:last-child {
    font-weight: 600;
    color: var(--blue);
}

@media (max-width: 640px) {
    .table-desktop { display: none; }
    .price-cards { display: block; }
    .logo img { height: 40px; }
    .hero-image { min-height: 360px; }
}


.comune-box {
    text-align: center;
    margin: 2.5rem auto 0;
    max-width: 560px;
}
.comune-box h3 {
    font-family: var(--font-display);
    color: var(--blue-dark);
    margin-bottom: 0.5rem;
}
.comune-box p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
}
.logo-comune {
    display: inline-block;
}
.logo-comune img {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity .2s, transform .2s;
}
.logo-comune:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}


.offerte-box {
    text-align: center;
    margin: 2.5rem auto 0;
    max-width: 560px;
}
.offerte-box h3 {
    font-family: var(--font-display);
    color: var(--blue-dark);
    margin-bottom: 0.5rem;
}
.offerte-box p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
}
.logo-offerte {
    display: inline-block;
}
.logo-offerte img {
    max-width: 520px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity .2s, transform .2s;
}
.logo-offerte:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}






/* ============================================================
CALENDARIO - RESPONSIVE
============================================================ */
.calendar-box {
width: 100%;
max-width: 100%;
margin: 2rem 0;
padding: 0;
box-sizing: border-box;
overflow: hidden;
}
/* Contenitore FullCalendar */
#calendar {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
overflow: hidden !important;
}
/* FullCalendar */
#calendar .fc {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
box-sizing: border-box !important;
}
/* Vista calendario */
#calendar .fc-view-harness,
#calendar .fc-view,
#calendar .fc-daygrid {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
box-sizing: border-box !important;
}
/*
•	IMPORTANTE:
•	La regola globale "table { min-width: 520px; }"
•	usata dalla tabella prezzi NON deve applicarsi
•	alle tabelle di FullCalendar.
*/
#calendar table,
#calendar .fc-scrollgrid,
#calendar .fc-scrollgrid table,
#calendar .fc-daygrid-body,
#calendar .fc-daygrid-body table,
#calendar .fc-scrollgrid-sync-table {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
table-layout: fixed !important;
box-sizing: border-box !important;
}
/* Celle */
#calendar th,
#calendar td {
width: auto !important;
max-width: none !important;
min-width: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
overflow: hidden !important;
}
/* ============================================================
GIORNI DELLA SETTIMANA
============================================================ */
#calendar .fc-col-header-cell {
overflow: hidden !important;
}
#calendar .fc-col-header-cell-cushion {
display: block !important;
width: 100% !important;
max-width: 100% !important;
overflow: hidden !important;
text-align: center !important;
white-space: nowrap !important;
font-size: 0.85rem !important;
font-weight: 600 !important;
padding: 6px 0 !important;
box-sizing: border-box !important;
}
/* ============================================================
NUMERI DEI GIORNI
============================================================ */
#calendar .fc-daygrid-day-number {
display: block !important;
float: none !important;
width: 100% !important;
max-width: 100% !important;
text-align: center !important;
font-size: 0.95rem !important;
padding: 5px 0 !important;
box-sizing: border-box !important;
}
/* Celle calendario */
#calendar .fc-daygrid-day-frame {
min-height: 3rem !important;
width: 100% !important;
box-sizing: border-box !important;
}
/* ============================================================
EVENTI
============================================================ */
#calendar .fc-event {
margin: 1px 2px !important;
min-height: 6px !important;
font-size: 0 !important;
overflow: hidden !important;
}
#calendar .fc-event-title {
display: none !important;
}
/* ============================================================
TITOLO
============================================================ */
#calendar .fc-toolbar-title {
font-size: 1.05rem !important;
}
/* ============================================================
PULSANTI
============================================================ */
#calendar .fc-button {
padding: 0.35rem 0.55rem !important;
font-size: 0.8rem !important;
}
/* ============================================================
SMARTPHONE
============================================================ */
@media (max-width: 640px) {
.calendar-box {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 1.5rem 0;
    overflow: hidden;
}

#calendar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#calendar .fc {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#calendar .fc-col-header-cell-cushion {
    font-size: 0.78rem !important;
    padding: 5px 0 !important;
}

#calendar .fc-daygrid-day-number {
    font-size: 0.9rem !important;
    padding: 5px 0 !important;
}

#calendar .fc-daygrid-day-frame {
    min-height: 2.7rem !important;
}

#calendar .fc-toolbar-title {
    font-size: 0.95rem !important;
}

#calendar .fc-button {
    padding: 0.3rem 0.45rem !important;
    font-size: 0.75rem !important;
}
}
/* ============================================================
TELEFONI MOLTO STRETTI
============================================================ */
@media (max-width: 380px) {
#calendar .fc-col-header-cell-cushion {
    font-size: 0.72rem !important;
    padding: 4px 0 !important;
}

#calendar .fc-daygrid-day-number {
    font-size: 0.85rem !important;
}

#calendar .fc-daygrid-day-frame {
    min-height: 2.5rem !important;
}

#calendar .fc-toolbar-title {
    font-size: 0.9rem !important;
}

#calendar .fc-button {
    padding: 0.25rem 0.35rem !important;
    font-size: 0.7rem !important;
}
}



/* ============================================================
   METEO 3B METEO
   CENTRATO E RESPONSIVE
   ============================================================ */

.meteo-section {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px 15px;
    overflow: hidden;
    margin:auto;
}

.meteo-box {
    width: 90%;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

/* Dimensioni originali del widget */
.meteo-responsive {
    width: 90%;
    height: 220px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.meteo-responsive iframe {
    display: block;
    width: 90%;
    height: 220px;
    border: 0;
    margin: 0;
}


/* ============================================================
   SMARTPHONE
   ============================================================ */

@media (max-width: 420px) {

    .meteo-section {
        padding-left: 10px;
        padding-right: 10px;
        height: auto;
    }

    .meteo-box {
        max-width: 95%;
        height: auto;
    }

    .meteo-responsive {
        width: 95%;
        height: 220px;
        aspect-ratio: 382 / 192;
    }

    .meteo-responsive iframe {
        width: 95%;
        height: 220px;
         margin:auto;

        transform-origin: top left;
        transform: scale(
            calc((100vw - 20px) / 382)
        );
    }
}


