/* ============================================
   PALETTE SYSTEM
   ============================================ */

/* PALETTE HUMAN-FRIENDLY (Default) */
:root,
[data-palette="human"] {
    --primary: #f4a261;
    --secondary: #e76f51;
    --accent: #2a9d8f;
    --dark: #264653;
    --light: #fef5ed;
    --cream: #f8f3eb;
    --success: #52b788;
    --text: #264653;
    --background: #fef5ed;
    --card-bg: #ffffff;
    --calendar-bg: #ffffff;
    --border: #e8d5c4;
}

/* PALETTE DOG-VISION */
[data-palette="dog"] {
    --primary: #3A7BC8;
    --secondary: #F4D03F;
    --accent: #5DADE2;
    --dark: #34495E;
    --light: #FFF8DC;
    --cream: #FFF4CC;
    --success: #85C1E9;
    --text: #34495E;
    --background: #FFF8DC;
    --card-bg: #FFFFFF;
    --border: #BDC3C7;
}

/* PALETTE CAT-VISION */
[data-palette="cat"] {
    --primary: #6C5CE7;
    --secondary: #0984E3;
    --accent: #00B894;
    --dark: #2D3436;
    --light: #DFE6E9;
    --cream: #F0F3F7;
    --success: #00D2D3;
    --text: #2D3436;
    --background: #DFE6E9;
    --card-bg: #FFFFFF;
    --border: #B2BEC3;
}

/* PALETTE PET-FRIENDLY */
[data-palette="pet"] {
    --primary: #4A90E2;
    --secondary: #F9CA24;
    --accent: #9B59B6;
    --dark: #2C3E50;
    --light: #F5F5F5;
    --cream: #FAFAFA;
    --success: #16A085;
    --text: #2C3E50;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --border: #95A5A6;
}

/* ============================================
   DARK MODE VARIATIONS
   ============================================ */

[data-theme="dark"][data-palette="human"] {
    --primary: #f4a261;
    --secondary: #e76f51;
    --accent: #2a9d8f;
    --dark: #fef5ed;
    --light: #1a1a1a;
    --cream: #2a2520;
    --success: #52b788;
    --text: #fef5ed;
    --background: #1a1a1a;
    --card-bg: #918e8e;
    --calendar-bg: #ffffffff;
    --border: #ffffff;
}

[data-theme="dark"][data-palette="dog"] {
    --primary: #5DADE2;
    --secondary: #F4D03F;
    --accent: #3A7BC8;
    --dark: #E0E0E0;
    --light: #1A1A2E;
    --cream: #252540;
    --success: #85C1E9;
    --text: #E0E0E0;
    --background: #1A1A2E;
    --card-bg: #252540;
    --border: #34495E;
}

[data-theme="dark"][data-palette="cat"] {
    --primary: #9B7EDE;
    --secondary: #3498DB;
    --accent: #1DD1A1;
    --dark: #E0E0E0;
    --light: #1E1E2E;
    --cream: #2A2A3E;
    --success: #00D2D3;
    --text: #E0E0E0;
    --background: #1E1E2E;
    --card-bg: #2A2A3E;
    --border: #4A4A6A;
}

[data-theme="dark"][data-palette="pet"] {
    --primary: #5DADE2;
    --secondary: #F9CA24;
    --accent: #BB8FCE;
    --dark: #ECF0F1;
    --light: #181818;
    --cream: #282828;
    --success: #16A085;
    --text: #ECF0F1;
    --background: #181818;
    --card-bg: #282828;
    --border: #4A4A4A;
}

/* ============================================
   BASE STYLES
   ============================================ */

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

body {
    font-family: 'Lora', serif;
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ============================================
   THEME SWITCHER COMPATTO
   ============================================ */

.theme-switcher-compact {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Bottone principale */
.main-toggle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--primary);
    font-size: 26px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.main-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.main-toggle.active {
    background: var(--secondary);
    transform: rotate(90deg);
}

/* Colonna delle opzioni */
.theme-options-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(-20px);
}

.theme-options-column.active {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

/* Divider tra sezioni */
.option-divider {
    font-size: 0.7rem;
    color: var(--text);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0.3rem 0;
    margin-top: 0.2rem;
}

/* Bottoni delle opzioni */
.option-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--card-bg);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
}

