/* ========================================
   Aggiornamenti CSS
   ======================================== */

/* Animazioni Hero Text */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animated-text {
    animation: fadeInUp 1.2s ease-out;
}

.animated-subtitle {
    animation: fadeInUp 1.5s ease-out;
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Navbar - Aumenta altezza */
.navbar .container {
    padding: 1.2rem 20px;
}

/* Brand Text - Bel font personalizzato */
.nav-brand .logo {
    display: none;
}

.nav-brand .brand-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-transform: uppercase;
    display: inline-block;
}

/* Scroll Indicator - Centrato orizzontalmente in basso */
.hero .scroll-indicator {
    position: fixed !important;
    bottom: 40px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    background: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    opacity: 1;
    visibility: visible;
}

.hero .scroll-indicator i {
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    display: block;
}

.hero .scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Mobile Navigation - Hamburger a destra */
@media (max-width: 992px) {
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hamburger sempre a destra */
    .nav-toggle {
        order: 3;
        margin-left: auto;
    }

    /* Logo a sinistra */
    .nav-brand {
        order: 1;
    }

    /* Social nascosti nel menu mobile */
    .nav-menu .nav-social {
        display: none !important;
    }
}

/* 5x1000 Section */
.cinquexmille-section {
    padding: 5rem 0;
    background: var(--light-bg);
}

.cinquexmille-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.cinquexmille-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    text-align: center;
}

.cinquexmille-content .underline {
    margin: 0 auto 2rem;
}

