/* === CSS PULITO VENALINFA === */

/* 1. VARIABILI */
:root {
    --primary-color: #1a5f7a;
    --secondary-color: #2c8c99;
    --accent-color: #57cc99;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #666;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* 2. RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 3. MENU (manteniamo questo funzionante) */
.navbar-nav .nav-link {
    position: relative;
    padding-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}
@media (max-width: 768px) {
    .carousel-item img {
        height: 300px;
    }
}
    height: 500px;
    object-fit: cover;
}

@media (max-width: 768px) {
        height: 300px;
    }
}

/* 1. Rimuovi TUTTI i pseudo-elementi dopo le icone social */
.social-icons a::after,
.social-icons i::after,
.footer .social-icons a::after,
.footer .social-icons i::after,
.footer .me-3::after {
    display: none !important;
    content: "" !important;
    visibility: hidden !important;
}
/* 5. ALTRI STILI (copia dal vecchio ma senza slider) */
.header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}

.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

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

.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

/* 6. COOKIE BANNER (manteniamo) */
#cookie-banner.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 15px;
    z-index: 9999;
    display: none;
}

/* ===== FIX MENU DROPDOWN ===== */

/* 1. Rimuovi COMPLETAMENTE la freccetta di Bootstrap */
.navbar-nav .dropdown-toggle::after {
    display: none !important;
    border: none !important;
    content: "" !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Alternative per essere sicuri */
.navbar .dropdown-toggle:after,
.navbar-nav .nav-link.dropdown-toggle:after {
    display: none !important;
}

/* 2. MA mantieni la nostra sottolineatura al hover */
.navbar-nav .nav-link.dropdown-toggle {
    position: relative;
    padding-bottom: 8px !important;
}

.navbar-nav .nav-link.dropdown-toggle::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 3px !important;
    background-color: var(--primary-color) !important;
    transition: width 0.4s ease !important;
    border-radius: 2px !important;
    display: block !important;
}

/* 3. Sottolineatura al hover per dropdown */
.navbar-nav .nav-link.dropdown-toggle:not(.active):hover::after {
    width: 100% !important;
}

/* 4. Pagina attiva nel dropdown: testo blu grassetto, NO sottolineatura */
.navbar-nav .nav-link.dropdown-toggle.active {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

.navbar-nav .nav-link.dropdown-toggle.active::after {
    width: 0 !important;
}

/* ===== RIPRISTINO FOOTER E SOCIAL ===== */

/* 1. Icone social FOOTER - bianche */
.footer a.text-white i,
.footer .social-icons i,
.footer i.fab,
.footer i.fas {
    color: white !important;
}

.footer a.text-white:hover i {
    color: #ddd !important;
}

/* 2. Rimuovi trattino blu dopo le icone social */
.footer .social-icons::after,
.footer .list-inline::after {
    display: none !important;
    content: "" !important;
}

/* 3. Separatore tra icone social - se c'è */
.footer .social-icons li::after,
.footer .list-inline-item:not(:last-child)::after {
    display: none !important;
}

/* 4. Link footer - colore originale */
.footer a {
    color: #ddd !important;
}

.footer a:hover {
    color: white !important;
}

/* 5. Testo footer - bianco */
.footer,
.footer p,
.footer span,
.footer li {
    color: white !important;
}

/* ===== RIPRISTINO WHATSAPP FLOATING BUTTON ===== */

/* 1. Bottone WhatsApp fisso */
.whatsapp-float {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background-color: #25D366 !important;
    color: white !important;
    border-radius: 50% !important;
    text-align: center !important;
    font-size: 30px !important;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3) !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.whatsapp-float:hover {
    background-color: #128C7E !important;
    transform: scale(1.1) !important;
    box-shadow: 3px 3px 15px rgba(0,0,0,0.4) !important;
}

/* 2. Icona WhatsApp visibile */
.whatsapp-float i {
    color: white !important;
    font-size: 30px !important;
    display: block !important;
}

/* 3. Se hai un'immagine invece dell'icona font */
.whatsapp-float img {
    width: 30px !important;
    height: 30px !important;
    filter: brightness(0) invert(1) !important;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .whatsapp-float i {
        font-size: 25px !important;
    }
}

/* ===== RISOLUZIONE SPAZI TRA ICONE SOCIAL ===== */
.social-icons {
    font-size: 0 !important;  /* Nasconde gli spazi di testo tra le icone */
}

.social-icons a {
    display: inline-block !important;
    font-size: inherit !important;
}

.social-icons i {
    font-size: 2rem !important; /* fa-2x = 2rem */
    vertical-align: middle !important;
}

/* ===== FIX SLIDER PROBLEMI ===== */

/* 1. Fissa altezza slider e sistema layout */
.hero-slider {
    position: relative;
    overflow: hidden;
}

    height: 500px; /* Altezza fissa */
    position: relative;
}

    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* 2. Sistema caption per centrare verticalmente e orizzontalmente */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6); /* Sfondo semi-trasparente */
    padding: 2rem;
    border-radius: 10px;
}

