:root {
    --primary-color: #0f172a; 
    --accent-color: #ea580c;  
    --accent-hover: #c2410c;
    --text-color: #334155;    
    --bg-color: #f8fafc;      
    --white: #ffffff;
    --border-color: #e2e8f0;
    
    /* Sombras más definidas y corporativas */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Bordes más rectos/serios en vez de circulares */
    --radius-btn: 6px;
    --radius-card: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- CABECERA --- */
header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--white);
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-color);
}

.logo h1 { font-size: 1.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; }
.logo span { color: var(--accent-color); }

nav ul { list-style: none; display: flex; gap: 30px; }
nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

nav a:hover, nav a.active { color: var(--accent-color); }

/* --- ESTRUCTURA PRINCIPAL --- */
main { flex: 1; padding: 3rem 5%; }

.page-section { display: none; animation: fadeIn 0.4s ease-out; }
.page-section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.subtitle { text-align: center; margin-bottom: 3.5rem; color: #64748b; font-size: 1.1rem; }

/* --- BOTONES --- */
.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: var(--radius-btn); /* Bordes más rectos */
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
}
.cta-button:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* --- INICIO: Hero & Features --- */
.hero {
    position: relative; 
    overflow: hidden; 
    text-align: center;
    padding: 7rem 2rem;
    color: var(--white);
    border-radius: var(--radius-card); 
    margin-bottom: 4rem;
}

/* El video ocupando todo el fondo */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* capa oscura */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(65, 73, 95, 0.75), rgba(45, 56, 82, 0.9));
    z-index: 2;
}

/* contenedor para que el texto se quede por encima de todo */
.hero-content {
    position: relative;
    z-index: 3;
}

.hero h2 { 
    color: var(--white); 
    font-size: 3rem; 
    margin-bottom: 1.5rem; 
}

.hero p { 
    font-size: 1.25rem; 
    margin-bottom: 2.5rem; 
    font-weight: 300; 
    padding: 0rem 5rem; 
}

.calidad-section {
    margin-bottom: 5rem;
    padding: 2rem;
}

/* Usamos Flexbox para forzar la fila */
.calidad-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;            
    flex-direction: row;      
    align-items: center;       
    justify-content: center;
    gap: 4rem;
}


.calidad-media {
    width: 50%;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-card); 
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calidad-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calidad-texto {
    width: 50%;
}

.calidad-texto h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.calidad-texto p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.calidad-texto ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.calidad-texto li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* --- RESPONSIVE MOVILES (Menos de 768px) --- */
@media (max-width: 768px) {
    .calidad-contenedor {
        flex-direction: column; /* uno debajo del otro */
        gap: 2rem;
    }
    
    .calidad-media, 
    .calidad-texto {
        width: 100%; /* ocupan todo el ancho */
    }
}

/* --- CARRUSEL DE SERVICIOS (SWIPER) --- */
.features-carousel {
    width: 100%;
    padding-bottom: 60px;
    margin-bottom: 5rem;
}

.swiper-slide {
    height: auto; 
}

.feature-card-large {
    background: var(--white);
    padding: 4rem 2.5rem; 
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    text-align: center;
    border-top: 5px solid var(--accent-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.feature-card-large:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card-large h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.4rem; 
}

.feature-card-large p {
    font-size: 1.1rem;
    color: var(--text-color);
}


.swiper-pagination-bullet-active {
    background: var(--accent-color) !important;
}


/* --- INICIO: Pasos de trabajo --- */
.work-process { margin-bottom: 5rem; }
.steps-container { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.step {
    text-align: center; 
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    /* En móviles ocupará el 100% por defecto */
    width: 100%; 
}
.step-number {
    background: var(--primary-color);
    color: var(--white);
    width: 50px; height: 50px;
    line-height: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem auto;
    border-radius: 4px;
}

/* --- INICIO: Acordeón FAQ  --- */
.faq-section { max-width: 800px; margin: 0 auto 4rem auto; }
.accordion { display: flex; flex-direction: column; gap: 15px; }

.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.accordion-btn {
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    padding: 20px 25px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

/* Color naranja al abrir la pregunta */
.accordion-btn.active {
    color: var(--accent-color);
}

/* Estilos de la flecha */
.chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #94a3b8;
    flex-shrink: 0;
}

/* Animación de rotación de la flecha y cambio de color al abrir */
.accordion-btn.active .chevron {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.accordion-content {
    background-color: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content p {
    padding: 0 25px 20px 25px;
    color: var(--text-color);
    margin: 0;
    border-top: 1px solid transparent; 
}

/* --- INICIO: CATÁLOGO COLORES RAL --- */
.ral-colors-section {
    margin-bottom: 5rem;
    max-width: 850px; 
    margin-left: auto;
    margin-right: auto;
}

.ral-grid {
    display: grid;
    /* Forzamos EXACTAMENTE 5 columnas siempre (quedan 5 arriba y 5 abajo) */
    grid-template-columns: repeat(5, 1fr);
    gap: 15px; /* Espacio un poco más pequeño */
    padding: 10px;
}

.ral-swatch {
    height: 85px; 
    border-radius: var(--radius-btn); 
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.ral-swatch:hover {
    transform: translateY(-5px) scale(1.05); 
    box-shadow: var(--shadow-md);
    z-index: 2;
}

/* Etiqueta blanca que va dentro del color */
.ral-swatch span {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-size: 0.75rem; 
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    pointer-events: none; 
}

/* --- INICIO: CONTADORES ANIMADOS --- */
.stats-container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin: 3rem auto;
    flex-wrap: wrap;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-box {
    text-align: center;
    min-width: 160px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-color); 
    line-height: 1;
}

.stat-plus {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    vertical-align: top;
    margin-left: 2px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .stats-container {
        gap: 20px;
        padding: 1.5rem 0;
    }
    .stat-box {
        width: 40%; 
    }
    .stat-number {
        font-size: 2.8rem;
    }
}

/* --- NOSOTROS --- */
.about-container { max-width: 900px; margin: 0 auto; }
.history-content { background: var(--white); padding: 3.5rem; border-radius: var(--radius-card); box-shadow: var(--shadow-sm); margin-bottom: 4rem; border: 1px solid var(--border-color); }
.history-content p { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--text-color); }

.values-title { text-align: center; font-size: 2rem; color: var(--primary-color); margin-bottom: 2rem; text-transform: uppercase; }
.values-grid { display: flex; gap: 25px; flex-wrap: wrap; }
.value-item {
    background: var(--white);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-card);
    flex: 1; min-width: 250px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}
.value-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--accent-color); }
.value-icon { width: 50px; height: 50px; margin: 0 auto 15px auto; color: var(--accent-color); }
.value-item h4 { color: var(--primary-color); font-size: 1.3rem; margin-bottom: 10px; text-transform: uppercase; }

