/* --- 1. ESTILOS BASE Y ESTRUCTURA --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    
    /* Sticky Footer: empuja el footer al final */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Ocupa el espacio disponible para que el footer baje */
}

/* --- 2. HEADER Y NAVEGACIÓN --- */
.header-fijo {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fondo negro con un toque de transparencia muy elegante */
    backdrop-filter: blur(10px);          /* Efecto vidrio esmerilado para que lo de atrás se difumine */
    z-index: 1500;                        /* Mayor que el grid para que las fotos pasen por debajo */
    border-bottom: 1px solid #111;        /* Línea sutil para separar la cabecera del contenido */
}

header {
    padding: 1.5rem 1rem 0.5rem 1rem;
    text-align: center;
}
header h1 {
    margin: 0;
}
header img {
    max-width: 250px; /* Ajusta según el tamaño de tu logo */
    height: auto;
    margin-bottom: 1rem;
}

nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 3. EL GRID MÁGICO (GALERÍA) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Contenedor universal para Fotos y Videos */
.grid-item {
    position: relative;
    background-color: #111;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 450px; /* ALTURA FIJA: Esto hace que todos los cuadros sean iguales */
    transition: transform 0.3s ease;
}

/* Estilo para las Imágenes */
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}

/* --- 4. TRUCO DE RECORTE PARA TIKTOK --- */
.tiktok-embed {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    margin: -20px 0 0 0 !important; /* Solo lo subimos un poco */
}

/* Título que funciona como "máscara" inferior */
.titulo-tatuaje {
    position: absolute; /* Se pega al fondo del cuadro */
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    padding: 20px 5px 10px 5px; /* Más padding arriba para el degradado */
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    
    /* Degradado negro para borrar cualquier rastro de TikTok */
    background: linear-gradient(transparent, rgba(0,0,0,0.9) 50%, #000); 
    margin: 0;
    z-index: 10;
}

/* --- 5. INTERACCIÓN (HOVER) --- */
.grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    filter: brightness(1.1);
}

/* --- 6. FOOTER --- */
footer {
    padding: 2rem;
    background-color: #0a0a0a;
    text-align: center;
    border-top: 1px solid #222;
}

footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

footer a {
    color: #25d366; /* Verde WhatsApp */
    text-decoration: none;
    font-weight: bold;
}

/* --- 7. RESPONSIVE (MÓVILES) --- */
@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr; /* Una sola columna en celulares */
        padding: 10px;
    }
    
    header img {
        max-width: 180px;
    }
}

/* Contenedor de pestañas */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background-color: #000;
}

/* Estilo de los botones */
.tab-button {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* Estado activo y hover */
.tab-button:hover, .tab-button.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}
/* --- 8. MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overflow-y: auto; /* Permite scroll en el fondo si fuera necesario */
}

.modal-content {
    background-color: #121212; /* Fondo oscuro elegante */
    margin: 5vh auto;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    border: 1px solid #222;
    overflow: hidden;
    display: flex; /* Flexbox para dividir en columnas */
    flex-direction: row; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

#modal-body img, #modal-body blockquote {
    width: 100% !important;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

#modal-info-container {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background-color: #121212;
    border-left: 1px solid #222;
    max-height: 75vh; /* Limita la altura total de la tarjeta text */
}

#modal-media-container {
    flex: 1.2; /* Toma un poco más de espacio */
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#modal-titulo {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid #222;
    padding-bottom: 0.5rem;
}

#modal-descripcion-wrapper {
    flex: 1;
    overflow-y: auto; /* ¡AQUÍ SE ACTIVA EL SCROLL! */
    padding-right: 10px;
}

#modal-descripcion-wrapper::-webkit-scrollbar {
    width: 6px;
}
#modal-descripcion-wrapper::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}

#modal-descripcion {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-line; /* Clave: Respeta los \n de tu JSON */
}

.modal .close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
}
.modal .close:hover {
    color: #ff69b4; /* Color de tu diseño */
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Para que la imagen en la grid parezca clickeable */
.grid-item {
    cursor: pointer;
}
/* --- 9. MENÚ FLOTANTE (HACIA ARRIBA) --- */
.fab-container {
    position: fixed;
    bottom: 50px;
    right: 20px;
    display: flex;
    flex-direction: column; /* Apila hacia arriba */
    align-items: center;
    gap: 12px;
    z-index: 2000;
}

.fab-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 5px;
    
    /* Efecto de salida desde abajo hacia arriba */
    transform: translateY(20px) scale(0);
    transform-origin: bottom; 
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.fab-container.active .fab-options {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.fab-main {
    width: 55px;
    height: 55px;
    background-color: #1a1a1a; /* Fondo oscuro para que resalte el rosa */
    color: #ff69b4;           /* Rosa HotPink para el corazón */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3); /* Sombra rosa suave */
    cursor: pointer;
    font-size: 28px; /* Tamaño del corazón */
    transition: all 0.4s ease;
    z-index: 2001;
    border: 2px solid #ff69b4; /* Borde rosa opcional para más estilo */
}

.fab-option {
    width: 45px;
    height: 45px;
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #333;
    transition: transform 0.2s ease;
}

.fab-option:hover {
    background-color: #333;
    transform: scale(1.1);
}


.fab-container.active .fab-main {
    transform: rotate(0deg) scale(1.1); /* Ya no rotamos, solo crece un poco */
    background-color: #ff69b4;        /* El fondo se vuelve rosa */
    color: #fff;                      /* El corazón se vuelve blanco */
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.6); /* Sombra más fuerte */
}



/* --- NAVEGACIÓN Y TABS ADAPTABLES --- */
.nav-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 1rem; /* Margen inferior dentro de la barra fija */
}

/* Estilos originales para Computadoras */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

/* Ocultar el botón de hamburguesa en computadoras por defecto */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 1rem 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación de la hamburguesa transformándose en X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* --- DISEÑO PARA CELULARES (Menos de 768px) --- */
@media (max-width: 768px) {
    .nav-container {
        justify-content: flex-end;
        padding-right: 20px;
    }

    .menu-toggle {
        display: flex; /* Mostramos la hamburguesa */
    }

    /* Convertimos el contenedor de pestañas en un menú flotante vertical */
    .tabs-container {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 45px;
        right: 20px;
        background-color: #111;
        border: 1px solid #333;
        border-radius: 8px;
        padding: 15px;
        gap: 10px;
        width: 180px;
        
        /* Animación de oculto a visible */
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.3s ease;
    }

    /* Cuando el menú está abierto */
    .tabs-container.mobile-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Ajuste de los botones dentro del menú móvil */
    .tab-button {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    .modal-content {
        flex-direction: column; /* Se apila: multimedia arriba, texto abajo */
        margin: 2vh auto;
        width: 95%;
        max-height: 90vh;
    }
    
    #modal-media-container {
        min-height: auto;
        max-height: 45vh;
    }
    
    #modal-body img {
        max-height: 45vh;
    }

    #modal-info-container {
        max-height: 40vh; /* Limita el texto en móvil para que no empuje fuera de pantalla */
        padding: 1.2rem;
        border-left: none;
        border-top: 1px solid #222;
    }
    
    #modal-titulo {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
}
.close {
    position: fixed; /* Cambiado a fixed para que se quede arriba a la derecha aunque la imagen sea larga */
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3100; /* Asegura que la X esté siempre encima de la foto */
    background: rgba(0, 0, 0, 0.5); /* Un circulito sutil de fondo para que se vea bien sobre cualquier foto */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.close:hover,
.close:focus {
    color: #ff69b4; /* Cambia a tu rosa característico cuando pasan el cursor */
    transform: scale(1.1);
}