/* --- ESTILS GENERALS --- */
:root {
    --primary: #FF3366; /* Rosa vibrant (Lloret) */
    --secondary: #2A9D8F; /* Verd aigua (Blanes) */
    --accent: #F4A261; /* Taronja (Tossa) */
    --bg-body: #F9FAFB;
    --text-main: #333333;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 8px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- CAPÇALERA AMB SLIDER --- */
header {
    position: relative;
    height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: #222;
    overflow: hidden;
}

.slider-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease-in-out;
}

.slide.active { opacity: 0.6; }

.hero-content {
    position: relative; z-index: 2; padding: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 3.5rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 0.5rem; margin-top: 0;
}

.dates { font-size: 1.4rem; font-weight: 300; margin-bottom: 30px; }

/* BOTÓ PDF A LA CAPÇALERA */
.btn-hero {
    display: inline-block;
    background-color: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.4);
}

/* --- CONTINGUT --- */
.container { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }

h2.section-title {
    text-align: center; font-size: 2rem; font-weight: 700;
    margin-bottom: 40px; color: var(--text-main);
    text-transform: uppercase; letter-spacing: 1px;
}

/* --- DESTACATS (RUES) --- */
.rues-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px; margin-bottom: 60px;
}

.rua-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform 0.3s ease; text-align: center;
}
.rua-card:hover { transform: translateY(-5px); }

.rua-img { width: 100%; height: 180px; object-fit: cover; background: #eee; }
.rua-content { padding: 25px; }

.town-tag {
    display: inline-block; padding: 4px 12px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    margin-bottom: 10px; color: white;
}
.h-lloret { background-color: var(--primary); }
.h-blanes { background-color: var(--secondary); }
.h-tossa { background-color: var(--accent); }

.rua-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.rua-date { color: #666; font-size: 0.95rem; }

/* --- PESTANYES --- */
.tabs-header { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }

.tab-btn {
    background: white; border: 1px solid #ddd; padding: 12px 30px;
    font-family: 'Montserrat', sans-serif; font-size: 1.1rem; font-weight: 700;
    color: #888; cursor: pointer; border-radius: 50px; transition: all 0.3s;
}
.tab-btn:hover { border-color: #bbb; color: #555; }

.tab-btn.active { color: white; border-color: transparent; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: scale(1.05); }
.tab-btn.active[data-target="Lloret"] { background-color: var(--primary); }
.tab-btn.active[data-target="Blanes"] { background-color: var(--secondary); }
.tab-btn.active[data-target="Tossa"] { background-color: var(--accent); }

.tab-content { display: none; animation: fadeIn 0.4s ease-in-out; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- AGENDA --- */
.day-group { margin-bottom: 40px; }

.day-header {
    font-size: 1.5rem; font-weight: 800; color: #333;
    border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: 1px;
}

#Lloret .day-header { border-color: var(--primary); color: var(--primary); }
#Blanes .day-header { border-color: var(--secondary); color: var(--secondary); }
#Tossa .day-header { border-color: var(--accent); color: var(--accent); }

.event-card {
    display: flex; align-items: flex-start;
    background: white; border-radius: 10px; padding: 20px;
    margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 5px solid #ccc; transition: transform 0.2s;
}

.event-card:hover { transform: translateX(5px); }

#Lloret .event-card { border-left-color: var(--primary); }
#Blanes .event-card { border-left-color: var(--secondary); }
#Tossa .event-card { border-left-color: var(--accent); }

.event-time {
    min-width: 90px; font-weight: 800; font-size: 1.1rem;
    color: #333; margin-right: 20px; margin-top: 2px;
}

.event-details { width: 100%; }

.title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.event-details h4 { font-size: 1.1rem; font-weight: 700; color: #222; text-transform: uppercase; margin: 0; }

/* ETIQUETA NOVETAT */
.badge-new {
    background-color: #FFC107; color: #333; font-size: 0.75rem; padding: 3px 8px;
    border-radius: 4px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

.event-details p { font-size: 0.95rem; color: #555; margin: 0; line-height: 1.5; }

/* ESTIL DEL CARTELL DINS L'AGENDA */
.event-poster-img {
    margin-top: 15px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-height: 400px; /* Limitem l'alçada perquè no ocupi massa */
    object-fit: contain;
    display: block;
}

/* --- FOOTER & LOGOS --- */
footer { 
    text-align: center; 
    padding: 50px 20px; 
    background: #f4f4f4; 
    margin-top: 60px; 
    border-top: 1px solid #e0e0e0;
}

.copyright {
    font-size: 0.95rem; 
    color: #555;
    margin-bottom: 30px; /* Separació amb els logos */
}

/* Estil dels enllaços del footer */
footer a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
    border-bottom: 2px solid transparent; 
}

footer a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.logos-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px; 
    flex-wrap: wrap;
}

.logos-inner img {
    height: 85px; 
    width: auto;
    filter: grayscale(10%);
    transition: all 0.3s;
}

.logos-inner img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .event-card { flex-direction: column; }
    .event-time { margin-bottom: 5px; color: #555; }
    .logos-inner { gap: 30px; }
    .logos-inner img { height: 60px; } 
    .btn-hero { padding: 10px 20px; font-size: 0.9rem; }
}