/* --------------------------------------------------------------
   RESET DI BASE
-------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}



:root {
    --primary-blue: #4a7ebb;
    --eco-green: #82aa4f;
    --purple-main: #6d3f91;
    --bg-light: #f8f9fa;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    background-color: #fff;
    overflow-x: hidden;

}

/* --------------------------------------------------------------
   TIPOGRAFIA
-------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0;
    color: #255267;
}

p {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 18px;
}

a {
    color: #3c70b5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------
   IMMAGINI
-------------------------------------------------------------- */

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

/* --------------------------------------------------------------
   LISTE
-------------------------------------------------------------- */

ul, ol {
    padding-left: 1.4rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
}

/* --------------------------------------------------------------
   TABELLE
-------------------------------------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th, td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* --------------------------------------------------------------
   FORM
-------------------------------------------------------------- */

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.5rem;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    font-family: inherit;
}

/* --------------------------------------------------------------
   SPACING UTILITY (minimali)
-------------------------------------------------------------- */

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: .5rem !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

/* --------------------------------------------------------------
   CONTENUTO WORDPRESS
-------------------------------------------------------------- */
#preloader {
    position: fixed;
    /* Inset 0 è una scorciatoia moderna per top, bottom, left, right: 0 */
    inset: 0; 
    width: 100%;
    /* Usiamo 100dvh (Dynamic Viewport Height) per ignorare le barre dei browser mobile */
    height: 100dvh; 
    background-color: #ffffff;
    
    /* Flexbox per la centratura totale */
    display: flex;
    justify-content: center; /* Centra in orizzontale */
    align-items: center;     /* Centra in verticale */
    
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    
    /* Reset di sicurezza */
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.logo-wrapper {
    /* Rimuoviamo eventuali float o display strani */
    display: block;
    width: 120px; /* O la dimensione che preferisci */
    height: auto;
    /* Reset margini per evitare spostamenti */
    margin: 0 !important; 
}

.preloader-logo {
    width: 100%;
    height: auto;
    display: block;
    animation: logoPulse 1.8s ease-in-out infinite;
}

/* Definizione dell'animazione "Pulse" (Pulsazione/Respiro) */
@keyframes logoPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05); /* Si ingrandisce leggermente */
        opacity: 1; /* Diventa totalmente opaco */
    }
    100% {
        transform: scale(0.95); /* Torna alla dimensione iniziale */
        opacity: 0.6; /* Torna semi-trasparente */
    }
}

/* Classe CSS per nascondere il preloader (attivata dal JS) */
.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.logo-main {
    max-height: 100px;
}

.logo {
    max-height: 60px;
}

/* Stile per i link dentro l'offcanvas */
.offcanvas-body .nav-link {
    font-weight: 500;
    color: #333 !important;
    font-size: 1.1rem;
}

.entry-content img {
    margin: 1.5rem 0;
}

