/* Estilos específicos para la Galería de Fotos */

/* Hero Section de Galería */
.galeria-hero {
    background: linear-gradient(135deg, #000 0%, #111 50%, #000 100%);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.galeria-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.galeria-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.galeria-hero h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.galeria-hero p {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



/* Filtros de Galería */
.galeria-filters {
    background: #111;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-groups {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.search-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}



.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #333;
    color: #ccc;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    background: #222;
    border: 2px solid #333;
    color: #fff;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    background: #333;
}

.search-input::placeholder {
    color: #666;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
}

.results-counter {
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-weight: 500;
}

/* Galería Principal */
.galeria-main {
    background: #000;
    min-height: 100vh;
    padding: 2rem 0;
}

.galeria-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.galeria-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(280px, auto);
    grid-auto-flow: dense;
    gap: 3rem 2rem;
    align-items: start;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #111;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
    flex: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Cards horizontales (imágenes anchas) */
.gallery-item.horizontal {
    grid-row: span 1;
    min-height: 280px;
}

/* Cards verticales (imágenes altas) */
.gallery-item.vertical {
    grid-row: span 2;
    min-height: 560px;
}

/* Cards cuadradas (imágenes cuadradas) */
.gallery-item.square {
    grid-row: span 1;
    min-height: 280px;
}

/* Cards grandes para imágenes destacadas */
.gallery-item.featured {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 560px;
}

/* Optimización para evitar espacios vacíos */
.gallery-item {
    break-inside: avoid;
    page-break-inside: avoid;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Overlay mejorado para cards verticales */
.gallery-item.vertical .gallery-overlay {
    padding: 1.5rem 1rem 1rem;
}

/* Overlay mejorado para cards horizontales */
.gallery-item.horizontal .gallery-overlay {
    padding: 2.5rem 2rem 2rem;
}

/* Overlay para cards destacadas */
.gallery-item.featured .gallery-overlay {
    padding: 3rem 2.5rem 2.5rem;
}



.overlay-content p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tags-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.oferta-tag {
    display: inline-block;
    background: #DAA520;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}



/* Efectos de hover mejorados */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0,123,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Modal */
.galeria-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.galeria-modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

.modal-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    object-position: center;
}



.modal-category {
    display: none;
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(0,0,0,0.8);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.3s ease;
}









.modal-category span {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    white-space: nowrap;
}



.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    box-sizing: border-box;
}

.nav-btn {
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: all;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #fff;
    font-size: 1.1rem;
}

/* Responsive Design */

/* Desktop grande */
@media (max-width: 1400px) {
    .galeria-container {
        padding: 0 1.5rem;
    }
    
    .galeria-masonry {
        gap: 2.5rem 1.5rem;
    }
}

/* Desktop mediano */
@media (max-width: 1200px) {
    .galeria-hero h1 {
        font-size: 3rem;
    }
    
    .galeria-hero p {
        font-size: 1.2rem;
    }
    
    .galeria-container {
        padding: 0 1rem;
    }
}

/* Tablet grande */
@media (max-width: 1024px) {
    .galeria-hero {
        padding: 100px 0 60px;
    }
    
    .galeria-hero h1 {
        font-size: 2.8rem;
    }
    
    .galeria-hero p {
        font-size: 1.1rem;
    }
    
    .galeria-masonry {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 280px;
        grid-auto-flow: dense;
        gap: 2.5rem 1.5rem;
    }
    
    .gallery-item.featured {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-image-container {
        max-width: 85%;
        max-height: 75%;
    }
}

/* Tablet mediana */
@media (max-width: 900px) {
    .galeria-hero h1 {
        font-size: 2.5rem;
    }
    
    .galeria-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
        grid-auto-flow: dense;
        gap: 2.5rem 1.5rem;
    }
    
    .filters-container {
        padding: 0 1rem;
    }
    
    .filter-groups {
        gap: 1.5rem;
    }
}

/* Tablet pequeña */
@media (max-width: 768px) {
    .galeria-hero {
        padding: 80px 0 50px;
    }
    
    .galeria-hero h1 {
        font-size: 2.2rem;
    }
    
    .galeria-hero p {
        font-size: 1rem;
    }
    
    .galeria-filters {
        padding: 1rem 0;
    }
    
    .filter-groups {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        max-width: none;
    }
    
    .galeria-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
        grid-auto-flow: dense;
        gap: 2rem 1rem;
    }
    
    .gallery-item {
        min-height: 240px;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .modal-image-container {
        width: 100%;
        height: 100%;
    }
    
    .modal-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .modal-category {
        bottom: 1rem;
        left: 1rem;
        padding: 0.6rem 1rem;
        border-radius: 20px;
        position: absolute;
    }
    

    

    
    .modal-category span {
        font-size: 0.8rem;
    }
    
    .modal-navigation {
        padding: 0 1rem;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    

    
    .overlay-content p {
        font-size: 0.9rem;
    }
}

/* Móvil grande */
@media (max-width: 600px) {
    .galeria-hero h1 {
        font-size: 2rem;
    }
    
    .galeria-hero p {
        font-size: 0.95rem;
    }
    
    /* Filtros en filas de dos para móvil grande */
    .filter-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        width: 100%;
    }
    
    .filter-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        min-height: auto;
        width: 100%;
        justify-content: center;
    }
    
    .galeria-masonry {
        grid-template-columns: repeat(1, 1fr);
        grid-auto-rows: 250px;
        grid-auto-flow: dense;
        gap: 2rem 1rem;
    }
    
    .gallery-item {
        min-height: 250px;
    }
    
    .search-input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.95rem;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .galeria-hero {
        padding: 70px 0 40px;
    }
    
    .galeria-hero h1 {
        font-size: 1.8rem;
    }
    
    .galeria-hero p {
        font-size: 0.9rem;
    }
    
    .galeria-container {
        padding: 0 0.75rem;
    }
    
    .filters-container {
        padding: 0 0.75rem;
    }
    
    /* Filtros en filas de dos para móvil */
    .filter-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
    }
    
    .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-height: auto;
        width: 100%;
        justify-content: center;
    }
    
    .galeria-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
        grid-auto-flow: dense;
        gap: 1.5rem 0.75rem;
    }
    
    .gallery-item {
        min-height: 220px;
    }
    
    .search-input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.9rem;
    }
    
    .modal-image-container {
        width: 100%;
        height: 100%;
    }
    
    .modal-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .modal-category {
        bottom: 0.75rem;
        left: 0.75rem;
        padding: 0.5rem 0.75rem;
        border-radius: 15px;
        position: absolute;
    }
    

    

    
    .modal-category span {
        font-size: 0.75rem;
    }
    
    .modal-navigation {
        padding: 0 1rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    

    
    .overlay-content p {
        font-size: 0.8rem;
    }
    
    .category-tag, .oferta-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Móvil muy pequeño */
@media (max-width: 360px) {
    .galeria-hero h1 {
        font-size: 1.6rem;
    }
    
    .galeria-hero p {
        font-size: 0.85rem;
    }
    
    .galeria-masonry {
        grid-auto-rows: 200px;
        grid-auto-flow: dense;
        gap: 1rem 0.5rem;
    }
    
    .gallery-item {
        min-height: 200px;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .search-input {
        padding: 0.4rem 0.6rem 0.4rem 1.8rem;
        font-size: 0.85rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1s; }

/* Scrollbar personalizada */
.galeria-main::-webkit-scrollbar {
    width: 8px;
}

.galeria-main::-webkit-scrollbar-track {
    background: #111;
}

.galeria-main::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.galeria-main::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
} 

/* Oculta los elementos filtrados */
.filtrado {
    display: none !important;
} 