:root {
    --color-sand: #F4E3D7;
    --color-light-sand: #FAF5F0;
    --color-terracotta: #C16A46;
    --color-ochre: #D98C40;
    --color-ebony: #2E1A13;
    --color-white: #FFFFFF;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--color-ebony);
    background-color: var(--color-light-sand);
    line-height: 1.6;
}

/* Custom Scrollbar - Always visible on iOS by using standard webkit */
::-webkit-scrollbar {
    height: 6px;
    width: 6px;
    -webkit-appearance: none;
}
::-webkit-scrollbar-track {
    background: var(--color-light-sand);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: var(--color-terracotta);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-ebony);
}

/* Ink Splash Overlay */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-terracotta);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    clip-path: circle(150% at 50% 50%);
    transition: clip-path 1.5s cubic-bezier(0.77, 0, 0.175, 1), background-color 1s ease;
}

.splash-overlay.hidden {
    clip-path: circle(0% at 50% 50%);
    pointer-events: none;
}

.splash-logo {
    animation: pulseLogo 2s infinite;
}

.splash-icon {
    width: 100px;
    height: 100px;
}

@keyframes pulseLogo {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-ebony);
}

.light h2 {
    color: var(--color-sand);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.bg-sand { 
    background-color: var(--color-sand); 
    background-image: url('assets/bg_pattern_1781098947643.png');
    background-size: 400px;
    background-blend-mode: overlay;
    animation: scrollPattern 60s linear infinite;
}
.bg-light-sand { 
    background-color: var(--color-light-sand); 
    background-image: url('assets/bg_pattern_1781098947643.png');
    background-size: 400px;
    background-blend-mode: soft-light;
    animation: scrollPattern 60s linear infinite;
}
.bg-terracotta { background-color: var(--color-terracotta); color: var(--color-sand); }

@keyframes scrollPattern {
    0% { background-position: 0px 0px; }
    100% { background-position: 400px 400px; }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-ebony);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(46, 26, 19, 0.2);
}

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

.btn-outline:hover {
    background-color: var(--color-ebony);
    color: var(--color-white);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(250, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-icon {
    width: 40px;
    height: 40px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-ebony);
    flex: 1;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-ebony);
    font-weight: 600;
    transition: color 0.3s ease;
}

.navbar.scrolled .nav-links a, 
.navbar.scrolled .nav-brand {
    color: var(--color-ebony);
}

.hero .navbar:not(.scrolled) .nav-links a,
.hero .navbar:not(.scrolled) .nav-brand {
    color: var(--color-white);
}

.nav-links a:hover {
    color: var(--color-terracotta);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    font-size: 1.5rem;
    color: var(--color-sand);
    cursor: pointer;
    z-index: 1001;
}