.wp-block-quote {
    border-left: 4px solid #ccc;
    padding-left: 1rem;
    color: #555;
    margin: 1.5rem 0;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* --------------------------------------------------------------
   HEADER E FOOTER (minimali)
-------------------------------------------------------------- */

.site-header {
    border-bottom: 1px solid #eee;
}

.site-footer {
    background-color: #fcfcfc;
    border-top: 1px solid #222;
}

/* --------------------------------------------------------------
   Gutenberg Color Palette Support
-------------------------------------------------------------- */

.has-primary-color {
    color: #3c70b5 !important;
}

.has-primary-background-color {
    background-color: #0d6efd !important;
}

.has-dark-color {
    color: #212529 !important;
}

.has-dark-background-color {
    background-color: #212529 !important;
}

/* ============================
   SEARCH OVERLAY FULLSCREEN
============================ */

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 0 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    border: none;
    border-radius: 0.5rem;
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-toggle button {
    border: none;
    background: none;
    color: inherit;
}

.post-tags i {
    color: #6c757d;
    font-size: 1rem;
}

.post-tags .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* Banner home*/

.bg-kit-alert {
    background-color: #f38b00; 
}

.text-primary {
    color: #3c70b5 !important;
}

.text-success {
    color: #82aa4f !important;
}

/* Header & Calendars */
.calendar-card {
    transition: transform 0.3s ease;
    border-radius: 15px;
}

.calendar-card:hover {
    transform: translateY(-10px);
}

/* Section Titles */
.section-title {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 2.5rem;
}

/* Ritiro Cards */
.custom-card {
    border-width: 2px !important;
    border-radius: 12px;
}

.border-purple { border-color: var(--purple-main) !important; }
.text-purple { color: var(--purple-main); }

/* Banner verde contatti */
/* Layout Mobile (Base) */
.contact-banner {
    background-color: #77b729;
    margin-left: 0; /* A tutta larghezza su mobile */
    min-height: 150px; /* Permette l'espansione se il testo va a capo */
    padding: 1rem;
}

.ritiro-img {
    max-width: 200px; /* Leggermente più piccola su mobile */
    height: auto;
}

/* Layout Desktop (da 992px in su) */
@media (min-width: 992px) {
    .contact-banner {
        margin-left: 10%; /* Ridotto leggermente per bilanciare il testo */
        height: 127px;
        max-height: 127px;
        padding: 0;
        /* Opzionale: arrotonda l'angolo sinistro come nell'immagine originale */
        border-top-left-radius: 65px;
        border-bottom-left-radius: 65px;
    }

    .banner-img-container {
        margin-left: -56px; /* Ripristina l'effetto sovrapposizione */
        flex-shrink: 0;
    }

    .ritiro-img {
        max-width: none;
        width: 266px;
        height: 132px;
    }

    .banner-content {
        padding-left: 2rem;
    }
}

/* Gestione testo responsive per evitare che l'H1 sia troppo grande */
.banner-content h3 {
    font-size: 1.5rem;
}

.whatsapp-link span {
    font-size: 1.8rem !important; /* Forza la dimensione del numero */
}

@media (min-width: 1200px) {
    .banner-content h3 { font-size: 2rem; }
    .whatsapp-link span { font-size: 2.5rem !important; }
}

/* Arera Section */

.bg-recycle-section {
    background-color: #f2f2f2; /* Grigio chiaro come da immagine */
    position: relative;
    overflow: hidden; /* Taglia l'icona se esce dai bordi */
    padding-left: 0;
    padding-right: 0;
}

.watermark-icon {
    position: absolute;
    bottom: 0px; /* Posizionata in basso */
    left: 0px;   /* Posizionata a sinistra */
    z-index: 0;
}

/* Assicuriamoci che il contenuto sia sopra l'icona */
.bg-recycle-section .container {
    position: relative;
    z-index: 1;
}

.arera-title {
    font-size: 2.8rem;
    letter-spacing: 2px;
    background-color: #3c70b5;
}


.schedule-grid {
    max-width: 400px;
}

/* News Section */
.news-img-placeholder {
    height: 200px;
    background-color: #e9ecef;
    border-radius: 12px 12px 0 0;
}
 
.btn-outline-primary {
border-color: #4cb7a7 !important;
}

/* Sovrascrittura stato Hover */
.btn-outline-primary:hover {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background-color: #4bb7a7 !important; 
}


.btn-outline-primary:active, 
.btn-outline-primary:focus,
.btn-outline-primary:active:focus {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background-color: #4bb7a7 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
}

/* Pagination Dots */
.pagination-dots .dot {
    height: 3px;
    width: 30px;
    background-color: #dee2e6;
    display: inline-block;
    margin: 0 2px;
}

.pagination-dots .dot.active {
    background-color: var(--primary-blue);
}

/* Personalizzazione Indicatori Carosello */
.custom-dots .dot {
    width: 30px !important;
    height: 4px !important;
    background-color: #dee2e6 !important;
    border: none !important;
    opacity: 1 !important;
    margin: 0 4px !important;
    transition: background-color 0.3s ease;
}

.custom-dots .dot.active {
    background-color: var(--primary-blue) !important;
}

/* Rimuove il comportamento di default che nasconde gli indicatori */
.carousel-indicators {
    margin-bottom: 0;
}

/* Assicura che le card abbiano la stessa altezza */
.news-card {
    display: flex;
    flex-direction: column;
}

.store-link {
    transition: transform 0.2s ease;
}

.store-link:hover {
    transform: scale(1.05); /* Effetto leggero ingrandimento al passaggio del mouse */
}

#appDownloadModal .modal-content {
    border-radius: 20px; /* Angoli arrotondati per un look moderno */
}

/* Pulizia focus hamburger */
.navbar-toggler:focus {
    box-shadow: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
}


