/* Estilos generales */
:root {
    --primary-color: #EB9C29;
    --secondary-color: #222222;
    --accent-color: #f4a261;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333; /* Color de texto principal para modo claro */
    --card-bg: white; /* Fondo para tarjetas en modo claro */
    --border-color: #eee; /* Color de borde en modo claro */
}

body.dark-mode {
    --primary-color-dark-mode: #D48E24; /* Un tono más suave del primario para texto */
    --light-color: #1F1F1F; /* Fondo de secciones en modo oscuro (más oscuro) */
    --dark-color: #121212;  /* Fondo del body/footer en modo oscuro (casi negro) */
    --text-color: #F1F1F1; /* Color de texto principal (más claro) */
    --card-bg: #2C2C2C;   /* Fondo para tarjetas (ligeramente más claro que el fondo) */
    --border-color: #4a4a4a; /* Color de borde en modo oscuro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Ajusta el padding para el header fijo */
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color); /* Cambiamos el fondo base a light-color */
    color: var(--text-color); /* Color de texto base */
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    position: relative; /* Necesario para el fondo animado */
}

/* Fondo animado con resplandor que sigue al cursor */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), hsla(38, 82%, 59%, 0.15), transparent 30%);
    z-index: -1;
    pointer-events: none;
}

body.dark-mode::before {
    background: radial-gradient(circle at var(--x) var(--y), hsla(38, 82%, 59%, 0.1), transparent 40%);
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header y navegación */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info a {
    color: white;
    text-decoration: none;
}

.social-links a {
    color: white;
    margin-left: 15px;
    font-size: 1.1rem;
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex; /* Para alinear la imagen verticalmente si es necesario */
    align-items: center;
}

.logo-img {
    max-height: 50px; /* Ajusta la altura del logo en el header */
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

body:not(.dark-mode) nav a {
    color: #212529; /* Color de texto de navegación específico para modo claro */
}

nav a:hover {
    color: var(--primary-color);
}

/* --- Dropdown Menu (Reconstruido) --- */
.dropdown {
    position: relative; /* Contenedor para el menú absoluto */
}

.dropdown-menu {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: transparent; /* Hacemos el fondo transparente */
    list-style: none;
    padding: 0; /* Reseteamos el padding */
    padding-top: 20px; /* Mantenemos el puente invisible */
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 250px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

/* Contenedor real del menú para el fondo y borde */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: 10px; /* (20px de padding-top) - (10px de padding del item) */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    z-index: -1;
}
/* Al hacer hover sobre el LI, se muestra el UL */
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-icon {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.cta-button {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switcher {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.cta-button:hover {
    background-color: #3e3e3e; /* Un poco más claro que el secundario */
}

body.dark-mode .cta-button {
    background-color: #f1f1f1; /* Botón claro en fondo oscuro */
    color: #121212;
}

.dark-mode-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    transition: all 0.3s;
}

.hamburger-btn {
    display: none; /* Oculto en escritorio */
    width: 30px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1001; /* Encima del resto */
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación del botón de hamburguesa a 'X' */
.menu-open .hamburger-btn span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.menu-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
}
.menu-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/hero1.jpg') no-repeat center center/cover;
    color: white;
    min-height: 800px;
    text-align: center;
    transition: background-image 1.5s ease-in-out; /* Transición suave para el fondo */
    display: flex; /* Para centrar el contenido verticalmente */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: ken-burns 8s ease-out forwards; /* Aplicar la animación */
}

@keyframes ken-burns {
    0% {
        background-size: 100% auto;
    }
    100% {
        background-size: 115% auto;
    }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #3e3e3e; /* Un poco más claro que el secundario */
}

body.dark-mode .btn-primary {
    background-color: #f1f1f1; /* Botón claro en fondo oscuro */
    color: #121212;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    padding: 12px 25px;
    border: 2px solid white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--card-bg);
    color: var(--dark-color);
}

/* Features Section */
.features-section {
    background-color: var(--card-bg); /* Fondo blanco en modo claro */
    transition: background-color 0.3s;
}

.features-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.feature-card {
    flex: 1;
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s ease;
    background-color: var(--light-color); /* Tarjetas con fondo gris claro en modo claro */
    color: var(--text-color);
    border: 1px solid transparent;
}

.feature-card:hover,
.feature-card.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.feature-card:hover .feature-icon,
.feature-card.active .feature-icon {
    color: white;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: color 0.4s ease;
}

/* Secciones generales */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color); /* Naranja en modo claro */
    margin-bottom: 15px;
}

