/* =========================================================
 PACK DE HECHICERÍA CSS v3.0 (FINAL DEFINITIVO)
 ========================================================= */

/* --- 1. TOOLTIPS GENERALES (Burbujas para iconos y textos) --- */
[data-tooltip] {
 position: relative;
 cursor: pointer;
}
/* Estado inicial invisible */
[data-tooltip]:before,
[data-tooltip]:after {
 visibility: hidden;
 opacity: 0;
 pointer-events: none;
 transition: 0.2s ease;
 position: absolute;
 z-index: 99999; /* Siempre encima de todo */
}
/* La flechita */
[data-tooltip]:before {
 content: '';
 position: absolute;
 bottom: 100%;
 left: 50%;
 margin-left: -5px;
 border-width: 5px 5px 0;
 border-style: solid;
 border-color: #111 transparent transparent transparent;
 transform: translateY(10px);
}
/* El cuadro de texto */
[data-tooltip]:after {
 content: attr(data-tooltip);
 background: #111;
 color: #fff;
 font-size: 11px;
 font-weight: 600;
 padding: 6px 12px;
 border-radius: 4px;
 white-space: nowrap;
 bottom: 100%;
 left: 50%;
 transform: translateX(-50%) translateY(10px);
 box-shadow: 0 5px 15px rgba(0,0,0,0.3);
 border-bottom: 2px solid #696cff; /* Línea neón */
 margin-bottom: 5px;
}
/* Animación al pasar el mouse */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
 visibility: visible;
 opacity: 1;
 transform: translateX(-50%) translateY(0);
}
[data-tooltip]:hover:before {
 transform: translateX(0) translateY(0);
}


/* --- 2. TARJETA DE GALERÍA (.gallery-card) --- */
.gallery-card {
 background: #fff;
 border: 1px solid #e1e4e8;
 border-radius: 12px;
 /* IMPORTANTE: Visible para que los tooltips del footer salgan fuera */
 overflow: visible !important; 
 position: relative;
 transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
 height: 100%;
 display: flex;
 flex-direction: column;
}

/* Estado Hover: Levitar + Borde Neón */
.gallery-card:hover {
 transform: translateY(-10px) scale(1.02);
 border-color: #696cff;
 box-shadow: 0 15px 30px rgba(105, 108, 255, 0.25);
 /* Z-Index alto para tapar a las tarjetas vecinas */
 z-index: 100; 
}

/* --- 3. CAJA DE IMAGEN (.gc-image-box) --- */
.gc-image-box {
 position: relative;
 height: 190px;
 /* IMPORTANTE: Hidden para recortar el zoom y el brillo */
 overflow: hidden; 
 background: #000;
 /* Redondeamos esquinas superiores manualmente */
 border-top-left-radius: 11px;
 border-top-right-radius: 11px;
}
.gc-image-box img {
 width: 100% !important; height: 100% !important;
 object-fit: cover;
 transition: transform 0.8s ease;
 opacity: 0.95;
 display: block;
}
/* Zoom y rotación dramática al hover */
.gallery-card:hover .gc-image-box img {
 transform: scale(1.15) rotate(1deg);
 opacity: 1;
}

/* Efecto Shine (Barrido de luz) */
.shine {
 position: absolute;
 top: 0; left: -100%;
 width: 50%; height: 100%;
 background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
 transform: skewX(-25deg);
 z-index: 2;
 pointer-events: none;
}
.gallery-card:hover .shine { animation: shineAnim 0.75s; }
@keyframes shineAnim { 100% { left: 125%; } }

