:root {
    --color-dark-charcoal: #cb997e;
    --color-soft-light-gray: #ddbea9;
    --color-muted-gold: #c15fc5;
    --color-primary-text: #555555;
    --color-white: #ffe8d6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--color-primary-text);
    line-height: 1.6;
    background-color: var(--color-white);
}

a {
    text-decoration: none;
    color: var(--color-muted-gold);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-dark-charcoal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--color-dark-charcoal);
    font-weight: 700;
}

.container {
    max-width: 90vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #cb997e88; /* Semi-transparent dark charcoal */
    /*padding: 10px 0;*/
    position: fixed; /* Header floats over content from the start */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 55px; /* Defined height for consistency */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    color: var(--color-muted-gold);
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.nav-links ul {
    list-style: none;
    display: flex;
}

.nav-links ul li {
    margin-left: 40px;
}

.nav-links ul li a {
    color: var(--color-white);
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
}

.nav-links ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-muted-gold);
    transition: width 0.3s ease;
}

.nav-links ul li a:hover::after {
    width: 100%;
}

.social-icons a {
    color: var(--color-white);
    margin-left: 20px;
    font-size: 1.2em;
}

.social-icons a:hover {
    color: var(--color-muted-gold);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh; /* Make hero fill the entire viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
    /* The image will be visible immediately from top: 0 */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./img/jv_bnr_0001.png') center/cover no-repeat;
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 600px;
    position: relative;
    left: -25vw;
    top: 17vh;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--color-muted-gold);
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: var(--color-soft-light-gray);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-buttons .button {
    display: inline-block;
    background-color: var(--color-muted-gold);
    color: var(--color-dark-charcoal);
    padding: 15px 30px;
    border-radius: 5px;
    margin: 0 15px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-buttons .button:hover {
    background-color: var(--color-white);
    color: var(--color-muted-gold);
}

/* ===== ESTILOS PARA LA SECCIÓN DE LOGOS Y CARRUSEL ===== */

.client-logos-section {
    padding: 80px 0; /* Espaciado vertical */
    background-color: #f5f5f5; /* Un fondo gris claro para destacar la sección */
    text-align: center;
}

.client-logos-section h2 {
    font-size: 2.5rem;
    color: var(--color-muted-gold);
    margin-bottom: 60px;
}

/* El contenedor principal del carrusel */

.carousel-nav-btn
{
  background-color: var(--color-muted-gold);
  width: 40px;
  border: none;
  padding: 4px 4px 4px 4px;
  border-radius: 5px;
}
.carousel-nav-btn:hover
{
  opacity: 0.7;
  width: 40px;
  border: none;
  padding: 4px 4px 4px 4px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.logo-carousel {
    width: 100%;
    overflow: hidden; /* Oculta todo lo que se salga del contenedor */
    position: relative;
    /* Efecto de difuminado en los bordes para un acabado más suave */
    mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
}

/* La cinta que contiene todos los logos y que se animará */
.logo-track {
    display: flex;
    /* Ancho total: número de logos x ancho de cada logo */
    /* Para 10 logos de 200px de ancho: 2 x 10 x 200px = 4000px */
    width: calc(400px * 20); /* Ajusta este valor: 200px * (Nº de logos * 2) */
    animation: scroll 30s linear infinite;
    transition: all 0.3s ease;
    will-change: transform;
}

/* Pausar la animación al pasar el ratón por encima */
.logo-carousel:hover .logo-track {
    animation-play-state: paused;
}

/* El contenedor de cada logo individual */
.logo-item {
    width: 400px; /* Ancho fijo para cada logo */
    height: 350px; /* Altura fija */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px; /* Espaciado entre logos */
}

/* La imagen del logo en sí */
.logo-item img {
    max-width: 100%;
    max-height: 350px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

/* Efecto al pasar el ratón sobre un logo */
.logo-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* La animación que mueve la cinta de logos */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Mueve la cinta la mitad de su ancho total (la longitud de la primera lista de logos) */
        transform: translateX(calc(-200px * 10)); /* Ajusta este valor: -200px * Nº de logos */
    }
}

/* About Section */
.about-section {
    background-color: var(--color-white);
    padding: 80px 0;
    width: 99%;
    text-align: center;
    /* Add margin-top to push this section down below the fixed hero */
    margin-top: 0vh; /* Adjust this value to exactly match hero height */
}

.about-section h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--color-muted-gold);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 99%;
    padding-left: 30px;
    padding-right: 30px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 2;
    text-align: justify;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* Values Section */
.values-section {
    background-color: var(--color-soft-light-gray);
    padding: 80px 0;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
}

.values-section h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--color-dark-charcoal);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.value-item i {
    font-size: 2em;
    color: var(--color-muted-gold);
    margin-bottom: 15px;
}

.value-item h3 {
    font-size: 1.5em;
    color: var(--color-dark-charcoal);
    margin-bottom: 10px;
}

.value-item p {
    font-size: 1em;
    color: var(--color-primary-text);
}

/* Sección de Servicios */
.services-section {
    padding: 80px 0;
    background-color: var(--color-white);
    text-align: center;
}

.services-section h2 {
    font-size: 2.5em;
    margin-bottom: 60px;
    color: var(--color-muted-gold);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: var(--color-soft-light-gray);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-item i {
    font-size: 3em;
    color: var(--color-muted-gold);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.8em;
    color: var(--color-dark-charcoal);
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1em;
    color: var(--color-primary-text);
}

/* Responsive para la sección de servicios */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ESTILOS PARA CARRUSEL DE IMÁGENES DE RESEÑAS ===== */

.image-reviews-section {
    padding: 80px 0;
    background-color: var(--color-white);
    text-align: center;
}

.image-reviews-section h2 {
    font-size: 2.5em;
    color:  var(--color-muted-gold);
    margin-bottom: 60px;
}

.reviews-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
}

