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

body {
    font-family: Arial, sans-serif;
    color: #2a2a2a;
    line-height: 1.6;
}

.container {
    width: 90%;
    margin: 0 auto;
}

/* NAVIGATION */
.header {
    background: #ffffff;
    border-bottom: 2px solid #eaeaea;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.logo img {
    height: 180px;
    width: auto;
    margin-right: 10px;
    border-radius: 8px;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.navbar a:hover {
    color: #0073e6;
}

.search-bar input {
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* HERO */
.hero {
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    color: #ffffff;
    text-align: center;
}

/* ===== Hero – Carrusel automático lento ===== */

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1500ms ease, transform 7000ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1.08);
}

/* Overlay y contenido por encima del carrusel */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Accesibilidad: reducir movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
        transform: none;
    }
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.btn-primary {
    background: #0073e6;
    color: #ffffff;
    padding: 10px 25px;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 4px;
}

.btn-primary:hover {
    background: #005bb5;
}

/* SECTIONS */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #eaeaea;
    text-align: center;
}

/* Ajuste de scroll para header sticky (evita que los títulos queden tapados) */
html {
    scroll-behavior: smooth;
}

.section {
    scroll-margin-top: 240px; /* ajusta si el header cambia de altura */
}

.section-alt {
    background: #f9f9f9;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 25px 0;
    background: #2a2a2a;
    color: #ffffff;
}

/* ===== PRODUCTOS – ALINEADO A LA IZQUIERDA Y MEJOR ESPACIADO ===== */

#productos {
    text-align: left;
}

#productos .product-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 48px;
    margin-top: 40px;
}

#productos .service-group h3 {
    margin-bottom: 16px;
    font-size: 1.15rem;
    font-weight: 600;
}

#productos .service-group p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #555;
}

#quienes-somos img {
    max-width: 50%;
    height: auto;
    border-radius: 8px;
}

/* ===== Espaciado sección Quiénes Somos ===== */

#quienes-somos h2 {
    margin-bottom: 24px;
}

#quienes-somos p {
    margin-bottom: 18px;
    line-height: 1.7;
}

/* ===== Proyectos – Galería optimizada ===== */

#proyectos .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 30px;
}

#proyectos .gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* Ajustes individuales de tamaño por tipo de imagen */

/* Pizarra y Ventana Francesa – formato horizontal */
#proyectos .project-item:nth-child(1) img,
#proyectos .project-item:nth-child(2) img {
    height: 600px;
}

/* Divisiones y Puerta – formato vertical */
#proyectos .project-item:nth-child(3) img,
#proyectos .project-item:nth-child(4) img,
#proyectos .project-item:nth-child(5) img,
#proyectos .project-item:nth-child(6) img {
    height: 760px;
}

/* Responsive: 1 imagen por fila en móvil */
@media (max-width: 768px) {
    #proyectos .gallery {
        grid-template-columns: 1fr;
    }
}

/* FIX DEL LIGHTBOX */
.lightbox {
    display: none;                /* OCULTO por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}