.cinquexmille-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: center;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.cinquexmille-content strong {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.cinquexmille-highlight {
    text-align: center !important;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 2rem auto 0 !important;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    display: inline-block;
}

@media (max-width: 768px) {
    .cinquexmille-section {
        padding: 3rem 0;
    }

    .cinquexmille-content h2 {
        font-size: 2rem;
    }

    .cinquexmille-content p {
        font-size: 1rem;
    }

    .cinquexmille-highlight {
        font-size: 1.1rem;
        padding: 1rem;
        white-space: normal;
        display: block;
    }
}

/* Mobile landscape - schermo orizzontale */
@media (max-width: 926px) and (orientation: landscape) {
    .cinquexmille-highlight {
        font-size: 0.9rem;
        padding: 0.8rem;
        white-space: normal;
        display: block;
        max-width: 90%;
    }
}

/* Page Header - SOLO per pagine interne (NON Home) */
.page-header {
    position: relative;
    height: 450px;
    margin-top: 70px;
    margin-bottom: 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(173, 216, 230, 0.15);
    z-index: 1;
}

.page-header .container {
    display: none;
}

/* Immagini specifiche per ogni pagina */
.page-header.chi-siamo {
    background-image: url('../images/header-chi-siamo.webp');
}

.page-header.eventi,
.page-header.escursioni,
.page-header.contatti,
.page-header.territorio,
.page-header.ospitalita,
.page-header.gallery,
.page-header.privacy {
    background-image: url('../images/tappo.webp');
}

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

/* Footer Aggiornato - 3 colonne con CSS Grid */
.footer-content {
    max-width: 100%;
    display: grid;
    grid-template-columns: 2fr 1.6fr auto;
    gap: 3rem;
    align-items: start;
}

.footer-left {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer-brand-logo {
    height: 100px;
    width: auto;
    opacity: 0.95;
}

.footer-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white) !important;
    margin-bottom: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.3rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.footer-info a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-info a:hover {
    color: var(--white);
}

.footer-logos {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: flex-end;
    justify-content: flex-start;
}

.footer-logo {
    height: 60px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    background: white;
    padding: 8px;
    border-radius: 8px;
}

.footer-logo:hover {
    opacity: 1;
}

/* Eventi - Box Resta Aggiornato */
.box-resta-aggiornato {
    background: #f8f9fa;
    border: 2px dashed var(--primary-color);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    margin: 3rem 0;
}

.box-resta-aggiornato h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.box-resta-aggiornato p {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.box-resta-aggiornato .social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-share-btn.facebook {
    background: #1877f2;
}

.social-share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Eventi - Social Share più evidenti */
.evento-social-share {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.share-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn.fb {
    background: #1877f2;
}

.share-btn.ig {
    background: linear-gradient(45deg, #f09433, #dc2743);
}

.share-btn.wa {
    background: #25D366;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* MOBILE - Nascondere social nella navbar */
@media (max-width: 992px) {
    .nav-social {
        display: none !important;
    }
}

/* MOBILE + TABLET - Footer colonna singola (fino a 1199px copre tutti i tablet, incluso iPad Pro landscape) */
@media (max-width: 1199px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    /* Nascondi titolo Pro Loco su mobile/tablet */
    .footer-title {
        display: none;
    }

    /* Newsletter centrata */
    .footer-newsletter-col {
        text-align: center;
    }

    .footer-newsletter-form {
        justify-content: center;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-newsletter-input {
        max-width: none;
    }

    /* Loghi affiancati su mobile/tablet */
    .footer-logos {
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
        justify-content: center;
    }
}


/* CTA Section - Padding prima del footer + Sfondo immagine */
.cta-section {
    margin-bottom: 4rem;
    background-image: url('../images/piteglio-home-box-red.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cta-section h2,
.cta-section p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Bottone Escursioni con sfondo rosso */
.cta-section .btn-outline-light {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.cta-section .btn-outline-light:hover {
    background: rgba(153, 4, 24, 0.9);
    border-color: rgba(153, 4, 24, 0.9);
    color: var(--white);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .footer-logos {
        flex-direction: column;
        align-items: center;
    }

    .evento-social-share {
        flex-direction: column;
    }

    .cta-section {
        margin-bottom: 3rem;
    }
}

/* Section Subtitle - Stile generale per sottotitoli */
.section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 1.5rem auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Documenti Chi Siamo - Più Piccoli */
.documenti-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.documenti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.documento-box {
    background: var(--light);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.documento-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.documento-box i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.documento-box h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--dark);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Eventi - Griglia 3 colonne */
.eventi-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.evento-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.evento-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.evento-img {
    position: relative;
    height: 220px;
    background: var(--secondary-color);
}

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

.evento-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.evento-info h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

/* Eventi - Responsive */
@media (max-width: 992px) {
    .eventi-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .eventi-list {
        grid-template-columns: 1fr;
    }
}

/* Box Resta Aggiornato - Discreto */
.box-resta-aggiornato {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.box-resta-aggiornato h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.box-resta-aggiornato p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.social-buttons-discrete {
    display: flex;
    gap: 1rem;
}

.social-btn-discrete {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn-discrete.facebook {
    background: #1877f2;
}

.social-btn-discrete.instagram {
    background: #E4405F;
}

.social-btn-discrete:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ===== PAGINA SINGOLO EVENTO ===== */
.breadcrumb-evento {
    margin-bottom: 1.5rem;
}
.breadcrumb-evento a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}
.breadcrumb-evento a:hover { text-decoration: underline; }

.evento-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 3rem;
}

.evento-detail-img {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    max-height: 600px;
}
.evento-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.evento-detail-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.evento-detail-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1.2rem;
}
.badge-day-lg {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.badge-month-year-lg {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

.evento-detail-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 1.5rem 0;
}

.evento-detail-back {
    margin-top: 1.5rem;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 18px;
    border-radius: 6px;
    background: var(--light);
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.btn-back:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .evento-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .evento-detail-img {
        max-height: 400px;
    }
    .evento-detail-title {
        font-size: 1.4rem;
    }
}

/* Social Share Discreti negli Eventi */
.evento-social-discrete {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.share-btn-discrete {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn-discrete:hover {
    background: var(--primary-color);
    color: white;
}

/* Colori ufficiali social */
.share-fb { background: #1877F2; color: white; }
.share-fb:hover { background: var(--light); color: var(--text-light); }

.share-copy { background: #555; color: white; }
.share-copy:hover { background: var(--light); color: var(--text-light); }

.share-wa { background: #25D366; color: white; }
.share-wa:hover { background: var(--light); color: var(--text-light); }

@media (max-width: 992px) {
    .evento-item {
        grid-template-columns: 1fr;
    }

    .evento-img {
        height: 200px;
    }

    .social-buttons-discrete {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Fix overflow su mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }

    .content-section {
        overflow-x: hidden;
    }

    /* Eventi - singola colonna su mobile */
    .eventi-list {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .evento-item {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    .evento-img {
        width: 100%;
        height: 200px;
        min-height: auto;
    }

    .evento-info {
        padding: 1.25rem;
        width: 100%;
        box-sizing: border-box;
    }

    .evento-info h3 {
        font-size: 1.3rem;
        word-wrap: break-word;
    }

    .evento-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .evento-desc {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Social share su mobile */
    .evento-social-discrete {
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .share-btn-discrete {
        flex: 0 0 auto;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .share-fb .share-label,
    .share-wa .share-label {
        display: none;
    }

    .share-copy .share-label {
        display: inline;
    }

    /* Newsletter box */
    .newsletter-box {
        margin-left: 0;
        margin-right: 0;
    }

    /* Eventi grid per card piccole */
    .eventi-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix per schermi molto piccoli (Galaxy A50, ecc.) */
@media (max-width: 414px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    * {
        max-width: 100%;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .content-section {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100vw;
    }

    .content-section .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .eventi-section {
        width: 100%;
        padding: 0;
    }

    .eventi-list {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .evento-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        border-radius: 8px;
    }

    .evento-img {
        width: 100%;
        height: 180px;
    }

    .evento-info {
        padding: 1rem;
    }

    .evento-info h3 {
        font-size: 1.2rem;
    }

    .evento-desc {
        font-size: 0.9rem;
    }

    .evento-badge {
        width: 55px;
        height: 55px;
        top: 8px;
        right: 8px;
    }

    .badge-day {
        font-size: 1.4rem;
    }

    .badge-month-year {
        font-size: 0.7rem;
    }

    /* Social buttons su schermi molto piccoli */
    .evento-social-discrete {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.3rem;
    }

    .share-btn-discrete {
        flex: 0 0 auto;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    /* Newsletter */
    .newsletter-box {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    .newsletter-content h3 {
        font-size: 1.2rem;
    }

    .social-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }

    /* Tabs */
    .eventi-tabs {
        padding: 0;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    /* Section icon */
    .section-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .eventi-section h2 {
        font-size: 1.6rem;
    }

    /* Eventi grid card piccole */
    .eventi-grid {
        gap: 1rem;
    }

    .evento-card-small {
        border-radius: 8px;
    }

    .evento-thumb {
        height: 150px;
    }

    .evento-content-small {
        padding: 1rem;
    }

    .evento-content-small h4 {
        font-size: 1rem;
    }
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c2c2c;
    color: #fff;
    z-index: 9999;
    padding: 18px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    animation: cookieFadeIn 0.4s ease-out;
}

@keyframes cookieFadeIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 260px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-text a {
    color: #e0dede;
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: #fff;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

.cookie-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: #990418;
    color: #fff;
}

@media (max-width: 600px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
    }
}