/* 3. Titolo sopra, sottotitolo sotto ma entrambi centrati */
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

    font-size: 1.5rem;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-slider + section {
    position: relative;
    z-index: 1;
    background: white; /* Assicura che copra eventuali residui */
}

@media (max-width: 768px) {
        height: 300px;
    }
    
        min-height: 300px;
    }
    
        padding: 1rem;
    }
    
        font-size: 1.8rem;
    }
    
        font-size: 1.2rem;
    }
}

/* 6. Assicura che la sezione mission sia sempre visibile */
#mission {
    position: relative;
    z-index: 10;
    background: white;
    padding-bottom: 3rem;
}

/* ===== FIX SLIDER - VERSIONE MIGLIORATA ===== */

/* 1. Fissa altezza slider e sistema layout */
.hero-slider {
    position: relative;
    overflow: hidden;
}

    height: 500px; /* Altezza fissa */
    position: relative;
}

    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* 2. Caption centrata ma 2cm più in alto */
    position: absolute;
    top: 45%; /* Modificato da 50% a 45% per alzare di ~2cm */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    text-align: center;
    padding: 2.5rem 3rem;
    border-radius: 10px;
    /* Sfondo iniziale trasparente */
    background-color: transparent;
    transition: all 0.5s ease;
    border: 2px solid transparent;
}

/* 3. Stile delle scritte (bianche, senza ombra scura) */
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
    transition: all 0.5s ease;
}

/* 4. HOVER: sfondo blu trasparente */
    background-color: rgba(26, 95, 122, 0.85); /* Blu primario con 85% trasparenza */
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Leggero ingrandimento delle scritte al hover */
    transform: scale(1.05);
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.7);
}

    transform: scale(1.03);
    color: #f8f9fa; /* Leggermente più chiaro */
}

.hero-slider + section {
    position: relative;
    z-index: 1;
    background: white;
}

@media (max-width: 768px) {
        height: 300px;
    }
    
        min-height: 300px;
    }
    
        padding: 1.5rem;
    }
    
        font-size: 1.8rem;
    }
    
        font-size: 1.2rem;
    }
    
        background-color: rgba(26, 95, 122, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* 7. Assicura che la sezione mission sia sempre visibile */
#mission {
    position: relative;
    z-index: 10;
    background: white;
    padding-bottom: 3rem;
}

/* 8. Transizione più fluida tra slide */
    transition: opacity 1.5s ease-in-out;
}

/* ===== NEWSLETTER PAGE STYLES ===== */
.newsletter-page .card {
    max-width: 800px;
    margin: 0 auto;
}

.newsletter-page .form-control {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.newsletter-page .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.newsletter-page .btn-primary {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    transition: all 0.3s;
}

.newsletter-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.newsletter-page .accordion-button {
    font-weight: 500;
}

.newsletter-page .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-color: #dee2e6;
}

#newsletter-form .alert-info {
    max-height: 200px;
    overflow-y: auto;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .newsletter-page .card-body {
        padding: 1.5rem;
    }
    
    .newsletter-page .row {
        margin-bottom: 1.5rem;
    }
}

.newsletter-page {
    min-height: calc(100vh - 400px); /* Adatta questo valore */
}

