/* ========================================
   Pro Loco Piteglio - Main Stylesheet
   ======================================== */

:root {
    --primary-color: #990418;
    --secondary-color: #e0dede;
    --dark: #2c2c2c;
    --light: #f8f9fa;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 20px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.nav-brand .logo {
    height: 50px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.5rem 0;
    border-radius: 8px;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

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

.nav-social a {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(153, 4, 24, 0.3);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.webp') center/cover no-repeat;
    background-color: var(--secondary-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(153, 4, 24, 0.6);
    background: linear-gradient(135deg, rgba(153, 4, 24, 0.8) 0%, rgba(153, 4, 24, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.underline {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Chi Siamo Preview
   ======================================== */

.chi-siamo-preview {
    background: var(--white);
}

.chi-siamo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.chi-siamo-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.chi-siamo-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.chi-siamo-content .underline {
    margin: 1rem 0;
}

.chi-siamo-content p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.8;
    text-align: justify;
}

/* ========================================
   Eventi Section
   ======================================== */

.eventi-section {
    background: var(--light);
}

.eventi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.evento-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.evento-image {
    height: 220px;
    overflow: hidden;
}

.evento-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.evento-card:hover .evento-image img {
    transform: scale(1.1);
}

.evento-content {
    padding: 1.5rem;
}

.evento-data {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.evento-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.evento-luogo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.evento-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: gap 0.3s ease;
}

.btn-link:hover {
    gap: 12px;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: #7a0313;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(153, 4, 24, 0.3);
}

.btn-light {
    background: var(--white);
    color: var(--primary-color);
}

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

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
}

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

/* ========================================
   Page Header
   ======================================== */

.page-header {
    position: relative;
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(153, 4, 24, 0.6);
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--primary-color);
    color: var(--white);
}

/* Newsletter colonna nel footer */
.footer-newsletter-col {
    min-width: 200px;
}

/* Titolo newsletter (non usa footer-title per non sparire su mobile) */
.footer-nl-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
    margin-bottom: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-newsletter-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    max-width: 320px;
}

.nl-email-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
}

.footer-newsletter-input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.footer-newsletter-input::placeholder {
    color: rgba(255,255,255,0.55);
}

.footer-newsletter-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

.footer-newsletter-btn {
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.footer-newsletter-btn:hover {
    background: rgba(255,255,255,0.28);
}

.footer-newsletter-msg {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.footer-newsletter-ok {
    color: #c8f7c5;
    font-weight: 600;
}

.footer-newsletter-err {
    color: #ffc8c8;
}

.footer-newsletter-info {
    color: #ffe8a0;
}

.nl-privacy-wrap {
    margin-top: 0.2rem;
}

.nl-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.nl-privacy-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 0.15rem;
    accent-color: #fff;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.nl-privacy-label a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.nl-privacy-label a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .footer-newsletter-form {
        max-width: 100%;
    }

    .nl-email-row {
        max-width: 100%;
    }
}

.footer-top {
    padding: 50px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.8rem;
    display: block;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.partner-logos {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.partner-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
}

.footer-bottom-content {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-bottom-content a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ========================================
   WhatsApp Float Button
   ======================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

/* ========================================
   Back to Top Button
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(153, 4, 24, 0.4);
}

/* ========================================
   Content Page Styles
   ======================================== */

.content-section {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.main-content {
    background: var(--white);
}

.main-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.main-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.main-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.sidebar {
    background: var(--white);
}

.sidebar-widget {
    background: var(--light);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--white);
        width: 280px;
        height: calc(100vh - 70px);
        padding: 2rem;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        align-items: flex-start;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-social {
        margin-top: 2rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .chi-siamo-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    /* Inverti ordine immagine/testo su mobile - prima testo, poi immagine */
    .chi-siamo-grid,
    .intro-section,
    .content-block {
        display: flex;
        flex-direction: column;
    }

    .chi-siamo-image,
    .intro-image,
    .content-image {
        order: 2;
    }

    .chi-siamo-content,
    .intro-text,
    .content-text {
        order: 1;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .eventi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    /* Header diverso per mobile - aggiungi data-mobile-image="nomefile.webp" al tag page-header */
    .page-header[data-mobile-image] {
        background-image: var(--mobile-bg-image) !important;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }

    .back-to-top {
        bottom: 85px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .section {
        padding: 50px 0;
    }

    .partner-logos {
        flex-direction: column;
    }
}
