/* =====================================================
   C.A.R. VIDRIOS - ESTILOS PRINCIPALES
===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f8fa;
    color: #1f2933;
    line-height: 1.6;
}

/* ===== ENCABEZADO ===== */
header {
    width: 100%;
    background: #ffffff;
    padding: 15px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

header img { width: 150px; height: auto; display: block; }

header nav { display: flex; align-items: center; gap: 25px; }

header nav a {
    color: #123b52;
    text-decoration: none;
    font-weight: bold;
}

header nav a:hover { color: #159db8; }

/* ===== CONTENEDOR INICIO (solo estructura, sin estilo visual propio) ===== */
.inicio {
    width: 100%;
}

/* ===== HERO / PORTADA ===== */
.hero {
    position: relative;
    min-height: 500px;

    background-image:
        linear-gradient(rgba(10, 35, 50, 0.6), rgba(10, 35, 50, 0.6)),
        url("./imagenes/portada.jpg");
    background-size: cover;
    background-position: center;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    text-align: center;
}

.hero-overlay h1 {
    max-width: 950px;
    margin: 0 auto 25px auto;
    color: #ffffff;
    font-size: 48px;
    line-height: 1.2;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
    animation: aparecerPortada 0.9s ease-out;
}

.hero-overlay p {
    max-width: 750px;
    margin: 0 auto 35px auto;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.7;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.65);
    animation: aparecerPortada 0.9s ease-out;
}

.btn-cotizar {
    display: inline-block;
    padding: 16px 32px;
    background: #159db8;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 17px;
    font-weight: bold;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
    animation: aparecerPortada 0.9s ease-out;
}

.btn-cotizar:hover {
    transform: translateY(-3px);
    background: #ffffff;
    color: #123b52;
}

@keyframes aparecerPortada {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SERVICIOS ===== */
.servicios {
    width: 100%;
    background: #ffffff;
    padding: 60px 6%;
    text-align: center;
}

.servicios h2 {
    color: #123b52;
    font-size: 32px;
    margin-bottom: 35px;
}

.tarjetas {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
}

.tarjeta {
    flex: 1 1 0;
    width: 0;
    max-width: 350px;
    min-height: 190px;
    padding: 30px 25px;
    background: #ffffff;
    border-radius: 12px;
    border-top: 4px solid #159db8;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.tarjeta h3 {
    color: #123b52;
    font-size: 22px;
    margin-bottom: 15px;
}

.tarjeta p {
    color: #555555;
    max-width: 280px;
    margin: 0 auto;
}

/* ===== GALERÍA ===== */
.galeria {
    width: 100%;
    background: #f5f8fa;
    padding: 60px 6%;
    text-align: center;
}

.galeria h2 {
    color: #123b52;
    font-size: 32px;
    margin-bottom: 35px;
}

.galeria h3 {
    color: #123b52;
    font-size: 24px;
    margin: 35px 0 20px;
}

.galeria-grid {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto 45px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.galeria-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.galeria-grid img:hover { transform: scale(1.03); }

/* ===== FOOTER ===== */
footer {
    width: 100%;
    background: #123b52;
    color: #ffffff;
    text-align: center;
    padding: 30px 20px;
}

footer p { margin: 5px 0; }

/* ===== TABLET ===== */
@media (max-width: 900px) {
    .galeria-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== CELULAR ===== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    header nav { flex-wrap: wrap; justify-content: center; gap: 15px; }

    header img { width: 130px; }

    .hero { min-height: 420px; padding: 60px 20px; }

    .hero-overlay h1 { font-size: 30px; }

    .hero-overlay p { font-size: 16px; }

    .tarjetas { flex-direction: column; align-items: center; }

    .tarjeta { width: 100%; max-width: 450px; }

    .galeria-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .galeria-grid img { height: 180px; }
}

/* ===== CELULAR PEQUEÑO ===== */
@media (max-width: 480px) {
    .hero-overlay h1 { font-size: 26px; }
    .servicios h2, .galeria h2 { font-size: 26px; }
    .galeria-grid { grid-template-columns: 1fr; }
    .galeria-grid img { height: 230px; }
}/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-flotante {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;

    width: 60px;
    height: 60px;

    background: #25D366;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-flotante img {
    width: 32px;
    height: 32px;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .whatsapp-flotante {
        width: 52px;
        height: 52px;
        bottom: 18px;
        right: 18px;
    }

    .whatsapp-flotante img {
        width: 28px;
        height: 28px;
    }
}/* ===== LIGHTBOX GALERÍA ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;

    align-items: center;
    justify-content: center;
}

.lightbox.activo {
    display: flex;
}

.lightbox-imagen {
    max-width: 85%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: aparecerLightbox 0.25s ease-out;
}

@keyframes aparecerLightbox {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-cerrar {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lightbox-cerrar:hover {
    color: #159db8;
}

.lightbox-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    padding: 15px;
    user-select: none;
    transition: color 0.2s ease;
}

.lightbox-flecha:hover {
    color: #159db8;
}

.lightbox-anterior {
    left: 15px;
}

.lightbox-siguiente {
    right: 15px;
}

@media (max-width: 768px) {
    .lightbox-imagen {
        max-width: 92%;
        max-height: 75%;
    }

    .lightbox-flecha {
        font-size: 24px;
    }

    .lightbox-cerrar {
        font-size: 32px;
        top: 15px;
        right: 20px;
    }
}