/* TOOLTIP ESPECIAL PARA LA FOTO (Estilo HUD inferior) */
/* Anulamos la burbuja y creamos una barra abajo */
.gc-image-box [data-tooltip]:before { display: none; } 
.gc-image-box [data-tooltip]:after {
 bottom: 0 !important;
 left: 0 !important;
 transform: translateY(100%); /* Escondido abajo */
 width: 100%;
 margin: 0;
 border-radius: 0;
 background: rgba(0, 0, 0, 0.85); /* Fondo oscuro */
 backdrop-filter: blur(4px);
 border-bottom: none;
 border-top: 2px solid #696cff;
 text-align: center;
 white-space: normal;
 padding: 10px;
 box-sizing: border-box;
 z-index: 20;
}
.gc-image-box [data-tooltip]:hover:after {
 transform: translateY(0); /* Deslizar arriba */
 opacity: 1;
 visibility: visible;
}


/* --- 4. CUERPO Y PIE DE PÁGINA --- */
.gc-body { 
 padding: 15px; 
 flex-grow: 1; 
 position: relative; 
 z-index: 5; 
}
.gc-title { margin: 0 0 5px 0; font-weight: 800; font-family: 'Cinzel', serif; }
.gc-title a { color: #444; text-decoration: none; transition: 0.3s; }
.gallery-card:hover .gc-title a { color: #696cff; text-shadow: 0 0 1px rgba(105,108,255,0.3); }

.gc-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: #999; margin-bottom: 10px; }
.gc-desc { font-size: 0.85rem; color: #666; line-height: 1.5; }

.gc-footer {
 background: #f8f9fa;
 padding: 10px 15px;
 border-top: 1px solid #eee;
 display: flex; justify-content: space-between; align-items: center;
 /* Redondeamos esquinas inferiores manualmente */
 border-bottom-left-radius: 11px;
 border-bottom-right-radius: 11px;
 position: relative;
 z-index: 5;
}
.stat-item {
 color: #888; font-size: 0.85rem; margin-right: 10px; text-decoration: none;
 transition: 0.2s;
}
.stat-item:hover { color: #696cff; transform: scale(1.1); }


/* --- 5. LIGHTBOX DE CRISTAL (Ventana Emergente) --- */
#dynPhoto {
 background: rgba(255, 255, 255, 0.95);
 backdrop-filter: blur(10px);
 border-radius: 15px;
 padding: 25px;
 box-shadow: 0 20px 60px rgba(0,0,0,0.3);
 animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
 border: 1px solid rgba(255,255,255,0.5);
}

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

#photoModalWrap { font-family: 'Inter', sans-serif; color: #444; }

/* Títulos Lightbox */
.lb-title { 
 font-size: 1.8rem; font-weight: 800; 
 background: -webkit-linear-gradient(45deg, #696cff, #9b9dff);
 -webkit-background-clip: text;
 -webkit-text-fill-color: transparent;
 margin-bottom: 10px;
}

/* Imagen Lightbox */
.lb-image-box {
 background: #000;
 border-radius: 10px;
 padding: 5px;
 box-shadow: 0 10px 30px rgba(0,0,0,0.2);
 margin-bottom: 20px;
}
.lb-image-box img { border-radius: 6px; }

/* Inputs Modernos */
#photoModalWrap input[type="text"], 
#photoModalWrap textarea {
 border: 2px solid #eee;
 background: #fcfcfc;
 border-radius: 8px;
 padding: 10px 15px;
 font-weight: 500;
 transition: 0.3s;
 width: 100%; box-sizing: border-box;
}
#photoModalWrap input[type="text"]:focus, 
#photoModalWrap textarea:focus {
 border-color: #696cff;
 background: #fff;
 box-shadow: 0 10px 20px rgba(105, 108, 255, 0.1);
 transform: translateY(-2px);
 outline: none;
}

/* Botones Lightbox */
#photoModalWrap .button, #photoModalWrap input[type="submit"] {
 background: linear-gradient(135deg, #696cff 0%, #5f61e6 100%);
 color: white !important;
 border-radius: 50px;
 padding: 10px 25px;
 font-weight: bold;
 border: none;
 box-shadow: 0 4px 15px rgba(105, 108, 255, 0.4);
 transition: 0.3s;
 cursor: pointer;
}
#photoModalWrap .button:hover, #photoModalWrap input[type="submit"]:hover {
 transform: translateY(-2px);
 box-shadow: 0 8px 20px rgba(105, 108, 255, 0.6);
}
 /* --- 1. ESTILO PARA CATEGORÍAS (CARPETAS) --- */
 /* Convertimos la tabla de uCoz en un Grid moderno */
 .gallery-cats-wrapper .catsTable {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
 gap: 20px;
 width: 100%;
 }

 /* Diseño de la Tarjeta de Carpeta */
 .gallery-cats-wrapper .catsTd {
 background-color: #fff;
 border: 1px solid #e1e4e8;
 border-radius: 12px;
 padding: 25px 15px;
 text-align: center;
 transition: all 0.3s ease;
 box-shadow: 0 4px 6px rgba(0,0,0,0.02);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 position: relative;
 }

 /* Efecto Hover */
 .gallery-cats-wrapper .catsTd:hover {
 transform: translateY(-5px);
 box-shadow: 0 10px 20px rgba(105, 108, 255, 0.15);
 border-color: #696cff;
 }

 /* ICONO DE CARPETA SVG (Incrustado) */
 .gallery-cats-wrapper .catsTd::before {
 content: "";
 display: block;
 width: 48px; 
 height: 48px;
 margin-bottom: 15px;
 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23696cff'%3E%3Cpath d='M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5Z'/%3E%3C/svg%3E");
 background-repeat: no-repeat;
 background-position: center;
 background-size: contain;
 opacity: 0.8;
 transition: 0.3s;
 }
 .gallery-cats-wrapper .catsTd:hover::before {
 opacity: 1; transform: scale(1.1);
 }

 /* Título de la Categoría */
 .gallery-cats-wrapper .catName {
 font-family: 'Inter', sans-serif;
 font-size: 1.1rem;
 font-weight: 700;
 color: #566a7f;
 text-decoration: none;
 margin-bottom: 8px;
 display: block;
 }
 .gallery-cats-wrapper .catsTd:hover .catName { color: #696cff; }

 /* Contador [0] */
 .gallery-cats-wrapper .catNumData {
 font-size: 0.8rem;
 color: #888;
 background: #f0f2f5;
 padding: 4px 12px;
 border-radius: 20px;
 font-weight: 600;
 display: inline-block;
 }

 /* --- 2. ESTILO PARA FOTOS (BODY) --- */
 .gallery-photos-wrapper table { width: 100%; border-collapse: separate; border-spacing: 15px; }
 .gallery-photos-wrapper td { 
 vertical-align: top; 
 padding: 0;
 background: #fff;
 border-radius: 8px;
 }
 
 /* Imágenes de las fotos */
 .gallery-photos-wrapper img {
 width: 100%; 
 height: auto; 
 border-radius: 8px;
 box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
 transition: transform 0.3s ease, box-shadow 0.3s ease;
 display: block;
 }
 
 /* Efecto Hover en las fotos */
 .gallery-photos-wrapper img:hover { 
 transform: scale(1.03); 
 box-shadow: 0 10px 20px rgba(105, 108, 255, 0.2); 
 z-index: 2;
 }

 /* Barra de estadísticas y descripción */
 .section-description {
 background: rgba(105, 108, 255, 0.05);
 border-left: 4px solid #696cff;
 padding: 15px;
 margin-bottom: 20px;
 border-radius: 4px;
 color: #566a7f;
 }
 
 .stats-bar {
 background: #f5f5f9;
 padding: 10px 15px;
 border-radius: 8px;
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 20px;
 font-size: 0.9rem;
 }

 /* Breadcrumbs limpios */
 .breadcrumbs a { color: #696cff; text-decoration: none; font-weight: 500; }
 .breadcrumbs { color: #a1acb8; }