/* ============================================
   ESTIL INSTITUT DE TONA - FEM UN MUSICAL
   Colors: verd institucional (#2e5e3b) i daurat (#f4c542)
   ============================================ */

/* RESET BÀSIC */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f7e6;
    color: #2c3e2f;
    line-height: 1.6;
}

/* ===== NAVEGACIÓ AMB LOGO ===== */
nav {
    background: #2e5e3b;
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-nav {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.logo-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
}

.logo-nav-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.logo-nav-text {
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

nav a:hover {
    background: #f4c542;
    color: #2e5e3b;
    transform: translateY(-2px);
}

/* ===== CAPÇALERA HERO ===== */
.hero {
    background: linear-gradient(rgba(46, 94, 59, 0.75), rgba(46, 94, 59, 0.85)), 
                url('https://images.unsplash.com/photo-1507924538820-ede95a2f1e38?w=1200') no-repeat center center/cover;
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
    position: relative;
}

/* Logo a la capçalera hero */
.logo-hero {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 60px;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
}

.logo-hero:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.logo-hero-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 8px;
}

.logo-hero-text {
    color: #2e5e3b;
    font-weight: bold;
    font-size: 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.subtitol {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f4c542;
    margin-bottom: 1rem;
}

.info-funcio {
    background: rgba(46, 94, 59, 0.9);
    padding: 1rem;
    border-radius: 15px;
    margin: 1.5rem auto;
    display: inline-block;
    border: 1px solid #f4c542;
}

/* ===== ELIMINAT EL BOTÓ CENTRAL ===== */

/* ===== SECCIÓ D'INFORMACIÓ DESTACADA ===== */
.info-destacada {
    text-align: center;
    padding: 2rem;
    background: white;
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-destacada h2 {
    color: #2e5e3b;
    margin-bottom: 1rem;
}

/* ===== GALERIA D'IMATGES (ARA MÉS GRANS) ===== */
.galeria {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 20px;
}

.galeria h2 {
    text-align: center;
    color: #2e5e3b;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.galeria h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #f4c542;
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.galeria-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.galeria-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 500px;
    max-width: 90%;
    flex-shrink: 0;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.galeria-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top;
    display: block;
    background: #f5f5f5;
}

.galeria-caption {
    padding: 1rem;
    text-align: center;
    background: white;
}

.galeria-caption p {
    margin: 0;
    color: #2e5e3b;
    font-weight: 600;
    font-size: 1rem;
}

/* ===== CONTENIDOR PRINCIPAL (per repartiment i reserves) ===== */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.container h1 {
    text-align: center;
    color: #2e5e3b;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* ===== SECCIONS DE REPARTIMENT ===== */
.projecte, .cast {
    margin-bottom: 2rem;
}

.projecte h2, .cast h2 {
    color: #2e5e3b;
    border-bottom: 3px solid #f4c542;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.cast-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
}

.cast-list li {
    padding: 0.5rem 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
    border-left: 3px solid #2e5e3b;
}

.cast-list li:hover {
    background: #e8f5e9;
    transform: translateX(5px);
}

.responsable {
    margin-top: 1rem;
    padding: 0.8rem;
    background: #f4c542;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    color: #2e5e3b;
}

/* ===== FORMULARI DE RESERVES ===== */
form label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    color: #2e5e3b;
}

form input {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.3rem;
    border-radius: 10px;
    border: 2px solid #c8e6c9;
    transition: border 0.3s;
    font-size: 1rem;
}

form input:focus {
    outline: none;
    border-color: #2e5e3b;
}

button[type="submit"] {
    width: 100%;
    margin-top: 1.5rem;
    display: inline-block;
    background: #f4c542;
    color: #2e5e3b;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

button[type="submit"]:hover {
    background: #e6b13e;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== MISSATGES D'ESTAT ===== */
#missatge {
    margin-top: 1rem;
}

.exit {
    color: #155724;
    background: #d4edda;
    padding: 1rem;
    border-radius: 10px;
    border-left: 5px solid #28a745;
}

.error {
    color: #721c24;
    background: #f8d7da;
    padding: 1rem;
    border-radius: 10px;
    border-left: 5px solid #dc3545;
}

/* ===== PEU DE PÀGINA AMB LOGO ===== */
footer {
    text-align: center;
    padding: 1.5rem;
    background: #2e5e3b;
    color: white;
    margin-top: 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-footer {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.logo-footer:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
}

.logo-footer-img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.logo-footer-text {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ===== RESPONSIVE (MÒBILS I TAULETES) ===== */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .subtitol {
        font-size: 1.2rem;
    }
    
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        flex-direction: row;
        gap: 0.8rem;
        justify-content: center;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .logo-hero {
        top: 10px;
        left: 10px;
        padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    }
    
    .logo-hero-img {
        width: 35px;
        height: 35px;
    }
    
    .logo-hero-text {
        font-size: 0.8rem;
    }
    
    .cast-list {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .info-funcio {
        font-size: 0.9rem;
    }
    
    .info-destacada {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .galeria {
        padding: 1rem;
    }
    
    .galeria h2 {
        font-size: 1.5rem;
    }
    
    .galeria-item {
        width: 400px;
    }
    
    .galeria-item img {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .galeria-container {
        gap: 1.5rem;
    }
    
    .galeria-item {
        width: 300px;
    }
    
    .galeria-item img {
        height: 220px;
    }
    
    .galeria-caption p {
        font-size: 0.9rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 0.5rem;
    }
	
	/* ===== ESTILS ESPECÍFICS PER RESERVES ===== */

/* Missatges */
.missatge {
    margin-top: 1.5rem;
    padding: 0;
    border-radius: 10px;
}

.missatge-exit {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    animation: fadeIn 0.5s ease;
}

.missatge-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    animation: fadeIn 0.5s ease;
}

/* Reserves tancades */
.reserves-tancades {
    text-align: center;
    padding: 2rem;
    background: #f8d7da;
    border-radius: 15px;
    margin: 1rem 0;
    border-left: 4px solid #dc3545;
    animation: fadeIn 0.5s ease;
}

.reserves-tancades h3 {
    color: #721c24;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.reserves-tancades p {
    color: #721c24;
    font-size: 1rem;
}

/* Informació addicional */
.info-reserva-adicional {
    background: rgba(244, 197, 66, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid rgba(244, 197, 66, 0.3);
}

/* Animacions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estils per inputs */
input:invalid {
    border-color: #dc3545;
}

input:valid {
    border-color: #28a745;
}

/* Millores per al formulari */
.container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.container form label {
    font-weight: bold;
    color: #2e5e3b;
    margin-bottom: -0.5rem;
}

.container form input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid #c8e6c9;
    transition: all 0.3s;
    font-size: 1rem;
}

.container form input:focus {
    outline: none;
    border-color: #2e5e3b;
    box-shadow: 0 0 0 3px rgba(46, 94, 59, 0.1);
}

/* Responsive per reserves */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .reserves-tancades h3 {
        font-size: 1.2rem;
    }
    
    .reserves-tancades p {
        font-size: 0.9rem;
    }
    
    .missatge-exit, .missatge-error {
        font-size: 0.9rem;
    }
}
}