:root {
    --brand-black: #0d0d0d;       
    --brand-yellow: #f1b81a;      
    --brand-white: #ffffff;       
    --bg-light: #ffffff;          /* FONDO BLANCO PURO INTEGRADO */       
    --text-dark: #1f2937;         
    --whatsapp-color: #25d366;    
}

/* ==========================================================================
   RESET DE FUERZA BRUTA: DESTRABE DE SCROLL MOBILE DEFINITIVO
   ========================================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', system-ui, sans-serif; 
}

html, body {
    height: auto !important;
    min-height: 100% !important;
    background: var(--bg-light); 
    color: var(--text-dark);
    padding-bottom: 4rem;
    overflow-y: scroll !important; 
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important; 
}

/* Cabecera de la galería */
.galeria-header {
    position: relative !important;
    background: var(--brand-black);
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--brand-yellow);
}

.btn-volver {
    color: var(--brand-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    border: 1px solid var(--brand-white);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: all 0.2s ease;
}
.btn-volver:hover {
    background: var(--brand-white);
    color: var(--brand-black);
}

.galeria-brand {
    color: var(--brand-yellow);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Contenedor de Contenido */
.galeria-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.galeria-container h1 {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-black);
    margin-bottom: 0.5rem;
}

.galeria-container p {
    font-size: 1.1rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 2.5rem;
}

/* Grilla de Fotos adaptada a Fila Horizontal en Mobile */
.grid-fotos {
    display: flex; 
    gap: 1.5rem;
    margin-bottom: 4rem;
    width: 100%;
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    padding-bottom: 1rem; 
    -webkit-overflow-scrolling: touch; 
}

/* Tarjetas contenedoras de fotos de trabajos */
.foto-item {
    background: var(--brand-white);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: transform 0.3s ease;
    aspect-ratio: 4 / 3; 
    flex: 0 0 85%; 
    scroll-snap-align: center; 
}

.foto-item:hover {
    transform: translateY(-5px);
}

.foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

/* Banner de Cierre Comercial */
.galeria-cta {
    background: var(--brand-black);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    color: var(--brand-white);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-width: 700px;
    margin: 0 auto;
}

.galeria-cta h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.galeria-cta h2 span {
    color: var(--brand-yellow);
}

.btn-wpp-galeria {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-yellow);
    color: var(--brand-black);
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    width: 100%;
    transition: background 0.2s ease;
}
.btn-wpp-galeria:hover {
    background: #dca311;
}

/* ==========================================================================
   MOTOR DEL LIGHTBOX
   ========================================================================== */
.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;        
    height: 0 !important;       
    display: none !important;   
    pointer-events: none !important; 
    z-index: -1000 !important;  
    background: rgba(0, 0, 0, 0.9);
    overflow: hidden;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex !important;
    width: 100% !important;    /* Corregido a 100% para evitar saltos en escritorio */
    height: 100% !important;
    pointer-events: auto !important; 
    z-index: 10000 !important;  
    opacity: 1 !important;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--brand-white);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    user-select: none;
}

/* REGLAS PARA ESCRITORIO (Media Query) */
@media (min-width: 768px) {
    .grid-fotos {
        display: grid; 
        grid-template-columns: repeat(3, 1fr); 
        gap: 2rem;
        overflow-x: visible; 
    }
    .foto-item {
        flex: none; 
    }
    .galeria-container h1 { 
        font-size: 2.5rem; 
    }
}
/* ==========================================================================
   TARJETA OSCURA PREMIUM PARA LISTADO DE SERVICIOS SEO (CORREGIDO SOLIDO)
   ========================================================================= */
.tarjeta-servicios-oscura {
    background: #0d0d0d !important; /* Forzamos el negro puro y sólido de tu marca */
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3); /* Sombra más densa para dar volumen */
    max-width: 850px;
    margin: 0 auto 3.5rem auto; /* Centra en pantalla y separa de las fotos */
    border: 2px solid var(--brand-yellow); /* Borde amarillo sólido para que pegue el estirón visual */
}

.lista-servicios-seo {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left; /* Lectura natural de izquierda a derecha */
}

.lista-servicios-seo li {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #ffffff !important; /* Blanco puro para máxima lectura sobre el negro */
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

/* Evita margen molesto en el último ítem */
.lista-servicios-seo li:last-child {
    margin-bottom: 0;
}

/* Icono de tilde estilizado con tu color amarillo de marca */
.lista-servicios-seo li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: -1px;
    color: var(--brand-yellow);
    font-weight: 900;
    font-size: 1.2rem;
}

/* Resalte de los títulos de cada ítem en amarillo de la marca */
.lista-servicios-seo li strong {
    color: var(--brand-yellow) !important; /* Ahora el título resalta en amarillo, más prolijo */
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Ajuste fino para pantallas chicas (Mobile) */
@media (max-width: 480px) {
    .tarjeta-servicios-oscura {
        padding: 1.8rem 1.2rem;
        border-radius: 14px;
        margin: 0 1rem 2.5rem 1rem; /* Margen lateral para que no pegue en los bordes del celu */
    }
    .lista-servicios-seo li {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
}
