/* Variabili CSS personalizzabili dall'amministratore */
:root {
    /* Colori principali */
    --primary-color: #8B7355;    /* Marrone caldo */
    --secondary-color: #D2B48C;  /* Tan chiaro */
    --accent-color: #5C4033;     /* Marrone scuro */
    --menu-color: #E8DCC4;      /* Colore del menu */
    --footer-color: #E8DCC4;    /* Colore del footer */
    --footer-text: #463E3F;     /* Testo footer */
    --hero-inner-start: #8B7355; /* Colore iniziale hero interna */
    --hero-inner-middle: #D2B48C; /* Colore centrale hero interna */
    --hero-inner-end: #8B7355;   /* Colore finale hero interna */
    
    /* Testi */
    --text-color: #463E3F;       /* Grigio scuro caldo */
    --heading-color: #2F1810;    /* Marrone molto scuro per titoli */
    --link-color: var(--accent-color);
    
    /* Sfondi */
    --bg-light: #FFF8DC;         /* Beige chiaro */
    --bg-dark: #8B7355;          /* Marrone caldo */
    
    /* Bordi e ombre */
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px rgba(139, 115, 85, 0.1);
    
    /* Spaziature */
    --section-padding: 4rem;
    --card-padding: 1.5rem;
}

/* Stili generali */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--text-color);
    background-color: var(--bg-light);
    position: relative;
    z-index: 0;
    /* Pattern di sfondo - URL corretto */
    background-image: url('/sito2000-v3/images/pattern-bg.png');
    background-repeat: repeat;
    background-size: 200px;
    background-attachment: fixed;
    background-blend-mode: overlay;
}

/* Pattern di sfondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/sito2000-v3/images/pattern-bg.png');
    background-repeat: repeat;
    background-size: 200px;
    background-attachment: fixed;
    background-blend-mode: overlay;
    opacity: 0.15; /* Controlliamo la visibilità */
    z-index: -2; /* Mettiamo sotto l'overlay */
}

/* Overlay per migliorare la leggibilità */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 248, 220, 0.85);
    z-index: -1;
}

main {
    flex: 1 0 auto;
}

/* Header e navigazione */
.site-header.navbar {
    background-color: var(--menu-color) !important;
    box-shadow: 0 8px 24px rgba(47, 24, 16, 0.07);
    border-bottom: 1px solid rgba(92, 64, 51, 0.1);
    z-index: 1030;
}

.site-navbar-brand img {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-navbar-brand img:hover {
    transform: scale(1.03);
}

.site-navbar-nav .nav-link {
    color: var(--accent-color) !important;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-navbar-nav .nav-link i {
    opacity: 0.85;
}

.site-navbar-nav .nav-link:hover,
.site-navbar-nav .nav-link:focus {
    color: var(--primary-color) !important;
}

/* Desktop: menu orizzontale moderno (pill bar) */
@media (min-width: 992px) {
    .site-header.navbar {
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--menu-color) 88%, #fff),
            var(--menu-color)
        ) !important;
    }

    .site-header .container {
        align-items: center;
    }

    .site-nav-cluster {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        flex-wrap: nowrap;
    }

    .site-navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 0.18rem;
        padding: 0.3rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.66);
        border: 1px solid rgba(92, 64, 51, 0.14);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.85),
            0 6px 18px rgba(47, 24, 16, 0.06);
    }

    .site-navbar-nav .nav-item {
        display: flex;
    }

    .site-navbar-nav .nav-link {
        border-radius: 999px;
        padding: 0.45rem 0.92rem;
        font-size: 0.86rem;
        letter-spacing: 0.015em;
        white-space: nowrap;
    }

    .site-navbar-nav .nav-link:hover,
    .site-navbar-nav .nav-link:focus {
        background: #fff;
        box-shadow: 0 4px 12px rgba(92, 64, 51, 0.14);
        transform: translateY(-1px);
    }

    .site-header .login-status-bar {
        margin: 0;
        flex-shrink: 0;
        padding: 0.24rem 0.38rem;
        background: rgba(255, 255, 255, 0.78);
        border: 1px solid rgba(92, 64, 51, 0.14);
        box-shadow: 0 4px 12px rgba(47, 24, 16, 0.06);
    }

    .site-navbar-brand img {
        height: 44px;
        width: auto;
    }

    .site-navbar-toggler {
        display: none;
    }
}