body.dark-mode .section-title h2 {
    color: var(--primary-color-dark-mode); /* Naranja suave en modo oscuro */
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

body.dark-mode .section-title p {
    color: #aaa;
}

/* Texto animado para títulos */
.animated-text {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 4s linear infinite;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Proceso */
.process {
    background-color: var(--card-bg); /* Usar variable para que se adapte */
}

/* Aseguramos que el fondo de la sección "process" sea oscuro en dark mode */
body.dark-mode .process {
    background-color: var(--dark-color);
}

body.dark-mode .services-header-right p {
    color: #aaa;
}

/* Servicios */
.services {
    background-color: var(--light-color);
}

.services-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.services-header-left h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-color);
}

.services-header-left p {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.services-header-right p {
    margin-bottom: 25px;
    color: #666;
}

.services-header-right .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.services-header-right .btn-primary:hover {
    background-color: var(--secondary-color);
}

.services-grid-interactive {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.service-item-interactive {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-item-interactive:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 10;
}

.service-card-interactive {
    position: relative;
    height: 250px; /* Altura fija para la parte de la imagen */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
    background-size: cover;
    background-position: center;
}

.service-card-interactive::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    transition: background 0.3s;
}

.service-card-interactive:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%);
}

.service-card-interactive h3 {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
}

.service-description-interactive {
    background-color: var(--card-bg);
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    border-top: 3px solid transparent;
}

.service-item-interactive:hover .service-description-interactive {
    border-top-color: var(--primary-color);
}

.service-description-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out 0.2s, transform 0.4s ease-out 0.2s;
    padding: 25px;
}

.service-item-interactive:hover .service-description-content,
.service-item-interactive.active .service-description-content {
    opacity: 1;
    transform: translateY(0);
}

/* --- Nueva Sección de Proceso Animada --- */
.process-timeline {
    position: absolute;
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* La línea central de la línea de tiempo */
.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    /* Animación para "dibujar" la línea */
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.5s ease-in-out;
}

.process-timeline.is-visible::after {
    transform: scaleY(1);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0; /* Oculto por defecto para la animación */
    transition: opacity 0.6s 0.5s, transform 0.6s 0.5s;
}

/* Contenedores a la izquierda */
.timeline-item.left {
    left: 0;
    transform: translateX(-100px);
}

/* Contenedores a la derecha */
.timeline-item.right {
    left: 50%;
    transform: translateX(100px);
}

/* Animación de entrada cuando es visible */
.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Círculo en la línea de tiempo */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--card-bg);
    border: 4px solid var(--primary-color);
    top: 35px;
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-item:hover::after {
    transform: scale(1.2);
}

