/*
 * galerias.css — parte 5 de 5
 * Mapa a pantalla completa, badges de contenido nuevo, estadísticas, bloque intro y galerías comunitarias
 *
 * Fragmento de la hoja original de la página de galerías. El ORDEN de
 * carga de estas partes reproduce el del archivo único y debe mantenerse:
 * cambiarlo altera la cascada. Ver el orden en public/galerias.html.
 */
/* ========================================
   MAPA FULLSCREEN - MARCADORES DE AUDIO
   ======================================== */

/* Marcador de audio en el mapa */
.custom-audio-marker {
    background: transparent;
    border: none;
}

.audio-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.audio-marker-icon-wrapper {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    border: 3px solid white;
    transition: all 0.2s ease;
}

.audio-marker-icon-wrapper i {
    font-size: 1.25rem;
    color: white;
    z-index: 1;
}

.audio-marker-icon-wrapper:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

/* Ondas de reproducción en el marcador */
.audio-marker-waves {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.audio-marker-waves span {
    width: 3px;
    height: 8px;
    background: white;
    border-radius: 1px;
}

/* Marcador activo (reproduciéndose) */
.audio-marker-container.playing .audio-marker-icon-wrapper {
    animation: markerPulse 1.5s ease-in-out infinite;
}

.audio-marker-container.playing .audio-marker-icon-wrapper i {
    display: none;
}

.audio-marker-container.playing .audio-marker-waves {
    opacity: 1;
}

.audio-marker-container.playing .audio-marker-waves span {
    animation: markerWave 0.6s ease-in-out infinite;
}

.audio-marker-container.playing .audio-marker-waves span:nth-child(1) {
    animation-delay: 0s;
}
.audio-marker-container.playing .audio-marker-waves span:nth-child(2) {
    animation-delay: 0.15s;
}
.audio-marker-container.playing .audio-marker-waves span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes markerWave {
    0%, 100% { height: 6px; }
    50% { height: 16px; }
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.7); }
}

.audio-marker-pin {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #d97706;
    margin-top: -2px;
}

/* ========================================
   REPRODUCTOR DE AUDIO LIMPIO EN MAPA
   ======================================== */

.map-audio-player-clean {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-audio-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    text-align: center;
}

/* Controles del reproductor */
.map-audio-player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.map-audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f59e0b;
    border: none;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.map-audio-play-btn:hover {
    background: #d97706;
    transform: scale(1.05);
}

.map-audio-play-btn:active {
    transform: scale(0.98);
}

.map-audio-play-btn i {
    line-height: 1;
}

/* Barra de progreso */
.map-audio-progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.map-audio-progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: visible;
}

.map-audio-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #f59e0b;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.map-audio-slider {
    position: absolute;
    top: -6px;
    left: 0;
    width: 100%;
    height: 16px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.map-audio-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

/* Link a galería */
.map-audio-gallery-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.map-audio-gallery-link:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

.map-audio-gallery-link i:last-child {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.map-audio-gallery-link:hover i:last-child {
    transform: translateX(2px);
}


/* ========================================
   MAPA FULLSCREEN - ESTILOS BASE
   ======================================== */

.gallery-fullscreen-map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-fullscreen-map-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gallery-fullscreen-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 10;
}

.gallery-fullscreen-map-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.gallery-fullscreen-map-title i {
    font-size: 1.25rem;
    color: #8b5cf6;
}

.gallery-fullscreen-map-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-fullscreen-map-close:hover {
    background: #e5e7eb;
}

.gallery-fullscreen-map-close i {
    font-size: 1.25rem;
    color: #6b7280;
}

/* Modal de foto/audio en el mapa */
.gallery-map-photo-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-map-photo-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.gallery-map-photo-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 10002;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-map-photo-modal.active {
    transform: translateY(0);
}

.gallery-map-photo-modal::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

.gallery-map-photo-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.gallery-map-photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-map-photo-modal-close i {
    font-size: 1.125rem;
    color: white;
}

.gallery-map-photo-modal-image {
    position: relative;
    padding: 1.25rem;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-map-photo-modal-image img {
    width: auto;
    max-width: 100%;
    max-height: 250px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.gallery-map-photo-modal-content {
    padding: 0.5rem 1.5rem 1.25rem;
}

.gallery-map-photo-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.125rem 0;
    line-height: 1.3;
}

/* Ubicación debajo del título del contexto */
.map-audio-context-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.375rem 0;
}

