@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Montserrat:wght@300;400;500&display=swap');

:root {
    --bg-llenc: #F9F8F6;
    --text-tinta: #1A1A1A;
    --text-secundari: #7A7A7A;
    --font-serif: 'Arial', sans-serif;
    --font-sans: 'Arial', sans-serif;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    background-color: var(--bg-llenc);
    color: var(--text-tinta);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
main {
    flex: 1; /* Permet que el main ocupi tot l'espai restant */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
/* =========================================
   PÀGINA: PRESENTACIÓ (2 Columnes de la mateixa alçada)
   ========================================= */

.presentacio-main {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
}

.presentacio-layout {
    display: flex;
    gap: 50px; /* Marges iguals entre vídeo i text */
    width: 100%;
    align-items: stretch; /* Obliga les dues columnes a tenir la mateixa alçada */
}

/* --- COLUMNA DEL VÍDEO (ESQUERRA) --- */
.video-col {
    flex: 1.8; /* ABANS ERA 1.2: Ara el vídeo és gairebé el doble d'ample que el text, estirant-se cap a la dreta */
    flex-direction: column;
}

/* --- COLUMNA DEL TEXT (DRETA) --- */
.text-col {
    flex: 0.8; /* El text es veu forçat a ser una columna més estreta i estilitzada */
    flex-direction: column;
    justify-content: space-between; 
}

.text-col p {
    font-size: 18px;
    line-height: 1.3; /* Una mica més d'espai entre línies perquè la lletra prima es llegeixi perfecte */
    color: var(--text-tinta);
    text-align: left; 
    margin: 0;
}

.highlight-name {
    color: var(--text-name);
    font-weight: 800;
}

/* =========================================
   EL TEU DISSENY DEL VÍDEO (Estètica i Skeleton)
   ========================================= */

.video-tour {
    position: relative;
    width: 100%; /* Forcem a ocupar la columna (elimina el teu antic max-width i margin) */
    aspect-ratio: 16 / 9; 
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Afegit un toc d'ombra per fer-lo destacar més */
    transition: transform 0.4s ease;
}

.video-tour:hover {
    transform: scale(1.02); /* Efecte suau de zoom en passar el ratolí */
}

.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- La capa de carga (El Esqueleto) --- */
.video-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    
    background: linear-gradient(90deg, #1f1f1f 25%, #2e2e2e 50%, #1f1f1f 75%);
    background-size: 200% 100%;
    animation: loading-pulse 1.5s infinite linear;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

@keyframes loading-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff; 
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-loader.oculto {
    opacity: 0;
    visibility: hidden;
}

/* Textos sobre el vídeo (Codi original guardat) */
.video-tour::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2;
}
.video-content {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; text-align: center; width: 100%;
}
.video-tour h2 {
    font-family: var(--font-sans); font-weight: 300; font-size: 40px; color: #FFFFFF; margin: 0; letter-spacing: 6px;
}
.video-tour p {
    color: #FFFFFF; font-family: var(--font-serif); font-style: italic; font-size: 16px; margin-top: 10px; letter-spacing: 2px;
}

/* =========================================
   EL TEU MODAL DEL VÍDEO
   ========================================= */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* La classe del config.js que el fa visible */
.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal video {
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    outline: none;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 10000;
}

.close-modal:hover {
    color: #cccccc;
    transform: scale(1.1);
}

/* =========================================
   RESPONSIVE (Com es veu al mòbil)
   ========================================= */
@media (max-width: 960px) {
    .presentacio-layout {
        flex-direction: column; /* Apila el vídeo dalt i el text a baix */
        gap: 40px;
    }
    
    .presentacio-main {
        padding: 40px 30px;
    }

    .text-col {
        gap: 20px;
        padding: 0;
    }

    .text-col p {
        text-align: left; /* El text a l'esquerra queda més polit en pantalles estretes */
        font-size: 16px;
    }
    
    /* Adaptació de la finestra Modal per mòbil */
    .close-modal {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    .video-modal video {
        width: 100%;
        border-radius: 0;
    }
}