.lang-selector {
    position: absolute;
    right: calc(50% + 140px);
    left: auto;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-sand);
}
.lang-selector a {
    color: var(--color-sand);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.lang-selector a.active, .lang-selector a:hover {
    opacity: 1;
    color: var(--color-terracotta);
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--color-ebony);
    transition: var(--transition-smooth);
}
.hero .navbar:not(.scrolled) .mobile-menu-btn span {
    background-color: var(--color-white);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-light-sand);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 2rem 0;
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-decoration: none;
    color: var(--color-ebony);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(46, 26, 19, 0.4), rgba(46, 26, 19, 0.6)), url('FOTO/ESTERNI/WhatsApp Image 2026-06-08 at 22.31.05 (1).jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('FOTO/ESTERNI/WhatsApp Image 2026-06-08 at 22.31.05 (1).jpeg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: heroZoom 30s ease-in-out infinite alternate;
    opacity: 0.5; /* Blended with the linear-gradient on the parent */
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-content {
    color: var(--color-white);
    max-width: 800px;
    padding: 2rem;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
    color: var(--color-sand);
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Sliders */
.slider-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    /* Shake animation applied via JS class */
}

.slider-container.shake {
    animation: shakeAnim 0.6s ease-in-out;
}

@keyframes shakeAnim {
    0% { transform: translateX(0); }
    30% { transform: translateX(-120px); }
    70% { transform: translateX(30px); }
    100% { transform: translateX(0); }
}

.card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    min-width: 350px;
    flex: 1;
    scroll-snap-align: start;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.card-img-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.preview-img, .activity-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .preview-img, .card:hover .activity-img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 26, 19, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-img-wrapper:hover .card-overlay {
    opacity: 1;
}

.card-overlay span {
    color: var(--color-white);
    font-weight: 600;
    font-size: 1.2rem;
    border: 2px solid var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
}

.card-body {
    padding: 2rem;
    text-align: center;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-box {
    background: rgba(255,255,255,0.1);
    padding: 2.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.service-box h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(244, 227, 215, 0.3);
    padding-bottom: 1rem;
}

.service-box ul {
    list-style: none;
}

.service-box li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.service-box .icon {
    margin-right: 15px;
    font-size: 1.3rem;
}

/* Dove Siamo */
.map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.map-info h2 {
    color: var(--color-terracotta);
}

.poi-list {
    margin-top: 2rem;
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.poi-list ul {
    list-style: none;
    margin-top: 1rem;
}

.poi-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.poi-list li::before {
    content: '•';
    color: var(--color-terracotta);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.map-iframe {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background-color: var(--color-ebony);
    color: var(--color-sand);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(244, 227, 215, 0.2);
    padding-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.phone-link {
    color: var(--color-terracotta);
    font-size: 2rem;
    text-decoration: none;
    font-weight: 600;
}

.email-link {
    font-size: 1.5rem;
    word-break: break-all;
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

/* Gallery Modal */
.gallery-modal {
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

#gallery-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    user-select: none;
}

.close-modal, .close-booking {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.close-modal:hover, .close-booking:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--color-terracotta);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-body);
    background: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Booking Modal */
.booking-modal {
    background-color: rgba(46, 26, 19, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.booking-content {
    background: var(--color-white);
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.modal.active .booking-content {
    transform: translateY(0);
}

.close-booking {
    color: var(--color-ebony);
    top: 15px;
    right: 20px;
}

.booking-title {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--color-terracotta);
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"], input[type="date"], input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #fafafa;
}

input[readonly] {
    background: #eee;
    color: #666;
    cursor: not-allowed;
}

.counters-row {
    margin-bottom: 1.5rem;
}

.vertical-counter {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f0f0f0;
    border-radius: 30px;
    overflow: hidden;
    width: 60px;
}

.counter-controls button {
    background: transparent;
    border: none;
    width: 100%;
    padding: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-terracotta);
    transition: background 0.2s;
}

.counter-controls button:hover {
    background: #e0e0e0;
}

.counter-controls input {
    text-align: center;
    border: none;
    padding: 5px 0;
    width: 100%;
    background: transparent;
    font-weight: bold;
    -moz-appearance: textfield;
}

.counter-controls input::-webkit-outer-spin-button,
.counter-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-whatsapp-submit {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-whatsapp-submit:hover {
    background: #1EBE55;
    transform: translateY(-2px);
}

/* WhatsApp Bubble */
.wa-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    animation: pulseWa 2s infinite;
    transition: transform 0.3s ease;
}

.wa-bubble:hover {
    transform: scale(1.1);
}

@keyframes pulseWa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .map-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .phone-link {
        font-size: 1.5rem;
    }
    
    .email-link {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-brand { left: 100px; transform: none; font-size: 1.1rem; }
    .lang-selector { left: 50px; right: auto; }
    .mobile-menu-btn { display: flex; }
    
    .hero { 
        background-attachment: scroll; 
        background-position: center center;
    }
    .hero h1 { font-size: 3rem; }
    
    /* Peeking Cards */
    .peeking-card, .activity-card {
        min-width: 85%;
    }
}

/* Vivi Modal Specifics */
.vivi-content-box {
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.vivi-modal-header {
    height: 250px;
    width: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.vivi-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vivi-modal-body {
    padding: 2rem;
}

.vivi-text-content h4 {
    color: var(--color-terracotta);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
