/* ==========================================================================
   1. CONFIGURACIÓ GENERAL
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #fcfcfc;
    font-family: 'Lora', serif;
    line-height: 1.8;
    color: #2c3e50;
    /* Deixem espai inferior per a la barra de contacte fixa */
    padding-bottom: 60px; 
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    color: #1a1a1a;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    border-bottom: 2px solid #1a1a1a;
}

.site-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 30px rgba(0,0,0,0.03);
}

/* ==========================================================================
   2. CAPÇALERA I IDIOMES
   ========================================================================== */
.site-header {
    padding: 40px 20px; /* Reduït una mica per estètica */
    text-align: center;
}

.lang-selector {
    text-align: right;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.lang-selector a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.lang-selector a:hover {
    background-color: #f0f0f0;
    color: #000;
}

.custom-logo {
    display: block;
    margin: 0 auto;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
}

/* ==========================================================================
   3. SECCIONS DE CONTINGUT
   ========================================================================== */
.content {
    padding: 20px 0;
}

.section-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.separator {
    border: 0;
    border-top: 1px solid #eee;
    width: 50%;
    margin: 20px auto;
}

/* Logos federacions */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 10px;
}

.logo-link img {
    max-width: 120px;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s;
}

.logo-link img:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Relació d'aspecte 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 15px; /* Perquè tingui les puntes arrodonides com el mapa */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Instructors */
.seccio-instructors {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.contenedor-instructors {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center; /* Millor centrat si hi ha 1 o 2 */
}

.instructor-card {
    flex: 1 1 280px; /* Més flexible que el càlcul fix */
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.instructor-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.info-instructor h3 {
    margin: 0;
    font-size: 1.25rem;
}

.info-instructor p {
    margin: 5px 0;
    color: #888;
    font-style: italic;
}

/* ==========================================================================
   4. SECCIÓ FOSCA (HORARIS) I MAPA
   ========================================================================== */
.dark-section {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 40px 0;
}

.dark-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
}

.schedule-list {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
}

.mapa-ubicacio {
    margin: 30px auto 0;
    max-width: 90%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ==========================================================================
   5. PEU DE PÀGINA I CONTACTE FIX
   ========================================================================== */
.site-footer {
    padding: 20px 20px 2px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #95a5a6;
}

.barra-contacto {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333333;
    padding: 10px 0;
    z-index: 1000;
}

.contenedor-barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px; /* Alineat amb el container principal */
    margin: 0 auto;
    padding: 0 20px;
}

.logo-izquierdo img {
    height: 30px;
}

.contenedor-iconos {
    display: flex;
    gap: 20px;
}

.icono-link img {
    width: 24px;
    height: 24px;
    filter: invert(0.8);
    transition: transform 0.3s, filter 0.3s;
}

.icono-link img:hover {
    transform: scale(1.2);
    filter: invert(1);
}

/* ==========================================================================
   6. RESPONSIVE (MÒBILS)
   ========================================================================== */
@media (max-width: 768px) {
    .site-header { padding: 30px 10px; }
    
    .lang-selector {
        text-align: center;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .logo-container {
        gap: 15px;
    }

    .logo-link img {
        max-width: 90px;
    }

    h2 { font-size: 1.5rem; }

    .instructor-card {
        max-width: 100%;
    }
}