/* Limita altezza accordion */
#faqAccordion {
    max-height: 400px;
    overflow-y: auto;
}

/* Assicura che i collapse siano chiusi di default */
.accordion-collapse.collapse:not(.show) {
    display: none;
}

/* Migliora contrasto cookie banner per accessibilità */
.cookie-banner {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}
.cookie-banner a {
    color: #0d6efd !important;
    font-weight: bold !important;
}

@media (max-width: 768px) {
    }

@media (max-width: 768px) {
    }
}

@media (max-width: 768px) {
    main {
    }
}

@media (max-width: 768px) {
    }
}

@media (max-width: 768px) {
    .header + .hero-slider,
    .header + main .hero-slider {
    }
}

@media (max-width: 768px) {
        display: block !important;
        height: 100px;
    }
}

@media (max-width: 768px) {
    body {
    }
}

/* === ACCESSIBILITA === */
/* Migliora contrasto cookie banner */
.cookie-banner {
    background-color: #f8f9fa;
    color: #212529;
}
.cookie-banner a {
    color: #0d6efd;
    font-weight: bold;
}

/* Assicura visibilità carousel su mobile */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
}

/* Spacer per header fisso su mobile */
@media (max-width: 768px) {
    .header-spacer-mobile {
        height: 100px;
        display: block;
    }
}

/* Disabilita header fisso su mobile */
@media (max-width: 768px) {
    .header {
        position: static !important;
    }
    .header-spacer-mobile {
        display: none;
    }
}

/* SOLUZIONE NUCLEARE: carousel sopra tutto su mobile */
@media (max-width: 768px) {
    .hero-slider,
    .carousel,
    .carousel-inner,
    .carousel-item {
        position: relative !important;
        z-index: 99999 !important;
    }
    .header,
    .navbar {
        z-index: 1 !important;
    }
}

/* DISABILITA HEADER STICKY SU MOBILE */
@media (max-width: 768px) {
    .header {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
    body {
        padding-top: 0 !important;
    }
    .hero-slider {
        margin-top: 0 !important;
    }
}

/* OVERRIDE NUCLEARE - vince su tutto */
@media (max-width: 768px) {
    body .header {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
    body {
        padding-top: 0 !important;
    }
    body .hero-slider {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* FIX PER VERTICALE MOBILE */
@media (max-width: 768px) and (orientation: portrait) {
    .header {
        position: static !important;
    }
    .carousel,
    .carousel-inner,
    .carousel-item,
    .carousel-item img {
        max-height: 70vh !important;
        min-height: 300px !important;
        height: auto !important;
    }
    .hero-slider {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* FIX CONTRASTO COOKIE BANNER */
.cookie-banner {
    background-color: #f8f9fa !important;
    border-top: 3px solid #0d6efd !important;
}
.cookie-banner, 
.cookie-banner p {
    color: #212529 !important;
    font-weight: 500 !important;
}
.cookie-banner a {
    color: #0d6efd !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}
.cookie-banner .btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    font-weight: bold !important;
}
.cookie-banner .btn-link {
    color: #dc3545 !important;
    font-weight: bold !important;
}

/* FIX CONTRASTO SEZIONE MISSION */
.mission {
    background-color: #f8f9fa !important;
}
.mission, .mission p, .mission h2 {
    color: #212529 !important;
}

/* FIX CONTRASTO LINK TOUR */
a[href*="tour-completo"] {
    color: #0d6efd !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}

/* FIX CONTRASTO FORZATO */
.cookie-banner {
    background-color: #ffffff !important;
    border: 2px solid #0d6efd !important;
}
.cookie-banner, .cookie-banner * {
    color: #000000 !important;
}
.cookie-banner a {
    color: #0d6efd !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}
.cookie-banner .btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: #ffffff !important;
}
.cookie-banner .btn-link {
    color: #dc3545 !important;
    font-weight: bold !important;
}
.mission {
    background-color: #ffffff !important;
    color: #000000 !important;
}
a[href*="tour-completo"] {
    color: #0d6efd !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}
/* Scritte carousel in alto e al centro */
.carousel-caption {
    top: 10%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
    width: 100%;
}

/* Overlay come sfondo del carousel-item */
#heroCarousel .carousel-item {
    position: relative;
}

#heroCarousel .carousel-item > img {
    position: relative;
    z-index: 1;
}

#heroCarousel .carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(26, 95, 122, 0.5) 0%,
        rgba(26, 95, 122, 0.3) 100%
    );
    z-index: 2;
    mix-blend-mode: multiply;
}

#heroCarousel .carousel-caption {
    z-index: 3;
}
/* Effetto hover sull'overlay - Aggiungi sotto il CSS esistente */
#heroCarousel .carousel-item:hover::before {
    background: linear-gradient(
        to bottom,
        rgba(26, 95, 122, 0.7) 0%,    /* Più scuro al hover */
        rgba(26, 95, 122, 0.5) 100%
    );
}

/* Effetto hover anche sulle scritte (opzionale) */
#heroCarousel .carousel-item:hover .carousel-caption h2 {
    transform: scale(1.05);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#heroCarousel .carousel-item:hover .carousel-caption .lead {
    transform: scale(1.03);
    color: #f8f9fa;
}

/* Transizione fluida */
#heroCarousel .carousel-item::before,
#heroCarousel .carousel-caption h2,
#heroCarousel .carousel-caption .lead {
    transition: all 0.5s ease;
}
/* ===== BREADCRUMB COMPATTO ===== */
.breadcrumb-nav {
    margin: 3px 0 !important;
    padding: 0 !important;
    min-height: 28px !important;
}

