/* --- Impostazioni di base e Colori --- */
:root {
    --primary-blue: #1B8CBA; /* Colore preso dal tuo logo */
    --dark-blue: #126385;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f7f6;
    --whatsapp-green: #25D366;
    --whatsapp-dark: #1da851;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Navigazione --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px; /* Regola questa altezza in base al tuo logo */
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.giovani-link {
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    padding-left: 15px;
    border-left: 2px solid #ccc;
    transition: color 0.3s ease, border-left-color 0.3s ease;
}

.giovani-link:hover {
    color: var(--dark-blue);
    border-left-color: var(--dark-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* --- Sezione Hero (Visuale iniziale) --- */
.hero {
    height: 100vh;
    background-image: url('../img/Monasterolo.jpg'); 
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    margin-top: 80px; /* Compensa la navbar fissa */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Scurisce l'immagine per far leggere il testo */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* --- Bottoni --- */
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-light);
    border: 2px solid var(--primary-blue);
}

.btn-primary:hover {
    background-color: transparent;
    border: 2px solid var(--text-light);
}

.btn-whatsapp {
    background-color: var(--whatsapp-green);
    color: var(--text-light);
    border: 2px solid var(--whatsapp-green);
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-dark);
    border-color: var(--whatsapp-dark);
}

/* --- Sezione Territorio --- */
.about-section {
    padding: 80px 0;
    text-align: center;
    background-color: #ffffff;
}

.about-section h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social .wa-link {
    color: var(--whatsapp-green);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.footer-social .wa-link:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* --- Responsive (Cellulari) --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    .nav-links { display: none; /* In futuro qui possiamo mettere un menu ad hamburger */ }
    .footer-content { flex-direction: column; text-align: center; }
}

/* --- Added CSS for Events & Info Point Sections --- */
.bg-light {
    background-color: var(--bg-light);
}

.events-section {
    padding: 80px 0;
    text-align: center;
}

.events-section h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-date {
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.event-content h3 {
    margin-bottom: 10px;
    color: var(--dark-blue);
}

.event-content p {
    color: #555;
    margin-bottom: 20px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.btn-outline {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    align-self: flex-start;
}

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

/* --- Tag Badges --- */
.event-image-wrapper {
    position: relative;
    width: 100%;
}

.event-tags-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tag-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-block;
    background-color: #555; /* Default fallback */
}

/* Colori mappati per le singole associazioni */
.tag-proloco { background-color: var(--primary-blue); }
.tag-avis { background-color: #e53935; }
.tag-gvm { background-color: #18cea6; }
.tag-gruppo-castoncello { background-color: #f1c224e5; }

/* --- Info Point Section --- */
.info-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.info-card {
    background-color: var(--bg-light);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.info-card h2 {
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.info-card h2 i {
    margin-right: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-top: 5px;
}

.info-item h3 {
    color: var(--dark-blue);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.timetable {
    list-style: none;
}

.timetable li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.95rem;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

.timetable li:last-child {
    border-bottom: none;
}

.timetable li span {
    font-weight: 600;
}

/* --- Event Detail Page --- */
.event-detail-section {
    padding: 120px 0 80px;
    min-height: 80vh;
}

.event-detail-card {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.event-detail-hero {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* --- Carousel --- */
.carousel-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background-color: #000;
}

.carousel-slide {
    display: none;
    width: 100%;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--primary-blue);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.carousel-dot.active {
    background: white;
}

.event-detail-body {
    padding: 40px;
}

.event-detail-title {
    font-size: 2.5rem;
    color: var(--dark-blue);
    margin-bottom: 15px;
}

.event-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 1.05rem;
}

.meta-item i {
    color: var(--primary-blue);
}

.event-detail-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #444;
}

.event-detail-desc p {
    margin-bottom: 1rem;
}

.event-detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-dark);
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}