/* --- TRABAJOS (Bento Grid) --- */

.mosaico-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 290px);
    gap: 15px; 
    margin-bottom: 4rem; 
}

.mosaico-item {
    position: relative;
    border-radius: var(--radius-card); 
    overflow: hidden;
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--border-color); 
    background: #0f172a; 
    cursor: pointer;
}

.lightbox {
    display: none; 
    position: fixed;
    z-index: 9999; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95); 
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain; 
}

.lightbox-caption {
    color: #ffffff;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #ffffff;
    font-size: 55px; 
    font-weight: 100; 
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 
    line-height: 1; 
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease; 
}

/* Efecto al pasar el ratón: cambia color y crece */
.lightbox-close:hover {
    transform: scale(1.1);
    color: #e2e8f0; 
}

.mosaico-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.mosaico-item:hover img {
    transform: scale(1.08); 
}

/* texto sobre la imagen */
.mosaico-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 15px 15px 15px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
    pointer-events: none; 
}

/* Posicionamiento de las 7 fotos en PC */
.foto-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.foto-2 { grid-column: 3 / 4; grid-row: 1 / 2; }
.foto-3 { grid-column: 4 / 5; grid-row: 1 / 2; }
.foto-4 { grid-column: 3 / 5; grid-row: 2 / 3; }
.foto-5 { grid-column: 1 / 2; grid-row: 3 / 4; }
.foto-6 { grid-column: 2 / 3; grid-row: 3 / 4; }
.foto-7 { grid-column: 3 / 5; grid-row: 3 / 4; }

/* Adaptación para móviles */
@media (max-width: 768px) {
    .mosaico-grid {
        grid-template-columns: 1fr; 
        grid-template-rows: auto;
        gap: 20px;
    }
    
    .foto-1, .foto-2, .foto-3, .foto-4, .foto-5, .foto-6, .foto-7 {
        grid-column: 1 / -1;
        grid-row: auto;
        aspect-ratio: 4 / 3; 
    }
}

/* --- CONTACTO --- */
.contact-container { max-width: 700px; margin: 0 auto; }
.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex; flex-direction: column; gap: 20px;
}
.contact-form input, .contact-form textarea {
    padding: 15px; border: 1px solid #cbd5e1; border-radius: var(--radius-btn); font-size: 1rem; width: 100%; background-color: var(--bg-color);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); background-color: var(--white); }

/* --- FOOTER --- */
footer { background-color: var(--primary-color); color: #cbd5e1; padding: 4rem 5% 1rem 5%; margin-top: auto; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; margin-bottom: 3rem; }
.footer-brand h3 { color: var(--white); font-size: 1.5rem; margin-bottom: 15px; text-transform: uppercase; }
.footer-brand span { color: var(--accent-color); }
.footer-info h4, .footer-hours h4 { color: var(--white); margin-bottom: 20px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;}
.footer-info ul, .footer-hours ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; }

.footer-info ul li {
    display: flex;
    align-items: flex-start; 
    gap: 12px;
}

.footer-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0; 
    color: var(--accent-color); 
    margin-top: 2px;
}

/* BOTON WHATSAPP */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    header { flex-direction: column; padding: 1rem; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .hero { padding: 4rem 1.5rem; }
    .hero h2 { font-size: 2rem; }
    .hero p { padding: 0; font-size: 1.1rem; }
    .contact-form { padding: 1.5rem; }
    .history-content { padding: 2rem; }
}

@media (min-width: 768px) {
    .step {
        width: calc(33.333% - 20px); 
    }
}

/* 3. PANTALLAS GRANDES (Más de 1600px): Los 5 pasos en una línea */
@media (min-width: 1600px) {
    .step {
        width: calc(20% - 24px); 
    }
}

/* --- RESPONSIVE DEL CATÁLOGO PARA MÓVILES --- */
@media (max-width: 768px) {
    .ral-grid {
        /* En el móvil forzamos 2 columnas */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ral-swatch {
        height: 70px;
    }
}