/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    color-scheme: light;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1a5276;
    color: white;
    padding: 8px 12px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 6px;
}

/* Background con logo e effetto sfocatura */
.background-logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/img/logo.webp');
    background-size: 50%;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(5px);
    opacity: 0.50;
    z-index: -1;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo span {
    color: #f39c12;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #f39c12;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

.hamburger {
    width: 28px;
    height: 28px;
    display: block;
    pointer-events: none;
}

.line {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .top {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .middle {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bottom {
    transform: translateY(-6px) rotate(-45deg);
}

/* Backdrop blur su scroll */
header.scrolled {
    background: rgba(26, 82, 118, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Bottoni Generici */
.btn {
    display: inline-block;
    background: #e17619;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    transition: background 0.3s, transform 0.3s;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
}

.btn:hover {
    background: #f39c12;
    transform: translateY(-2px);
}

/* --- STILI HOME PAGE --- */
.hero {
    position: relative;
    color: white;
    text-align: center;
    padding: 8rem 2rem;
    /* overflow: hidden; */
    min-height: 100vh; /* */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* */
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px; /* 1000        */
    margin: 0 auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
    pointer-events: none;  /* ← aggiungi questa riga */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.photo-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 20px;
}

.photo-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a5276;
    font-size: 2rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.photo-placeholder {
    background: linear-gradient(135deg, #e8f4f8, #d4e6f1);
    border-radius: 10px;
    /* height: 250; */
    aspect-ratio: 768 / 512;
    width: 100%; /* added */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #1a5276;
    font-weight: bold;
    transition: transform 0.3s;
    overflow: hidden;
    position: relative;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.photo-placeholder .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0);
    color: white;
    font-size: 0.9rem;
    text-align: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.photo-placeholder:hover {
    transform: scale(1.02);
}

.photo-placeholder:hover .overlay {
    background: rgba(0, 0, 0, 0.6);
}

.photo-placeholder:hover .caption {
    background: rgba(0, 0, 0, 0.6);
}

.services {
    background: white;
    padding: 4rem 2rem;
    opacity: 0.8;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1a5276;
    font-size: 2.0rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.service-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: #1a5276;
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: #E17619;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    transition: background 0.3s, transform 0.2s;
    align-self: center;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
}

.cta:hover {
    background: #f39c12;
    transform: translateY(-2px);
}

/* --- STILI PAGINE SERVIZIO --- */
.service-header {
    background: linear-gradient(rgba(26, 82, 118, 0.8), rgba(46, 134, 193, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%231a5276" width="1200" height="400"/><circle fill="%232e86c1" cx="1000" cy="200" r="150"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 5rem 2rem;
}

.service-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.service-header p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.content-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: center;
}

.content-text h2 {
    color: #1a5276;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

.service-image {
    width: 100%;
    height: auto;  
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.checklist-section {
    background: white;
    padding: 4rem 2rem;
    margin: 4rem -20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    opacity: 0.8;
}

.checklist-section h2 {
    text-align: center;
    color: #1a5276;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s;
}

.checklist-item:hover {
    background: #eef2f7;
}

.checklist-item span:first-child {
    color: #27ae60;
    font-size: 1.5rem;
    font-weight: bold;
}

.benefits-section {
    margin: 4rem 0;
    text-align: center;
}

.benefits-section h2 {
    color: #1a5276;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.benefit-card:hover {
    transform: translateY(-10px);
}

.benefit-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-card h3 {
    color: #1a5276;
    margin-bottom: 1rem;
}

/* Recensioni */
.reviews-section {
    padding: 4rem 2rem;
    background: #f8f9fa;
    text-align: center;
}

.reviews-section h2 {
    color: #1a5276;
    margin-bottom: 3rem;
    font-size: 2.2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.review-stars {
    color: #f39c12;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.review-text {
    color: #555;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.review-author {
    color: #1a5276;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Sezione Contatti (Comune) */
.contact {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    padding: 4rem 2rem;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item span {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/*
originale #27ae60
hover #219653
 #24A35A

 rosso #FF3B30
 arancione caldo #FF9500  
 blu #007AFF  

*/

.call-btn {
    display: inline-flex;
    align-items: center;
    background: #FF3B30;
    color: white;
    padding: 1rem 3rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    margin-top: 1rem;
    transition: background 0.3s;
    font-size: 1.2rem;
    text-shadow:
        2px 2px 0 #000,
        2px 2px 0 #000,
        0px 0px 0 #000,
        0px 1px 0 #000;
}

.call-btn:hover {
    background: #FA0D00;
}

.call-btn span {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

/*
#25d366
#128c7e hover

*/

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    background: #25D366;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    margin-top: 1rem;
    transition: background 0.3s;
    font-size: 1.2rem;
    text-shadow:
        2px 2px 0 #000,
        2px 2px 0 #000,
        0px 0px 0 #000,
        0px 1px 0 #000;
}

.whatsapp-btn:hover {
    background: #27ae60;
}

.whatsapp-btn span {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    color: #333;
}

.form-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-title-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.contact-form h3 {
    color: #25D366;
    text-align: center;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 0.6rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #2e86c1;
}

.form-group.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.form-group.checkbox-group input {
    width: auto;
    margin-top: 5px;
    cursor: pointer;
}

.form-group.checkbox-group label {
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2e86c1;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    background: #e17619;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
}

.submit-btn:hover {
    background: #f39c12;
}

/* Nuovi stili per il form WhatsApp */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    display: block;
}

.error-message[aria-hidden="false"] {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fallback-message {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem 1.25rem;
    margin-top: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s;
}

.fallback-message[aria-hidden="false"] {
    display: block;
}

.noscript-alert {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stato di loading del pulsante */
.submit-btn[aria-busy="true"] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mappa statica */
.map-wrapper-static {
    display: inline-block;
}

.map-wrapper-static img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Mappa (Solo Home) */
.map-section {
    padding: 4rem 2rem;
    background: #f8f9fa;
}

.map-container {
    max-width: 1200px;
    margin: 0 auto;
}

.map-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a5276;
    font-size: 2rem;
}

.map-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

#mapFrame {
    width: 100%;
    height: 400px;
    border: none;
}

/* Footer (Comune) */
footer {
    background: #1a1a2e;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #f39c12;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #aaa;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #333;
}

.visit-counter {
    display: inline-block;
    background: #2e86c1;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    margin-bottom: 1rem;
}

.disclaimer {
    background: #2d2d44;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.disclaimer h5 {
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.disclaimer p {
    font-size: 0.8rem;
    line-height: 1.8;
}

/* --- STILI POPUP TOAST --- */
.popup-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 380px;
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    padding: 1.2rem 1.5rem;
    z-index: 9999;
    font-family: 'Roboto', sans-serif;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    overflow: hidden;
}

.popup-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.popup-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.popup-toast.hide {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    opacity: 1;
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
}

.popup-icon {
    font-size: 2.2rem;
}

.popup-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

.popup-cta {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.6rem 1.2rem;
    background: #e17619;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
    text-shadow:
        1px 1px 0 rgba(0,0,0,0.4),
        -1px -1px 0 rgba(0,0,0,0.4),
        1px -1px 0 rgba(0,0,0,0.4),
        -1px 1px 0 rgba(0,0,0,0.4);
}

.popup-cta:hover {
    background: #f39c12;
    transform: translateY(-1px);
}

/* Responsive (Unificato) */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        flex-wrap: nowrap;
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero video responsive */
    .hero {
        padding: 6rem 1rem;
        min-height: 90svh; /* */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    /* Ensure the promotional toast appears above the chat AI badge on small screens */
    .popup-toast {
        z-index: 10001; /* higher than any other fixed element */
    }

    /* Optionally lower the chat AI container/button if needed */
    .chat-ai-container,
    .chat-ai-toggle {
        z-index: 1000;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease, visibility 0s linear 0.35s;
        background: linear-gradient(135deg, #1a5276, #2e86c1);
        padding: 0 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        z-index: 999;
    }

    nav.open {
        max-height: 350px;
        padding: 1rem;
        visibility: visible;
        transition: max-height 0.35s ease, padding 0.35s ease, visibility 0s linear 0s;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        flex-wrap: nowrap;
    }

.hero h1, .service-header h1 {
    font-size: 2rem;
}

.photo-grid, .content-grid, .contact-container {
        grid-template-columns: 1fr;
    }

    .popup-text {
        font-size: 0.95rem;
    }

    .popup-cta {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* --- STILI CHAT AI --- */
.chat-ai-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    font-family: 'Roboto', sans-serif;
}

/* Bottone di attivazione */
.chat-ai-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
    transition: all 0.3s ease;
    transform: scale(1);
}

.chat-ai-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 82, 118, 0.4);
}

.chat-ai-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.3);
}

.chat-icon {
    font-size: 1.2rem;
}

/* Finestra chat */
.chat-ai-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    background: white;
    border-radius: 15px 15px 10px 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 450px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

#bot-disclaimer {
    font-size: xx-small;
}

.chat-ai-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Header chat */
.chat-ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-ai-avatar {
    font-size: 1.5rem;
}

.chat-ai-title h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chat-ai-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chat-ai-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-ai-close:hover {
    opacity: 1;
}

/* Area messaggi */
.chat-ai-messages {
    flex: 1;
    height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 85%;
    min-width: 0;
}

.chat-message.bot-message {
    align-self: flex-start;
}

.chat-message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    gap: 8px;
}

.chat-avatar {
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

.chat-bubble {
    background: #e9ecef;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.chat-message.user-message .chat-bubble {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
}

.chat-time {
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
}

.chat-message.user-message .chat-time {
    color: rgba(255,255,255,0.7);
}

/* Input container */
.chat-ai-input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border-radius: 0 0 15px 15px;
    border-top: 1px solid #eee;
}

.chat-ai-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    resize: none;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-ai-input:focus {
    border-color: #2e86c1;
}

.chat-ai-send {
    background: linear-gradient(135deg, #1a5276, #2e86c1);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    transform: scale(1);
}

.chat-ai-send:hover {
    transform: scale(1.05);
}

.chat-ai-send:active {
    transform: scale(0.95);
}

.chat-ai-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading indicator */
.chat-loading {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
}

.chat-loading .chat-avatar {
    font-size: 1.2rem;
}

.chat-loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    background: #e9ecef;
    padding: 10px 14px;
    border-radius: 15px;
}

.chat-loading-dot {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.chat-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* Responsive */
@media (max-width: 480px) {
    .chat-ai-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .chat-ai-toggle {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .chat-ai-window {
        width: 100%;
        max-width: 100%;
        left: 0;
        bottom: 70px;
    }
    
    .chat-ai-messages {
        height: 250px;
        padding: 10px;
    }
}


/

table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}

th, td {
    padding: 8px;
}

/* arrow down index */
.scroll-hint-wrapper {
    position: absolute;
    bottom: -4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
}

.scroll-hint {
    color: white;
    text-align: center;
    cursor: pointer;
    animation: bounceArrow 2s infinite;
    user-select: none;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.scroll-hint span {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.arrow-down {
    font-size: 2rem;
    line-height: 1;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

@media (max-width: 410px) {
    .scroll-hint span {
        display: none;
    }
}

/* Forza tema light anche in modalità notte/dark mode del browser */
@media (prefers-color-scheme: dark) {
    .background-logo {
        background-image: none !important;
    }
}