.reviews-track {
    display: flex;
    /* Ancho total: (Nº de imágenes * 2) * ancho de cada item */
    width: calc(20 * 500px);
    animation: scroll-reviews 60s linear infinite;
    will-change: transform;
}

.reviews-carousel:hover .reviews-track {
    animation-play-state: paused;
}

.review-image-item {
    width: 500px; /* Ancho de cada imagen en el carrusel */
    padding: 0 15px; /* Espacio entre imágenes */
    flex-shrink: 0;
}

.review-image-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

@keyframes scroll-reviews {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Mueve la cinta la mitad de su ancho total (la longitud de la primera lista de imágenes) */
        transform: translateX(calc(-10 * 500px));
    }
}

/* Estilo para los elementos de la galería */
.gallery-grid {
    /* Usamos column-count para crear un mosaico que respeta la altura de cada imagen */
    column-count: 3; /* 3 columnas en pantallas grandes */
    column-gap: 15px; /* Espacio entre columnas */
}

.gallery-section h2{
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-muted-gold);
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px; /* Espacio vertical entre imágenes */
    break-inside: avoid; /* Evita que una imagen se parta entre dos columnas */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #000;
}

/* LA CLAVE: Sin altura fija. La imagen manda. */
.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto; /* Mantiene el ratio de aspecto original */
    display: block; /* Evita espacios extra debajo de la imagen */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
    opacity: 0.4;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2.5em;
    opacity: 0;
    transition: opacity: 0.3s ease;
    background-color: rgba(0,0,0,0.4);
    pointer-events: none; /* Permite que el clic llegue al .gallery-item */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}


/* --- 2. Estilos CORREGIDOS para el Visor (Lightbox) --- */

.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto; /* El ancho se adapta al contenido */
    height: auto; /* La altura se adapta al contenido */
    max-width: 90%; /* Ocupa como máximo el 90% del ancho de la pantalla */
    max-height: 90vh; /* Ocupa como máximo el 90% de la altura de la pantalla */
}

/* LA CLAVE: Dejamos que el navegador calcule el ratio correcto */
.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh; /* La altura máxima es el 90% de la pantalla */
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--color-soft-light-gray);
}

/* --- 3. Responsive para el Mosaico --- */

/* Para tablets, 4 columnas */
@media (max-width: 768px) {
    .gallery-grid {
        column-count: 4;
    }
}

/* Para tablets más pequeñas, 3 columnas */
@media (max-width: 768px) {
    .gallery-grid {
        column-count: 3;
    }
}


/* Para móviles, 2 columna */
@media (max-width: 480px) {
    .gallery-grid {
        column-count: 2;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Contact Section (Simplified for this example) */
.contact-section {
    background-color: var(--color-white);
    padding: 80px 0;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--color-dark-charcoal);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--color-soft-light-gray);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-dark-charcoal);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 1em;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .checkbox-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-form .checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 5px;
}

.contact-form .checkbox-group label {
    font-weight: 400;
    font-size: 0.9em;
    color: var(--color-primary-text);
}

.contact-form button[type="submit"] {
    background-color: var(--color-muted-gold);
    color: var(--color-dark-charcoal);
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background-color: var(--color-dark-charcoal);
    color: var(--color-white);
}

/* Footer */
footer {
    background-color: #cb997e88;
    color: var(--color-soft-light-gray);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

footer .footer-links ul li {
    margin: 0 15px;
}

footer .footer-links ul li a {
    color: var(--color-dark-charcoal);
    font-size: 0.95em;
    transition: color 0.3s ease;
}

footer .footer-links ul li a:hover {
    color: var(--color-muted-gold);
}

footer p {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

footer a:hover {
    color: var(--color-muted-gold);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-links ul {
        display: none; /* Hide for mobile, consider a hamburger menu with JS */
    }

    .hero {
        height: 100vh; /* Full viewport height */
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1.2em;
    }

    .hero-buttons .button {
        padding: 10px 20px;
        font-size: 1em;
        margin: 10px 5px;
    }

    /* Adjust margin-top for .about-section when mosaic is introduced */
    .about-section {
        margin-top: 0; /* No push from hero, as mosaic is in between */
    }

    .client-mosaic-section {
        padding: 40px 10px; /* Reduced padding for smaller screens */
    }

    .mosaic-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Más columnas para móvil */
        gap: 15px;
    }

    .mosaic-item.main-image {
        grid-column: span 2; /* Ocupa 2 columnas en móvil para la imagen principal */
        grid-row: span 1;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        order: -1;
        margin-bottom: 30px;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .social-icons {
        margin-left: auto;
    }
}

/* ===== ESTILOS PARA PÁGINAS LEGALES ===== */
.legal-content-container {
    padding: 120px 20px 60px 20px; /* Espaciado: 120px arriba para dejar sitio al header fijo */
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-white);
    color: var(--color-primary-text);
}

.legal-text {
    text-align: left;
}

.legal-text h1 {
    font-size: 2.2em;
    color: var(--color-dark-charcoal);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-soft-light-gray);
    padding-bottom: 10px;
}

.legal-text h2 {
    font-size: 1.6em;
    color: var(--color-dark-charcoal);
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal-text h3 {
    font-size: 1.2em;
    color: var(--color-primary-text);
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-text p, .legal-text li {
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.legal-text ul {
    list-style-position: inside;
    padding-left: 20px;
}

.legal-text a {
    color: var(--color-muted-gold);
    text-decoration: underline;
}

.legal-text a:hover {
    color: var(--color-dark-charcoal);
}

.legal-text strong {
    color: var(--color-primary-text);
}
