:root {
    --primary-color: #E63946; /* Vermell dinàmic */
    --secondary-color: #F1FAEE; /* Blanc suau */
    --text-color: #457B9D; /* Blau fosc per al text */
    --dark-color: #1D3557; /* Blau molt fosc */
}

/* Estils generals */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Evita el scroll horitzontal */
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--dark-color);
}

section {
    padding: 80px 50px;
    text-align: center;
}

/* --- Estils per al Logo --- */
.logo-link {
    position: absolute; /* Fixed Fa que l'element es quedi fix a la pantalla- absolute marxa fent scroll */
    top: -10px; /* Distància des de la part superior */
    left: 20px; /* Distància des de l'esquerra */
    z-index: 1000; /* Assegura que el logo estigui per sobre de la resta de contingut (vídeo, text, etc.) */
    transition: transform 0.3s ease;
}

.logo {
    width: 120px; /* Ajusta la mida del logo */
    height: auto;
    display: block;
}

.logo:hover {
    transform: scale(1.15); /* Petit efecte de zoom en passar el ratolí */
    transition: transform 0.5s ease-in-out;

}

/* --- Menú desplegable al centre --- */
.centered-menu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.menu-toggle {
    background: var(--primary-color);
    color: black;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
    background-color: var(--dark-color);
    color: white;
}

.menu-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.8); /* Aquesta és la posició inicial */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.menu-content.active {
    display: block;
    transform: translateX(-50%) scale(1); /* Es manté la posició en l'estat final */
    opacity: 1;
}

.menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-content ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-content ul li a:hover {
    background-color: var(--primary-color);
    color: black;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.8); /* Afegim el translateX per centrar-ho des del principi */
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* --- Secció Hero amb vídeo de fons --- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

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

.bg-video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
}

/* Transició per a fer un fade-out suau al canviar de vídeo */
.bg-video.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-text {
    z-index: 1;
    animation: slideInUp 1s ease-out;
}

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

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    text-decoration: none;
    background-color: var(--primary-color);
    color: black;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.15);
    background-color: var(--dark-color);
    color: white;
}

/* Animació d'entrada del text */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Secció de Guies (Tours) --- */
.tours-section {
    background-color: var(--secondary-color);
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tour-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tour-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tour-card .tour-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tour-card .tour-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tour-button {
    background-color: var(--text-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.tour-button:hover {
    background-color: var(--primary-color);
}

/* --- Estils per a la nova secció de WhatsApp --- */
.whatsapp-section {
    padding: 80px 50px;
    text-align: center;
    background-color: var(--secondary-color);
}

.whatsapp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.whatsapp-container h2 {
    font-size: 2.5rem;
    margin: 0;
}

.whatsapp-container p {
    font-size: 1.2rem;
    color: var(--text-color);
}

.whatsapp-button {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Secció de Testimonis --- */
.testimonials-section {
    background-color: #F4F8FB; /* Un fons suau per diferenciar la secció */
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

.client-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Per fer la foto rodona */
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color); /* Un petit marc per ressaltar */
}

.rating {
    color: #FFD700; /* Color daurat per a les estrelles */
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.rating span {
    letter-spacing: 5px; /* Espai entre les estrelles */
}

blockquote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin: 0;
}

.client-name {
    font-weight: bold;
    color: var(--text-color);
    margin-top: 15px;
}

/* --- Secció de Curiositats Dinàmiques --- */
.curiosities-section {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden; /* Molt important per amagar el text quan surt */
}

.curiosities-section h2 {
    margin-bottom: 30px;
}

.curiosity-marquee {
    width: 100%;
    overflow: hidden; /* Molt important per amagar el text que surt */
    position: relative;
}

.curiosity-marquee-content {
    display: inline-block;
    white-space: nowrap; /* Impedeix que el text es talli en línies noves */
    padding-right: 20%; /* Per crear l'efecte continuat */
    animation: marquee 25s linear infinite; /* 5s és la velocitat de moviment */
}

/* Defineix l'animació que mou el text de dreta a esquerra */
@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
     0% {
        transform: translateX(0%);
    }
}

/* --- Botó de canvi d'idioma --- */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

#lang-btn {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#lang-btn:hover {
    color: white;
    background-color: var(--dark-color); /* Utilitzem variable per a consistència */
}


/* --- Estils per al nou Peu de Pàgina --- */
footer {
    position: relative;
    overflow: hidden;
    background-color: var(--dark-color);
    color: var(--secondary-color);
    min-height: 400px;
    text-align: center;
    
    /* Afegim les propietats de fons directament al footer */
    background-image: url('footer-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* O scroll si vols que la imatge es mogui amb la pàgina */
}

/* 1. La capa d'ombra semi-transparent */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /*Capa semitransparent */
    z-index: 0; /* Està sobre la imatge però sota el contingut */
}

/* 2. El contingut del footer està a la capa més alta */
.footer-container,
.footer-bottom {
    position: relative;
    z-index: 1; /* La capa més alta, visible per sobre de tot */
}

.footer-container {
    display: absolute;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    align-items: ; /* Afegeix aquesta línia per centrar-ho tot verticalment */
}

.footer-section h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
}

.social-media-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alinea els elements a la dreta */
    min-width: 200px;
}

.contact-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 200px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: scale(1.15);
}

.social-link img {
    border-radius: 50px;
    width: 100%;
    height: auto;
}

.contact-section p, .contact-section a {
    color: var(--secondary-color);
    text-decoration: none;
    line-height: 1.8;
}

.contact-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    color: white;
    font-size: 1rem;
}