/* Contenido de la tarjeta */
.timeline-content {
    padding: 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.timeline-step-number {
    position: absolute;
    top: -20px;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.15;
    z-index: 0;
}

.timeline-item.left .timeline-step-number { right: 20px; }
.timeline-item.right .timeline-step-number {
    right: 20px; /* Alineado a la derecha */
    left: auto;  /* Anulamos el posicionamiento izquierdo */
}

.timeline-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.timeline-content p {
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* --- Showcase Section --- */
.showcase-section {
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('images/fondo.jpg') no-repeat center center/cover;
    /* background-attachment: fixed; // Parallax eliminado */
    color: white;
    padding: 160px 0; /* Mayor altura */
    position: relative;
    overflow: hidden;
}

.showcase-container {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative; /* Añadido para el z-index de los hijos */
}

.showcase-text {
    flex: 1;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.showcase-text.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.showcase-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.showcase-text p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #e0e0e0;
}

.showcase-text .btn-primary {
    background-color: var(--primary-color);
}

.showcase-image {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.showcase-image.is-visible {
    opacity: 1;
    transform: scale(1);
    animation: float-animation 6s ease-in-out infinite;
}

.showcase-image img {
    width: 100%;
    border-radius: 15px;
    transition: transform 0.4s ease-in-out; /* Transición para el hover */
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 5px solid white;
}

.showcase-image:hover img {
    transform: scale(1.05) rotate(-2deg); /* Efecto de hover */
}

@keyframes float-animation {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* --- Portfolio Section --- */
.portfolio-section {
    background-color: var(--card-bg); /* Fondo blanco en modo claro, oscuro en modo oscuro */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.portfolio-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-grid-item:hover img {
    transform: scale(1.1); /* Aplica el zoom del hover */
}

body:not(.dark-mode) .portfolio-section {
    background-color: #ffffff; /* Forzar fondo blanco puro en modo claro */
}

body.dark-mode .portfolio-section {
    background-color: var(--dark-color);
}

/* --- About Us Section --- */
.about-section {
    background-color: var(--light-color);
    overflow: hidden; /* Para contener las animaciones */
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr; /* Tres columnas para el nuevo layout */
    gap: 60px;
    align-items: center;
}

.about-content .section-title h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.about-main-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.about-secondary-text {
    color: #666;
}

body.dark-mode .about-secondary-text {
    color: #aaa;
}

.about-image-composition {
    position: relative;
    height: 450px; /* Altura ajustada */
}

.about-img {
    position: absolute;
    border-radius: 0; /* Bordes rectos para un look más nítido */
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-img:hover {
    transform: scale(1.03) !important; /* Prioridad al hover */
    z-index: 15;
}

/* Imagen pequeña con marco */
.about-img.img-1 {
    width: 65%; /* Más ancha */
    height: 65%; /* Menos alta para ser más cuadrada */
    top: 0;
    left: 0;
    border: 12px solid white; /* Marco un 20% más grueso */
    z-index: 12;
}

/* Imagen principal */
.about-img.img-2 {
    width: 75%;
    height: 100%;
    right: 0;
    bottom: 0;
    top: auto; /* Anulamos el top previo */
    z-index: 10;
}

/* Bloque de color de fondo */
.image-bg-block {
    position: absolute;
    background-color: var(--primary-color);
    width: 75%;
    height: 100%;
    top: -15px; /* Desplazado */
    right: -15px; /* Desplazado */
    border-radius: 0; /* Forma de cuadrado nítido */
    z-index: 8;
}

/* Contenedor para garantías e imagen lateral */
.about-guarantees-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    height: 100%;
}

.about-side-image {
    width: 100%;
    border-radius: 0; /* Bordes rectos */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-img.img-3 {
    width: 100%;
    height: 100%; /* Para que llene el contenedor */
    object-fit: cover; /* Asegura que la imagen cubra el espacio sin deformarse */
    display: block;
    position: static; /* La imagen ya no es absoluta */
}

/* Lista de garantías animada */
.about-guarantees-list {
    position: relative;
    padding-left: 30px; /* Espacio para la línea */
}

/* Línea vertical de la mini-timeline */
.about-guarantees-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Línea de progreso animada */
.about-guarantees-list::after {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    height: 0;
    transition: height 1.5s ease-out 0.3s;
}

.about-guarantees-list.is-visible::after {
    height: calc(100% - 20px);
}

.guarantee-item {
    background-color: var(--card-bg);
    padding: 15px 20px 15px 50px; /* Espacio para el número */
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
}

/* Círculo en la línea */
.guarantee-item::before {
    content: '';
    position: absolute;
    left: -30px; /* (30px de padding) - (15px/2 de ancho) */
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background-color: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.guarantee-item.is-visible:hover {
    transform: scale(1.03); /* Efecto de escala al pasar el cursor */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.guarantee-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.guarantee-step-number {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.2;
}

.guarantee-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 10px;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: #F8F9FA;
    position: relative; /* Necesario para los elementos absolutos */
    overflow: hidden; /* Para contener las formas */
}

body.dark-mode .testimonials-section {
    background-color: var(--dark-color);
}

body.dark-mode .testimonials-section .section-title p {
    color: #aaa;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    position: relative; /* Para que las tarjetas estén sobre las formas */
    z-index: 1;
}

.google-review-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.google-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
}

.review-author-info {
    display: flex;
    flex-direction: column;
}

.review-author-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.review-rating {
    color: var(--primary-color);
    font-size: 1rem;
}

.review-text {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- FAQ Section --- */
.faq-section {
    background-color: var(--light-color);
}

body:not(.dark-mode) .faq-section {
    background-color: #ffffff; /* Forzar fondo blanco puro en modo claro */
}

.faq-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Invertimos las proporciones */
    gap: 60px;
    align-items: center;
}

.faq-image-container {
    position: relative;
}

.faq-image-bg-block {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 12px;
    top: -15px;
    left: 15px;
    z-index: 1;
}

.faq-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
}

.faq-image:hover {
    transform: scale(1.03);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-question {
    background-color: var(--card-bg);
    padding: 20px 25px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s;
    position: relative; /* Necesario para la animación del borde */
}

/* Animación de borde en hover */
.faq-question::before,
.faq-question::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    box-sizing: border-box;
    transition: width 0.2s ease, height 0.2s ease 0.2s;
}

.faq-question::before {
    top: 0;
    left: 0;
    border-top: 2px solid transparent;
    border-left: 2px solid transparent;
}

.faq-question::after {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid transparent;
    border-right: 2px solid transparent;
}

.faq-question i {
    transition: transform 0.4s ease;
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    color: #666;
}

body.dark-mode .faq-answer {
    color: #aaa;
}

.faq-item.active .faq-answer {
    padding: 25px;
    max-height: 500px;
}

.faq-item.active .faq-question {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.faq-item:not(.active) .faq-question:hover::before,
.faq-item:not(.active) .faq-question:hover::after {
    width: 100%;
    height: 100%;
    border-color: var(--primary-color);
}

body.dark-mode .faq-item.active .faq-question {
    background-color: var(--primary-color-dark-mode);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Formulario de contacto */
.contact-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/fondo-contact.jpg') no-repeat center center/cover;
    color: white;
    padding: 100px 0;
}

.contact-section .section-title h2,
.contact-section .section-title p {
    color: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-details {
    margin-top: 30px;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.contact-detail i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-detail a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-detail a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--light-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Hacemos la columna del logo más ancha */
    gap: 40px; /* Reducimos el espacio entre columnas en general */
    margin-bottom: 40px;
}

.footer-column h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
    display: flex; /* Para alinear iconos y texto */
    align-items: center; /* Centrado vertical */
}

.footer-links i {
    margin-right: 10px; /* Espacio entre el icono y el texto */
}

.footer-links a {
    color: #ccc; /* Color de enlaces en modo claro */
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-logo-img {
    max-height: 60px; /* Aumentamos el tamaño del logo */
    width: auto;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        text-align: center; /* Centramos el contenido en móvil */
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero {
        animation: none; /* Desactiva el Ken Burns en móvil */
        background-size: cover; /* Asegura que la imagen cubra el espacio */
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        flex-direction: column;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .services-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* --- Estilos del Menú de Hamburguesa --- */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--card-bg);
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
    }

    .menu-open nav {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        gap: 30px;
        text-align: left;
        width: 100%;
        padding: 0 30px; /* Añadimos padding horizontal para que no se pegue a los bordes */
    }

    nav a {
        font-size: 1.8rem;
    }

    .hamburger-btn {
        display: flex; /* Muestra el botón en móvil */
    }

    .services-grid-interactive {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
    }

    .service-item-interactive {
        /* Reseteamos el grid-column para que cada item ocupe una fila */
        grid-column: auto !important;
    }

    /* --- Responsive para la nueva línea de tiempo --- */
    .process-timeline::after {
        left: 31px; /* Mueve la línea a la izquierda */
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left, .timeline-item.right {
        left: 0;
        transform: translateX(0); /* Resetea la animación de entrada para móvil */
    }

    .timeline-item::after {
        left: 21px; /* Posiciona el círculo sobre la línea */
    }

    .timeline-item.right::after {
        display: none;
    }

    /* --- Responsive para Showcase Section --- */
    .showcase-container {
        flex-direction: column;
        text-align: center;
    }

    .showcase-image {
        margin-top: 40px;
    }

    .portfolio-card-wrapper {
        padding: 25px;
    }

    /* --- Responsive para About Us Section --- */
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-image-composition {
        margin-top: 40px;
        height: 400px; /* Reducir altura en móvil */
    }

    .about-guarantees-container {
        justify-content: flex-start;
    }

    .about-guarantees-wrapper {
        margin-top: 40px;
    }

    /* --- Responsive para FAQ Section --- */
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-image-container {
        order: 2; /* Mueve la imagen debajo del acordeón */
        margin-top: 40px;
    }

    /* --- Ajustes para el Dropdown en móvil --- */
    .menu-open .dropdown-menu {
        display: none; /* Asegura que esté oculto por defecto */
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding: 15px 0 0 0; /* Quitamos el padding izquierdo para alinear */
        background-color: transparent;
        min-width: auto;
        transform: none;
        opacity: 1;
        transition: none;
        text-align: left; /* Alineado a la izquierda */
    }

    .menu-open .dropdown-menu::before {
        display: none; /* Ocultamos el fondo del dropdown en móvil */
    }

    /* Desactivar el hover del dropdown en móvil */
    .dropdown:hover .dropdown-menu {
        display: none;
    }
}

/* --- Pigment Gallery Page --- */
.pigment-gallery-section {
    background-color: var(--light-color);
    padding: 80px 0;
}

.pigment-gallery-section .section-title h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pigment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
    gap: 30px;
}

.pigment-card {
    background-color: var(--card-bg);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Para el efecto de borde animado */
}

/* Efecto de borde animado similar al FAQ */
.pigment-card::before,
.pigment-card::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    box-sizing: border-box;
    transition: width 0.2s ease, height 0.2s ease 0.2s;
}

.pigment-card::before {
    top: 0;
    left: 0;
    border-top: 3px solid transparent;
    border-left: 3px solid transparent;
}

.pigment-card::after {
    bottom: 0;
    right: 0;
    border-bottom: 3px solid transparent;
    border-right: 3px solid transparent;
}

.pigment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: transparent; /* Oculta el borde base para que se vea la animación */
}

.pigment-image-wrapper {
    height: 300px; /* Tarjetas más altas */
    overflow: hidden;
}

.pigment-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pigment-card:hover img {
    transform: scale(1.1);
}

.pigment-card:hover::before,
.pigment-card:hover::after {
    width: 100%;
    height: 100%;
    border-color: var(--primary-color);
}

.pigment-info {
    padding: 20px;
    text-align: center;
}

.pigment-info h3 {
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Ajustes específicos para las galerías de pigmentos líquidos para que las imágenes no se corten */
.liquid-metallic-page .pigment-image-wrapper,
.liquid-color-page .pigment-image-wrapper {
    height: auto; /* Quitamos la altura fija para que el contenedor se adapte a la imagen */
    overflow: visible; /* Quitamos el recorte del contenedor */
}
.liquid-metallic-page .pigment-card img,
.liquid-color-page .pigment-card img {
    object-fit: cover; /* Revertimos a cover para que llene el espacio */
    height: auto; /* La altura se ajustará automáticamente a la proporción del ancho */
}

@media (max-width: 992px) {
    .pigment-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 576px) {
    .pigment-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
}

/* --- Pigment Modal (Modern Card Layout) --- */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Cambios para la animación de aparición */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px; /* Tamaño del popup ajustado */
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: zoom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-image-container {
    background-color: #f0f0f0; /* Un fondo sutil si la imagen no es cuadrada */
}

body.dark-mode .modal-image-container {
    background-color: var(--dark-color);
}

.modal-content { /* La imagen en sí */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-details {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-around; /* Espacio para los botones */
    align-items: flex-start;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 2rem; /* Tamaño del icono reducido */
    color: var(--primary-color);
}

#modalCaption {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.3;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex-grow: 1;
    text-align: center;
    padding: 12px 15px;
}

/* Estilo específico para el botón secundario dentro del modal */
.modal-actions .btn-secondary {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.modal-actions .btn-secondary:hover {
    background-color: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #888; /* Color gris en modo claro */
    opacity: 0.6;
    font-size: 35px;
    font-weight: bold;
    transition: opacity 0.3s, transform 0.3s;
    cursor: pointer;
    z-index: 10; /* Asegura que el botón esté por encima de todo */
}

body.dark-mode .close-modal {
    color: white; /* Color blanco en modo oscuro */
}

.close-modal:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

@media (max-width: 768px) {
    .modal-container {
        grid-template-columns: 1fr; /* Apila la imagen sobre el texto */
        max-height: 90vh;
        overflow-y: auto; /* Permite scroll si el contenido es muy alto */
    }
    .modal-details {
        padding: 25px;
        align-items: center;
    }
    #modalCaption {
        font-size: 1.5rem;
        text-align: center;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-title-wrapper {
        flex-direction: column;
    }
}

/* --- Subpage Hero --- */
.subpage-hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/fondo.jpg') no-repeat center center/cover;
    color: white;
    padding: 120px 0;
    text-align: center;
    animation: ken-burns 12s ease-out forwards;
}

.subpage-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.subpage-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #e0e0e0;
}

@media (max-width: 768px) {
    .subpage-hero {
        padding: 80px 0;
    }
    .subpage-hero h1 {
        font-size: 2.2rem;
    }
}

/* --- Pagination --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.page-btn {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.page-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background-color: var(--light-color);
}

/* --- Estilos específicos para el Lightbox del Portafolio --- */
/* Hacemos el contenedor del modal transparente para que no tenga fondo blanco */
#portfolioModal .modal-container {
    background-color: transparent;
    box-shadow: none;
    /* Eliminamos el grid para que la imagen flote libremente */
    display: block;
    max-width: 90vw;
    max-height: 90vh;
}

/* La imagen dentro del lightbox del portafolio */
#portfolioModal .modal-content {
    max-width: 1200px; /* Tamaño máximo horizontal para que no sea demasiado ancha en pantallas grandes */
    max-height: 85vh; /* Reducimos la altura máxima para que no ocupe toda la pantalla */
    object-fit: contain;
    border-radius: 8px; /* Bordes redondeados sutiles para la imagen */
    box-shadow: none; /* Eliminamos la sombra para que la imagen flote sin efectos */
}

#portfolioModal .close-modal {
    color: white; /* Aseguramos que la 'X' sea siempre blanca y visible */
}
}