.map-audio-context-location i {
    color: #f59e0b;
    font-size: 0.875rem;
}

.gallery-map-photo-modal-description {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

.gallery-map-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.8125rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.gallery-map-location-badge i {
    color: #8b5cf6;
}

.gallery-map-view-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #8b5cf6;
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
}

.gallery-map-view-gallery-btn:hover {
    background: #7c3aed;
}

/* Marcadores de foto */
.custom-photo-marker {
    background: transparent;
    border: none;
}

.photo-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-marker-image-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.photo-marker-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-marker-pin {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid white;
    margin-top: -3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Marcadores de galería TribuColab */
.custom-gallery-marker {
    background: transparent;
    border: none;
}

.gallery-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-marker-image-wrapper {
    width: 74px;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-marker-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-marker-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-marker-badge i {
    font-size: 0.75rem;
}

.gallery-marker-name {
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 120px;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-marker-pin {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #8b5cf6;
    margin-top: -3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.custom-gallery-marker:hover .gallery-marker-image-wrapper {
    transform: scale(1.05);
    border-color: #7c3aed;
}

/* Cluster markers */
.marker-cluster {
    background: rgba(139, 92, 246, 0.6);
    border-radius: 50%;
}

.marker-cluster div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .gallery-map-photo-modal {
        bottom: 0;
        top: 0;
        left: auto;
        right: 0;
        transform: translateX(100%);
        max-width: 450px;
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    }
    
    .gallery-map-photo-modal.active {
        transform: translateX(0);
    }
    
    .gallery-map-photo-modal::before {
        display: none;
    }
    
    .gallery-map-photo-modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        background: #f3f4f6;
    }
    
    .gallery-map-photo-modal-close:hover {
        background: #e5e7eb;
        transform: rotate(90deg);
    }
    
    .gallery-map-photo-modal-close i {
        color: #374151;
    }
}


/* ========================================
   BADGE DE NUEVOS AUDIOS/CONTENIDO
   ======================================== */

/* Badge "Nuevo" para galerías con contenido reciente */
.galeria-badge-nuevo {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.4);
    z-index: 5;
    animation: pulseNuevo 2s ease-in-out infinite;
}

.galeria-badge-nuevo i {
    font-size: 0.7rem;
}

@keyframes pulseNuevo {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(238, 90, 36, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(238, 90, 36, 0.6);
    }
}

/* Badge nuevo en últimas galerías */
.ultima-galeria-badge-nuevo {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 2px 6px rgba(238, 90, 36, 0.4);
    z-index: 5;
    animation: pulseNuevo 2s ease-in-out infinite;
}

.ultima-galeria-badge-nuevo i {
    font-size: 0.6rem;
}

/* Badge nuevo en tarjetas de grid */
.galeria-card .galeria-badge-nuevo {
    top: 0.5rem;
    left: 0.5rem;
}

/* Badge nuevo en carrusel */
.galeria-carrusel-item .galeria-badge-nuevo {
    top: 8px;
    left: 8px;
}

/* Badge nuevo en mosaico */
.galeria-mosaico-item .galeria-badge-nuevo {
    top: 6px;
    left: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .galeria-badge-nuevo {
        padding: 2px 6px;
        font-size: 0.55rem;
        gap: 2px;
    }
    
    .galeria-badge-nuevo i {
        font-size: 0.6rem;
    }
    
    .ultima-galeria-badge-nuevo {
        padding: 2px 5px;
        font-size: 0.5rem;
    }
}


/* 🆕 RESPONSIVE - Resultados de búsqueda fotos en mobile */
@media (max-width: 768px) {
    .resultado-fotos-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        margin-top: 0.75rem;
    }
    
    .foto-resultado {
        border-radius: 6px;
    }
    
    .resultado-galeria-grupo {
        margin-bottom: 2rem;
    }
    
    /* Tarjeta normal en mobile */
    .resultado-galeria-grupo > .galeria-card,
    .resultado-galeria-grupo > .galeria-carrusel-item,
    .resultado-galeria-grupo > .galeria-mosaico-item,
    .resultado-galeria-grupo > .galeria-grid-item,
    .resultado-galeria-grupo > .galeria-mosaico-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    /* 🆕 REDUCIR ALTURA EN MOBILE - WRAPPER Y IMAGEN */
    .resultado-galeria-grupo .galeria-image-wrapper {
        padding-top: 0 !important;
        height: 120px !important;
    }
    
    .resultado-galeria-grupo .galeria-image {
        position: relative !important;
        height: 120px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .resultado-galeria-grupo.sin-fotos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sin-resultados-busqueda {
        padding: 3rem 1rem;
    }
    
    .sin-resultados-busqueda i {
        font-size: 3rem;
    }
    
    .sin-resultados-busqueda h3 {
        font-size: 1.125rem;
    }
    
    .sin-resultados-busqueda p {
        font-size: 0.875rem;
    }
    
    .resultados-galerias-section .bloque-header h3,
    .resultados-fotos-section .bloque-header h3 {
        font-size: 1rem;
    }
}

/* ================================================
   ESTADÍSTICAS PÚBLICAS EN TARJETAS DE GALERÍA
   ================================================ */

.galeria-stats-public {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.galeria-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.galeria-stat-item i {
    font-size: 13px;
    color: white;
}

.galeria-stat-item span {
    font-variant-numeric: tabular-nums;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .galeria-stats-public {
        bottom: 6px;
        left: 6px;
        gap: 6px;
    }

    .galeria-stat-item {
        padding: 3px 6px;
        font-size: 10px;
    }

    .galeria-stat-item i {
        font-size: 12px;
    }
}

/* ======================================
   BLOQUE INTRO GALERÍAS VIVE AGUACHICA
   Diseño minimalista y moderno
   ====================================== */

.galerias-intro-block {
    background: transparent;
    padding: 2rem 0 1rem 0;
    margin: 0;
}

/* Ocultar en vista de colección */
body[data-has-navigation="true"] .galerias-intro-block {
    display: none;
}

.galerias-intro-block .container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.galerias-intro-content {
    max-width: 100%;
    text-align: left;
    padding: 0;
}

.galerias-intro-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.galerias-intro-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #6b7280 !important;
    margin: 0 0 1rem 0;
    font-weight: 400;
    max-width: 700px;
}

.galerias-stats {
    display: flex;
    gap: 0;
    align-items: center;
    margin: 0;
    padding: 0;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.125rem;
    margin: 0;
    padding: 0;
}

.stat-icon {
    font-size: 0.75rem;
    color: #6b7280;
}

.stat-number {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.75rem !important;
    font-weight: 600;
    color: #1f2937 !important;
    margin-right: 0.5rem;
}

.stat-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.75rem !important;
    font-weight: 400;
    color: #6b7280 !important;
    text-transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .galerias-intro-block {
        padding: 2rem 0 0.25rem 0;
    }

    .galerias-intro-block .container {
        padding: 0 0.75rem;
    }

    .galerias-intro-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .galerias-intro-text {
        font-size: 0.9375rem;
        line-height: 1.5;
        margin-bottom: 0 !important;
    }

    .galerias-stats {
        gap: 0 !important;
        letter-spacing: -1px !important;
    }

    .stat-item {
        gap: 0 !important;
        letter-spacing: -1px !important;
    }

    .stat-icon {
        font-size: 0.625rem;
        margin-right: -4px !important;
        padding-right: 0 !important;
    }

    .stat-number {
        font-size: 0.625rem !important;
        margin-left: -2px !important;
        padding-left: 0 !important;
        margin-right: 0.5rem !important;
    }

    .stat-label {
        font-size: 0.625rem !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .galerias-intro-block {
        padding: 1.75rem 0 0.25rem 0;
    }

    .galerias-intro-title {
        font-size: 1.375rem;
    }

    .galerias-intro-text {
        margin-bottom: 0 !important;
    }

    .galerias-stats {
        gap: 0 !important;
        letter-spacing: -1px !important;
    }

    .stat-item {
        gap: 0 !important;
        letter-spacing: -1px !important;
    }

    .stat-icon {
        font-size: 0.625rem;
        margin-right: -4px !important;
        padding-right: 0 !important;
    }

    .stat-number {
        font-size: 0.625rem !important;
        margin-left: -2px !important;
        padding-left: 0 !important;
        margin-right: 0.5rem !important;
    }

    .stat-label {
        font-size: 0.625rem !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .galerias-intro-text {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }

    .galerias-stats {
        gap: 1.5rem;
    }

    .stat-icon {
        font-size: 0.625rem;
    }

    .stat-number {
        font-size: 0.625rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   Galerías comunitarias: badge "Comunitaria" + CTA "Sube tus fotos" (overlay inferior)
   Se ubica abajo para NO interferir con los badges superiores (premium, tribu,
   privada, registrados, nuevo).
   ========================================================================== */
.gal-com-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    padding: 7px;
    z-index: 3;
    pointer-events: none;
}

.gal-comunitaria-badge,
.gal-upload-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.gal-comunitaria-badge {
    background: rgba(17, 24, 39, 0.74);
    color: #fff;
}

.gal-comunitaria-badge i {
    font-size: 0.82rem;
}

.gal-upload-cta {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.gal-upload-cta i {
    font-size: 0.82rem;
}

.gal-upload-countdown {
    background: rgba(255, 255, 255, 0.26);
    padding: 1px 5px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.gal-upload-cta.urgent {
    animation: galUploadPulse 1.2s ease-in-out infinite;
}

@keyframes galUploadPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(236, 72, 153, 0.45); transform: translateY(0); }
    50% { box-shadow: 0 5px 18px rgba(236, 72, 153, 0.75); transform: translateY(-1px); }
}

/* En las tarjetas compactas de "últimas galerías" apilamos los pills para que quepan */
.ultima-galeria-image .gal-com-overlay {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 6px;
}

.ultima-galeria-image .gal-comunitaria-badge,
.ultima-galeria-image .gal-upload-cta {
    font-size: 0.6rem;
    padding: 3px 7px;
    max-width: 100%;
}

/* Badge "Comunitaria" en tarjetas del grid/carrusel/mosaico (usa el sistema .galeria-badge) */
.galeria-badge.comunitaria {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Wrapper del CTA "Sube tus fotos" en el grid: justo DEBAJO del badge "Comunitaria"
   (esquina superior derecha). Se retira solo al vencerse el tiempo. */
.gal-upload-grid-wrap {
    position: absolute;
    top: 3rem;
    right: 0.75rem;
    z-index: 3;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
    max-width: calc(100% - 1.5rem);
}

@media (max-width: 768px) {
    .gal-upload-grid-wrap {
        top: 2.35rem;
        right: 0.375rem;
    }
}


/* ========================================
   TARJETA "+N — Ver todas" (6º espacio de un bloque en la principal)
   Lleva a la colección donde vive el bloque para verlo completo.
======================================== */
.galeria-mas-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 1.25rem 1rem;
    border: 1px dashed #d8d5e4;
    border-radius: 12px;
    background: linear-gradient(160deg, #faf9ff 0%, #f4f2fb 100%);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.25s ease, background 0.25s ease,
                transform 0.25s ease, box-shadow 0.25s ease;
}

.galeria-mas-count {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #8b5cf6;
    font-variant-numeric: tabular-nums;
}

.galeria-mas-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.galeria-mas-coleccion {
    font-size: 0.75rem;
    color: #6b7280;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (hover: hover) {
    .galeria-mas-card:hover {
        border-color: #8b5cf6;
        border-style: solid;
        background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 100%);
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(139, 92, 246, 0.16);
    }
}

.galeria-mas-card:active {
    transform: scale(0.98);
}

.galeria-mas-card:focus-visible {
    outline: 3px solid #8b5cf6;
    outline-offset: 2px;
}

/* En el mosaico la tarjeta de cierre llena su celda de la rejilla */
.mosaico-pinterest .galeria-mas-card {
    height: 100%;
    min-height: 220px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .galeria-mas-card {
        min-height: 140px;
        padding: 1rem 0.75rem;
        border-radius: 10px;
    }

    .galeria-mas-count {
        font-size: 1.5rem;
    }

    .galeria-mas-label {
        font-size: 0.8125rem;
    }

    .galeria-mas-coleccion {
        font-size: 0.68rem;
    }

    .mosaico-pinterest .galeria-mas-card {
        min-height: 140px;
        margin-bottom: 0.5rem;
    }
}