/* Mobile: menu a tendina invariato, solo rifiniture leggere */
@media (max-width: 991.98px) {
    .site-nav-cluster {
        padding-top: 0.65rem;
        gap: 0.55rem;
    }

    .site-navbar-nav .nav-link {
        border-radius: 8px;
    }

    .site-navbar-nav .nav-link:hover,
    .site-navbar-nav .nav-link:focus {
        background: rgba(255, 255, 255, 0.45);
    }

    .site-header .login-status-bar {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .site-navbar-brand img {
        height: 30px;
    }
}

/* Hero Section */
.hero-section {
    padding: 5rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 0 0 2rem 2rem;
}

.hero-section h1,
.hero-section p {
    position: relative;
    z-index: 1;
    color: #fff !important; /* Forziamo il colore del testo a bianco */
}

.hero-section h1 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
    font-weight: 700;
}

.hero-section .lead {
    color: var(--text-color);
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Hero Section per pagine interne */
.hero-section-inner {
    color: #fff !important; /* Forza il colore del testo a bianco */
    margin-bottom: 2rem;
    background: linear-gradient(
        135deg,
        var(--hero-inner-start) 0%,
        var(--hero-inner-middle) 50%,
        var(--hero-inner-end) 100%
    ) !important; /* Forza l'applicazione del gradiente */
    min-height: 200px;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-section-inner h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    color: #fff !important;
}

.hero-section-inner .lead {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    color: #fff !important;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background-color: var(--menu-color) !important;
    border-radius: 2rem;
    margin: 2rem 0;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(139, 115, 85, 0.2);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--secondary-color);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--heading-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--footer-color);
    color: var(--footer-text);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    line-height: 1.4;
}

footer a {
    color: var(--footer-text);
    text-decoration: none;
}

footer a:hover {
    color: var(--footer-text);
    opacity: 0.8;
}

footer .footer-main-text {
    color: var(--footer-text);
    font-weight: 500;
}

footer .footer-meta-text {
    color: var(--footer-text);
    opacity: 0.9;
    font-size: 0.9rem;
}

footer .footer-privacy-link {
    color: var(--footer-text);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

footer .footer-privacy-link:hover {
    border-bottom-color: currentColor;
    opacity: 0.85;
}

@media (max-width: 768px) {
    footer .row > [class*="col-"] {
        text-align: center !important;
    }

    footer .footer-meta-text {
        display: inline-block;
        margin-right: 0.5rem !important;
        margin-top: 0.35rem;
    }
}

/* Privacy Page */
.privacy-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.privacy-text {
    color: var(--text-color);
    line-height: 1.8;
}

.privacy-text h2 {
    color: var(--heading-color);
    margin: 2rem 0 1rem;
}

.privacy-text p {
    margin-bottom: 1.5rem;
}

/* Contact Page */
.contact-content {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 100%;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.contact-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/sito2000-v3/images/map-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    z-index: -1;
}

.contact-content h2 {
    color: var(--heading-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.contact-info h3 {
    color: var(--heading-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-info p {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

.contact-info a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

/* Stili per i pulsanti di contatto */
.contact-actions {
    display: none; /* Nascosti di default */
}

/* Mostra i pulsanti solo su mobile */
@media (max-width: 768px) {
    .contact-actions {
        display: flex !important;
    }

    .contact-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 120px;
    }

    .contact-actions .btn-outline-success {
        color: #25D366;
        border-color: #25D366;
    }

    .contact-actions .btn-outline-success:hover {
        background-color: #25D366;
        color: white !important;
        text-decoration: none !important;
    }

    .contact-actions .btn-outline-primary:hover {
        color: white !important;
        text-decoration: none !important;
    }
} 