/* Variables CSS para Carlos Lara */
:root {
    --swatch-1: rgba(0, 0, 0, 0.85);
    --swatch-2: rgba(0, 0, 0, 0.75);
    --swatch-3: rgba(0, 0, 0, 0.6);
    --swatch-4: rgba(0, 0, 0, 0.4);
    --swatch-5: rgba(0, 0, 0, 0.25);
    --swatch-6: rgba(0, 0, 0, 0.1);
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Source Serif Pro', 'Times', serif;
    
    --gutter: 1.4rem;
    --mobile-scale: 0.9;
    
    --accent-color: #000000;
    --text-color: #333333;
    --link-color: #555555;
}

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-color);
    background: #fff;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-size: 16px;
}

body.loaded {
    opacity: 1;
}

/* Header Fijo */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--swatch-6);
    transition: transform 0.3s ease;
}

.fixed-header.hidden {
    transform: translateY(-100%);
}

.header-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gutter);
    max-width: 1200px;
    margin: 0 auto;
}

.header-col {
    display: flex;
    align-items: center;
}

/* =========================================== */
/* TEXTO DEL HEADER - MEDIDAS ACTUALIZADAS */
/* =========================================== */

/* Texto general: 18px (1.125rem) - Normal weight */
.header-text {
    font-size: 1.125rem !important;    /* 18px exactos */
    color: var(--swatch-1) !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;        /* NORMAL (no bold) */
    letter-spacing: 0.01em;
}

/* "Carlos Lara" ÚNICO texto en BOLD y con enlace */
.header-col:nth-child(1) .header-text {
    font-weight: 700 !important;        /* BOLD solo para el nombre */
}

/* Enlace del nombre "Carlos Lara" - sin target _blank */
.name-link {
    color: var(--swatch-1) !important;
    text-decoration: none;
    font-weight: 700 !important;        /* Mantener bold */
    transition: opacity 0.2s ease;
    border-bottom: none !important;     /* Sin subrayado */
}

.name-link:hover {
    opacity: 0.7 !important;
}

/* Links normales en el header (Portfolio e Instagram) */
.header-text a:not(.name-link) {
    color: var(--link-color) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    font-weight: 400 !important;        /* Normal weight para otros links */
}

.header-text a:not(.name-link):hover {
    opacity: 0.7 !important;
    border-bottom-color: currentColor;
}

.text-right {
    text-align: right;
    width: 100%;
}

.text-left {
    text-align: left;
    display: inline-block;
}

/* =========================================== */
/* GALERÍA ROBO - IMÁGENES COMPLETAS SIN RECORTAR */
/* =========================================== */

/* Contenedor principal */
.robo-gallery-container {
    margin: 100px auto 40px !important;
    padding: 0 20px !important;
    max-width: 1200px !important;
    width: 100% !important;
    display: block !important;
}

/* Galería específica ID 591 */
#robo-gallery-591 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    position: relative !important;
}

/* Grid/Mosaico con imágenes completas */
.robo-gallery-grid,
.robo-gallery-items {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 25px !important;
    margin: 0 auto !important;
}

/* CONTENEDOR DE CADA IMAGEN con fondo y proporción */
.robo-gallery-item {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; /* Proporción cuadrada inicial */
    background-color: #f8f8f8 !important; /* Fondo neutro */
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important; /* Espacio alrededor */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.robo-gallery-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
    background-color: #f0f0f0 !important;
}

/* IMAGEN DENTRO DEL CONTENEDOR - SE VE COMPLETA */
.robo-gallery-item img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important; /* ¡ESTO ES CLAVE! */
    object-position: center !important;
    display: block !important;
    border-radius: 4px !important;
}

/* =========================================== */
/* RESPONSIVE - DIFERENTES TAMAÑOS */
/* =========================================== */

/* Desktop grande (≥ 1200px) */
@media (min-width: 1200px) {
    .robo-gallery-grid,
    .robo-gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 30px !important;
    }
    
    .robo-gallery-item {
        aspect-ratio: 4 / 3 !important; /* Rectángulo horizontal */
    }
}

/* Desktop pequeño (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .robo-gallery-grid,
    .robo-gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 25px !important;
    }
    
    .robo-gallery-item {
        aspect-ratio: 1 / 1 !important; /* Cuadrado */
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .robo-gallery-container {
        max-width: 720px !important;
        padding: 0 15px !important;
    }
    
    .robo-gallery-grid,
    .robo-gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 20px !important;
    }
    
    .robo-gallery-item {
        aspect-ratio: 3 / 4 !important; /* Retrato vertical */
        padding: 12px !important;
    }
}

/* Móvil horizontal (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .robo-gallery-container {
        padding: 0 12px !important;
        margin-top: 80px !important;
    }
    
    .robo-gallery-grid,
    .robo-gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 15px !important;
    }
    
    .robo-gallery-item {
        aspect-ratio: 1 / 1 !important; /* Cuadrado */
        padding: 10px !important;
    }
}

/* Móvil vertical (≤ 575px) */
@media (max-width: 575px) {
    .robo-gallery-container {
        padding: 0 10px !important;
        margin-top: 70px !important;
    }
    
    .robo-gallery-grid,
    .robo-gallery-items {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .robo-gallery-item {
        aspect-ratio: 3 / 4 !important; /* Retrato */
        padding: 8px !important;
    }
}

/* =========================================== */
/* LIGHTBOX MEJORADO */
/* =========================================== */

.mfp-bg {
    background: rgba(0, 0, 0, 0.97) !important;
    backdrop-filter: blur(5px) !important;
}

.mfp-image-holder .mfp-content {
    max-width: 90vw !important;
    max-height: 90vh !important;
    background: #fff !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
}

.mfp-image-holder .mfp-figure img {
    max-height: 70vh !important;
    width: auto !important;
    object-fit: contain !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
    padding: 10px !important;
}

/* =========================================== */
/* EFECTOS ESPECIALES PARA ARTISTA */
/* =========================================== */

.robo-gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
                rgba(255,255,255,0.1) 0%, 
                rgba(255,255,255,0.05) 100%);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.robo-gallery-item:hover::before {
    opacity: 1;
}

/* Borde sutil al hover */
.robo-gallery-item:hover img {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================== */
/* ANIMACIÓN DE CARGA */
/* =========================================== */

.robo-gallery-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    animation-delay: calc(var(--item-index, 0) * 0.05s);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================== */
/* LIMPIAR CONFLICTOS */
/* =========================================== */

.rbs-gallery-container {
    display: none !important;
}

/* =========================================== */
/* UTILIDADES Y FOOTER */
/* =========================================== */

.close-overlay {
    cursor: pointer;
}

.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.site-footer {
    padding: 2rem;
    text-align: center;
    color: var(--swatch-4);
    font-size: 0.9rem;
    font-weight: 400; /* Normal weight */
    border-top: 1px solid var(--swatch-6);
    margin-top: 3rem;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 400; /* Normal weight */
}

.site-footer a:hover {
    color: var(--swatch-2);
}
/* SOLUCIÓN DE EMERGENCIA - CSS ONLY */
* {
    max-height: 1000000px !important; /* Evita colapsos de altura */
}

html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    position: relative !important;
}

body.mfp-active,
body.mfp-wrap {
    overflow: visible !important;
    position: static !important;
}

/* Desactivar cualquier fixed/fixed que bloquee */
.mfp-wrap,
.mfp-container,
.mfp-content {
    position: absolute !important;
    overflow: visible !important;
}

/* Asegurar que el footer esté siempre visible */
.site-footer {
    position: relative;
    z-index: 999;
    transform: translateZ(0);
}