.breadcrumb-nav .container {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.breadcrumb-nav .breadcrumb {
    margin-bottom: 0 !important;
    padding: 2px 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.1 !important;
    background-color: transparent !important;
    border: none !important;
}
    margin-bottom: 0 !important;
    padding: 2px 10px !important;
    font-size: 0.82rem !important;
    line-height: 1.1 !important;
    background-color: #f8f9fa !important;
    border-radius: 4px !important;
    border: 1px solid #e9ecef !important;
}

.breadcrumb-item {
    padding: 0 4px !important;
}

.breadcrumb-item a {
    padding: 0 2px !important;
    color: #0d6efd !important;
    text-decoration: none !important;
}

.breadcrumb-item.active {
    color: #6c757d !important;
    font-weight: 500 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    padding: 0 6px !important;
    color: #adb5bd !important;
    content: "›" !important;
    font-size: 1rem !important;
}

/* ===== BREADCRUMB ULTRA COMPATTO ===== */
#compact-breadcrumb,
#compact-breadcrumb * {
    all: unset !important;
    box-sizing: border-box !important;
}

#compact-breadcrumb {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 16px !important;
    line-height: 1 !important;
    font-size: 11px !important;
}

#compact-breadcrumb ol {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: center !important;
    height: 16px !important;
}

#compact-breadcrumb li {
    margin: 0 2px !important;
    padding: 0 !important;
}

#compact-breadcrumb a {
    color: #0d6efd !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* SOLO scroll dropdown Servizi - NIENTE ALTRO */
#attivitaDropdown + .dropdown-menu {
    max-height: 350px;
    overflow-y: auto;
}

/* Scrollbar bella */
#attivitaDropdown + .dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

#attivitaDropdown + .dropdown-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#attivitaDropdown + .dropdown-menu::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

#attivitaDropdown + .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* ===== FIX SOTTOLINEATURA MENU - ULTIMA MODIFICA ===== */

/* 1. Sottolineatura al hover per TUTTI i link del menu */
.navbar-nav .nav-link:not(.dropdown-toggle.active):hover::after {
    width: 100% !important;
}

/* 2. Link attivi: sottolineatura fissa (per dropdown attivo NO) */
.navbar-nav .nav-link.active:not(.dropdown-toggle)::after {
    width: 100% !important;
    background-color: var(--primary-color) !important;
}

/* 3. Dropdown attivo: testo blu ma NO sottolineatura */
.navbar-nav .nav-link.dropdown-toggle.active::after {
    width: 0 !important;
}

/* 4. Dropdown hover: sottolineatura normale */
.navbar-nav .nav-link.dropdown-toggle:hover::after {
    width: 100% !important;
}
