:root {
    --primary-color: #16166B; /* Pantone Blue 072 C */
    --secondary-color: #E9C46A; /* Warm Gold/Sand */
    --accent-color: #264653; /* Darker Blue/Green */
    --text-color: #333;
    --bg-light: #F0F4F8; /* Light Blueish Grey */
    --white: #ffffff;
    --font-main: 'Poppins', sans-serif;
    --font-logo: 'Bookman Old Style', 'Times New Roman', serif;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fdfdfe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%2316166B' fill-opacity='0.05' transform='rotate(20 60 60)'%3E%3Cellipse cx='60' cy='74' rx='16' ry='12'/%3E%3Cellipse cx='41' cy='53' rx='7.5' ry='9.5'/%3E%3Cellipse cx='56' cy='42' rx='8' ry='10'/%3E%3Cellipse cx='73' cy='44' rx='7.5' ry='9.5'/%3E%3Cellipse cx='84' cy='58' rx='6.5' ry='8.5'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 120px 120px;
    padding-top: 120px; /* Space for fixed header */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Floating Pill White */
.header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%; /* Slightly narrower to look more like a pill */
    max-width: 1000px;
    background: #ffffff; /* Solid White */
    border-radius: 50px; /* Fully rounded / Pill shape */
    z-index: 1000;
    padding: 0.2rem 1.75rem; /* Reduced padding */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); /* Soft shadow */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.header.hidden {
    transform: translate(-50%, -300%); /* Move up completely out of view */
    opacity: 0; /* Fade out for smoothness */
    pointer-events: none; /* Prevent clicks when hidden */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
}

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

.logo-img {
    height: 26px; /* Further reduced size */
    width: auto;
    transition: height 0.3s ease;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-list a:hover {
    color: var(--secondary-color);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
    background-color: #2a2a8a;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}


/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1548199973-03cce0bbc87b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    /* Estende l'immagine fino in cima, dietro l'header fisso che vi galleggia sopra,
       annullando lo spazio riservato dal body per il resto delle pagine. */
    margin-top: -120px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
}

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

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #2a2a8a;
    border-color: #2a2a8a;
}

.btn-danger {
    background-color: #d9362e;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #b7281f;
}

.btn-outline-danger {
    background-color: transparent;
    color: #d9362e;
    border: 2px solid #d9362e;
}

.btn-outline-danger:hover {
    background-color: #d9362e;
    color: var(--white);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Services Banner Layout */
.services-grid {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    height: 500px; /* Fixed height for desktop banners */
}

.service-banner {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-banner:hover {
    flex: 1.5; /* Expand on hover */
}

.service-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-banner:hover .service-banner-img {
    transform: scale(1.1);
}

.service-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    z-index: 2;
}

.service-banner-content i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.service-banner-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-banner-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Service Detail Modal Specifics */
.service-detail-content {
    text-align: left;
}

.service-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.service-detail-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-right: 1.5rem;
}

.service-detail-info h2 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.service-detail-info h4 {
    color: #666;
    font-weight: 500;
}

.service-detail-body ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail-body li {
    margin-bottom: 0.5rem;
}

.service-meta {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.service-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}


.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

/* Features */
.features {
    background-color: var(--white);
}

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

.feature-item {
    text-align: center;
}

.feature-item img {
    border-radius: 10px;
    margin-bottom: 1rem;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* CTA */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
}

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

/* Footer */
/* Footer */
.footer {
    background-color: #222; /* Darker for elegance */
    color: #ccc; /* Softer white */
    padding: 2rem 0 1rem; /* Reduced padding */
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-col h3 {
    margin-bottom: 0.8rem;
    color: var(--white); /* White titles */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.footer-col i {
    margin-right: 8px;
    width: 15px;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #777;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 2rem;
    border: 1px solid #888;
    width: 90%; 
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {top: -100px; opacity: 0;}
    to {top: 0; opacity: 1;}
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

/* Feedback del form di prenotazione */
.form-alert {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.form-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.form-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
    border-color: #dc3545;
}

/* Toast di notifica (login/logout) */
.flash-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    font-weight: 600;
    animation: flashIn .35s ease;
}

.flash-toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: .4s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* Services Page Layout */
.service-full-card {
    display: flex;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
    align-items: center;
}

.service-full-card:nth-child(even) {
    flex-direction: row-reverse;
}

.service-img-col {
    flex: 1;
    height: 400px;
}

.service-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-info-col {
    flex: 1;
    padding: 3rem;
}

.service-info-col h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.service-info-col h4 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-info-col ul {
    list-style: none;
    margin-bottom: 2rem;
}

.service-info-col li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-info-col li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.service-price-tag {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
}

/* Shop Gallery */
.shop-gallery {
    column-count: 3;
    column-gap: 1.5rem;
}

.shop-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.shop-item:hover {
    transform: translateY(-5px);
}

.shop-item img {
    width: 100%;
    display: block;
}

.shop-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.shop-item:hover .shop-overlay {
    opacity: 1;
}



/* Contact Page */
.contact-hero {
    height: 50vh;
    background: linear-gradient(rgba(22, 22, 107, 0.8), rgba(22, 22, 107, 0.8)), url('https://images.unsplash.com/photo-1516734212186-a967f81ad0d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    /* Estende il banner fino in cima, dietro l'header fisso che vi galleggia sopra. */
    margin-top: -120px;
    padding-top: 140px; /* Tiene il testo sotto l'header fisso */
}

.contact-info-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-top: -50px;
    position: relative;
    z-index: 10;
    text-align: center;
}

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

.contact-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Booking Form Grid */
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.booking-form-grid .form-group {
    margin-bottom: 0; /* Reset margin as gap handles it */
}

.booking-form-grid .full-width {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .booking-form-grid {
        grid-template-columns: 1fr;
    }
    .booking-form-grid .full-width {
        grid-column: span 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Mobile Services: Horizontal Banners */
    .services-grid {
        flex-direction: column;
        height: auto; /* Auto height for stacked */
        gap: 1.5rem;
    }

    .service-banner {
        height: 150px; /* Fixed height for horizontal strip */
        display: flex;
        flex-direction: row;
        align-items: center;
        background: white; /* Fallback */
    }

    .service-banner:hover {
        flex: none; /* Disable expansion on mobile */
        transform: translateY(-5px);
    }

    .service-banner-img {
        width: 40%;
        height: 100%;
        position: relative; /* Reset absolute */
    }

    .service-banner-content {
        position: relative; /* Reset absolute */
        width: 60%;
        height: 100%;
        background: white; /* White background for text part */
        color: var(--text-color);
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-banner-content i {
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    .service-banner-content h3 {
        font-size: 1.2rem;
        color: var(--primary-color);
        margin-bottom: 0.2rem;
    }

    .service-banner-content p {
        font-size: 0.8rem;
        color: #666;
    }

    .service-full-card {
        flex-direction: column !important;
    }
    
    .service-img-col {
        height: 250px;
        width: 100%;
    }
    
    .shop-gallery {
        column-count: 1;
    }
    
    .header {
        padding: 0.4rem 1.25rem;
        width: 92%;
    }

}

/* Tablet & mobile: always show the hamburger menu (phones, iPad, Android tablets) */
@media (max-width: 1024px) {
    .hamburger {
        display: block;
        margin-left: auto;
        color: var(--primary-color); /* Dark hamburger for light glass */
    }

    .nav-list {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        display: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border-radius: 20px;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list a {
        color: var(--text-color);
        font-size: 1.1rem;
    }
}