/* Animazione di entrata sequenziale */
.theme-options-column.active .option-btn {
    opacity: 1;
    transform: scale(1);
}

.theme-options-column.active .option-btn:nth-child(2) {
    transition-delay: 0.05s;
}

.theme-options-column.active .option-btn:nth-child(3) {
    transition-delay: 0.1s;
}

.theme-options-column.active .option-btn:nth-child(4) {
    transition-delay: 0.15s;
}

.theme-options-column.active .option-btn:nth-child(5) {
    transition-delay: 0.2s;
}

.theme-options-column.active .option-btn:nth-child(6) {
    transition-delay: 0.25s;
}

.theme-options-column.active .option-btn:nth-child(7) {
    transition-delay: 0.3s;
}

/* Hover sui bottoni opzione */
.option-btn:hover {
    transform: scale(1.15);
    border-color: var(--primary);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Bottone palette attivo */
.option-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.4);
}

.option-btn.active:hover {
    transform: scale(1.15);
}

/*  ============================================
     LANGUAGE SWITCHER
    ============================================ */

.lang-switcher {
    position: fixed;
    top: 2rem;
    right: 6.0rem;
    left: unset;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Bottone principale – mostra la lingua corrente */
.lang-main-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--border, #e8d5b7);
    background: var(--primary, #f4a261);
    font-size: 26px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    line-height: 1;
}

.lang-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.lang-main-btn.active {
    background: var(--secondary, #e76f51);
    transform: rotate(10deg) scale(1.05);
}

/* Colonna dei flag */
.lang-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(-20px);
}

.lang-options.active {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

/* Etichetta sezione */
.lang-divider {
    font-size: 0.65rem;
    color: var(--text, #3a2e24);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 0.2rem 0;
    font-family: Georgia, serif;
}

/* Singolo bottone lingua */
.lang-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border, #e8d5b7);
    background: var(--card-bg, #fff8f0);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    position: relative;
    line-height: 1;
}

/* Tooltip con nome lingua */
.lang-btn::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary, #f4a261);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: Georgia, serif;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover::after {
    opacity: 1;
}

/* Entrata sequenziale */
.lang-options.active .lang-btn {
    opacity: 1;
    transform: scale(1);
}

.lang-options.active .lang-btn:nth-child(2) {
    transition-delay: 0.05s;
}

.lang-options.active .lang-btn:nth-child(3) {
    transition-delay: 0.12s;
}

.lang-options.active .lang-btn:nth-child(4) {
    transition-delay: 0.19s;
}

.lang-btn:hover {
    transform: scale(1.15);
    border-color: var(--primary, #f4a261);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Lingua attiva evidenziata */
.lang-btn.active {
    border-color: var(--primary, #f4a261);
    background: var(--primary, #f4a261);
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.45);
}

.lang-btn.active:hover {
    transform: scale(1.15);
}

/* ============================================
   RESPONSIVE - THEME SWITCHER COMPATTO
   ============================================ */

@media (max-width: 768px) {
    .theme-switcher-compact {
        top: 1.5rem;
        right: 1.5rem;
    }

    .main-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .option-btn {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .option-divider {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .theme-switcher-compact {
        top: 1.2rem;
        right: 1.2rem;
        gap: 0.4rem;
    }

    .main-toggle {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .option-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .option-divider {
        font-size: 0.6rem;
        padding: 0.2rem 0;
    }
}

@media (max-width: 768px) {
    .lang-switcher {
        top: 1.5rem;
        left: unset;
        right: 5.5rem;
    }

    .lang-main-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .lang-btn {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .lang-switcher {
        top: 1.2rem;
        left: unset;
        right: 4.5rem;
    }

    .lang-main-btn {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .lang-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
}

/* ============================================
   HAMBURGER MENU
   ============================================ */

.menu-toggle {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 20px rgba(244, 162, 97, 0.3);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(244, 162, 97, 0.5);
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   SIDE NAVIGATION
   ============================================ */

.side-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--dark);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.side-nav.active {
    left: 0;
}

.side-nav ul {
    list-style: none;
}

.side-nav li {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.side-nav.active li {
    opacity: 1;
    transform: translateX(0);
}

.side-nav.active li:nth-child(1) {
    transition-delay: 0.1s;
}

.side-nav.active li:nth-child(2) {
    transition-delay: 0.2s;
}

.side-nav.active li:nth-child(3) {
    transition-delay: 0.3s;
}

.side-nav.active li:nth-child(4) {
    transition-delay: 0.4s;
}

.side-nav.active li:nth-child(5) {
    transition-delay: 0.5s;
}

.side-nav a {
    color: var(--light);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: block;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.side-nav a:hover {
    color: var(--primary);
}

.side-nav a::before {
    content: '🐾';
    position: absolute;
    left: -30px;
    opacity: 0;
    transition: all 0.3s ease;
}

.side-nav a:hover::before {
    opacity: 1;
    left: -25px;
}

/* ============================================
   HEADER/BANNER
   ============================================ */

header {
    height: 100vh;
    background: linear-gradient(135deg,
            var(--accent) 0%,
            var(--success) 35%,
            var(--primary) 70%,
            var(--secondary) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.4s ease;
}

/* Header ridotto per pagina prenotazione */
.header-small {
    height: 50vh;
    min-height: 400px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.banner-content {
    text-align: center;
    color: white;
    z-index: 10;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-content h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.banner-content p {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background: var(--light);
}

/* ============================================
   DECORATIVE PAW PRINTS
   ============================================ */
.paw {
    position: absolute;
    font-size: 3rem;
    opacity: 0.2;
    animation: pawFloat 15s ease-in-out infinite;
}

/* Mobile-first: distribuite su tutta l'altezza */
.paw:nth-child(1) {
    top: 8%;
    left: 10%;
    animation-delay: 0s;
}

.paw:nth-child(2) {
    top: 22%;
    right: 8%;
    animation-delay: 2s;
}

.paw:nth-child(3) {
    top: 38%;
    left: 20%;
    animation-delay: 5s;
}

.paw:nth-child(4) {
    top: 52%;
    right: 15%;
    animation-delay: 1s;
}

.paw:nth-child(5) {
    top: 66%;
    left: 5%;
    animation-delay: 3.5s;
}

.paw:nth-child(6) {
    top: 80%;
    right: 5%;
    animation-delay: 6s;
}

.paw:nth-child(7) {
    top: 92%;
    left: 35%;
    animation-delay: 4s;
}

@keyframes pawFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* ============================================
   CONTENT SECTION
   ============================================ */

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.content h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.content h3 {
    font-family: 'Caveat', cursive;
    text-align: center;
    margin-top: 1.0rem;
    font-size: 3.0rem;
    color: var(--secondary);

    transition: color 0.3s ease;
}

.content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

/* ============================================
   NOTIFICATION SYSTEM
   ============================================ */

.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    font-weight: 600;
    font-size: 1rem;
}

.notification.show {
    bottom: 30px;
}

/* ============================================
   BODY PAGE STYLES
   ============================================ */
.body {
    background: linear-gradient(135deg,
            var(--accent) 0%,
            var(--success) 35%,
            var(--primary) 70%,
            var(--secondary) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.4s ease;
}


/* ============================================
   BOOKING PAGE STYLES
   ============================================ */

/* Calendar Section */
.calendar-section {
    /* padding: 4rem 0; */
    background: var(--background);
}

.section-description {
    text-align: center;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ============================================
   CALENDAR WRAPPER
   ============================================ */
.calendar-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    background: var(--calendar-bg);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    height: 800px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--cream);
}

.calendar-wrapper::-webkit-scrollbar {
    width: 12px;
}

.calendar-wrapper::-webkit-scrollbar-track {
    background: var(--cream);
    border-radius: 0 15px 15px 0;
}

.calendar-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 2px solid var(--cream);
}

.calendar-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

#google-calendar {
    width: 100%;
    height: 1500px;
    min-height: 1500px;
    border: none;
    display: none;
}

#google-calendar.loaded {
    display: block;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 500px;
    color: var(--text);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .calendar-wrapper {
        height: 82vh;
        max-height: 82vh;
        border-radius: 10px;
        margin: 0 -1rem;
    }
}

@media (max-width: 480px) {
    .calendar-wrapper {
        height: 80vh;
        max-height: 80vh;
        border-radius: 8px;
        margin: 0 -0.75rem;
    }

    .calendar-wrapper::-webkit-scrollbar {
        width: 4px;
    }

    #google-calendar {
        height: 1800px;
        min-height: 1800px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] .calendar-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar-wrapper::-webkit-scrollbar-thumb {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar-wrapper {
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .calendar-wrapper::before {
    background: linear-gradient(to bottom, var(--calendar-bg), transparent);
}

[data-theme="dark"] .calendar-wrapper::after {
    background: linear-gradient(to top, var(--calendar-bg), transparent);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 600px;
    color: var(--text);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Login Overlay */
.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

[data-theme="dark"] .login-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.login-overlay.hidden {
    display: none !important;
    pointer-events: none;
    opacity: 0;
}

.login-card {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.login-card .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-card h3 {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-card p {
    color: var(--text);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.small-text {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* Map Section */
.map-section {
    /* padding: 4rem 0; */
    background: var(--background);
}

.map-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.map-wrapper iframe {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.map-wrapper iframe:hover {
    transform: scale(1.01);
}

.map-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.info-card .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card p {
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: var(--secondary);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-family: 'Caveat', cursive;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lora', serif;
    background: var(--background);
    color: var(--text);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}

.full-width {
    width: 100%;
    margin-top: 1rem;
}

.switch-auth {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.switch-auth a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.switch-auth a:hover {
    color: var(--secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .menu-toggle {
        top: 1.5rem;
        left: 1.5rem;
    }

    .palette-switcher {
        top: 1.5rem;
        right: 1.5rem;
        flex-direction: column;
    }

    .theme-switcher {
        top: calc(1.5rem + 240px);
        right: 1.5rem;
    }

    .side-nav {
        width: 250px;
    }

    .content {
        padding: 3rem 1.5rem;
    }

    .header-small {
        height: 40vh;
        min-height: 300px;
    }

    .calendar-wrapper {
        padding: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .map-info {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {

    .palette-switcher button,
    .theme-switcher button,
    .menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .banner-content h1 {
        font-size: 2.5rem;
    }

    .banner-content p {
        font-size: 1rem;
    }
}

/* ============================================
   GALLERY PAGE STYLES
   ============================================ */

.gallery-page {
    min-height: 100vh;
    background: var(--background);
}

/* Photo Slider Section */
.photo-slider-section {
    padding: 4rem 0;
    background: var(--background);
}

.photo-slider-section .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Slider Container */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    aspect-ratio: 4 / 3;
}

/* Slider Track (contiene le foto) */
.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    /* La trasformazione viene impostata via JavaScript */
}

/* Singola foto nello slider */
.slider-photo {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: #000
        /* var(--light) */
    ;
    transition: transform 0.3s ease;
    overflow: hidden;
}

/* .slider-photo:hover {
    transform: scale(1.02);
} */

.slider-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* cover; metto contain per mostra le immagini per intero*/
    object-position: center;
    display: block;
    transition: filter 0.3s ease;
}

.slider-photo:hover img {
    filter: brightness(1.08);
}

/* Navigation Buttons */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(244, 162, 97, 0.85);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.slider-nav-btn:hover {
    background: rgba(244, 162, 97, 1);
    transform: translateY(-50%) scale(1.15);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

[data-theme="dark"] .slider-nav-btn {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .slider-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Dots Indicators */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Photo Counter */
.photo-counter {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 600;
}

/* Lightbox (foto ingrandita) */
.photo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.photo-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    max-width: 90%;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    z-index: 3001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Responsive Design per Gallery */
@media (max-width: 768px) {
    .slider-container {
        aspect-ratio: 4 / 3;
        border-radius: 15px;
    }

    .slider-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slider-prev {
        left: 10px;
    }

    .slider-next {
        right: 10px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }

    #lightboxImage {
        max-height: 70vh;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        top: 15px;
        right: 15px;
    }

    .photo-counter {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .slider-container {
        aspect-ratio: 1 / 1;
        border-radius: 10px;
    }

    .slider-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .slider-dots {
        bottom: 10px;
        gap: 5px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
    }
}