/* ===== RESET Y ESTILOS BASE PARA GALERÍA ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* ===== LAYOUT PRINCIPAL ===== */
.main-content {
    width: 100%;
    padding: 20px 0;
}

/* ===== HEADER Y TÍTULO ===== */
.page-title {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    background: linear-gradient(90deg, #4fc3f7, #00e5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 10px 0;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.search-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 10px;
    background: rgba(20, 20, 30, 0.8);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3);
}

.neon-search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.neon-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.4);
}

.clear-search {
    color: #4fc3f7;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    background: rgba(79, 195, 247, 0.1);
    transition: all 0.3s;
}

.clear-search:hover {
    background: rgba(79, 195, 247, 0.2);
    text-decoration: none;
}

/* ===== FILTROS POR CATEGORÍA ===== */
.category-filters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(30, 30, 40, 0.8);
    color: #aaa;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(50, 50, 60, 0.8);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    border-color: #4fc3f7;
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.3);
}

.filter-btn span {
    font-size: 1.2rem;
}

/* ===== ESTADÍSTICAS ===== */
.stats-display {
    width: 100%;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 195, 247, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    color: #4fc3f7;
    margin-bottom: 5px;
}

.stat-label {
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== GALERÍA PRINCIPAL (SIEMPRE 100% ANCHO) ===== */
.gallery-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.empty-message {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    background: rgba(20, 20, 30, 0.5);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    color: #4fc3f7;
}

.empty-message h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.empty-message p {
    color: #aaa;
    margin-bottom: 20px;
}

.neon-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.neon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 195, 247, 0.4);
    text-decoration: none;
}

/* ===== GRILLA DE GALERÍA ===== */
#gallery-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    padding: 20px 0 !important;
    margin: 0 !important;
}

.gallery-item {
    width: 100% !important;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(20, 20, 30, 0.7);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 3/4; /* Mantener proporción de las imágenes */
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(79, 195, 247, 0.5);
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

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

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

.image-title {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.image-category {
    color: #4fc3f7;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.image-weight {
    color: #00e5ff;
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: linear-gradient(135deg, #00e5ff, #00bcd4);
    transform: scale(1.02);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Móviles pequeños (menos de 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 1.8rem;
        padding: 5px 0;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-input, 
    .neon-search-btn,
    .clear-search {
        width: 100%;
    }
    
    .category-filters {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 10px 15px;
    }
    
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 15px !important;
    }
    
    .gallery-item {
        aspect-ratio: 2/3;
    }
    
    .image-overlay {
        padding: 15px;
    }
    
    .image-title {
        font-size: 1rem;
    }
}

/* Tablets y móviles grandes (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 20px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets grandes (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        gap: 25px !important;
    }
}

/* Escritorio (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        padding: 0 40px;
        max-width: 1400px;
    }
    
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 30px !important;
    }
}

/* Escritorio grande (más de 1440px) */
@media (min-width: 1441px) {
    .container {
        padding: 0 60px;
        max-width: 1600px;
    }
    
    #gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        gap: 35px !important;
    }
    
    .page-title {
        font-size: 3rem;
    }
    
    .search-input {
        padding: 18px 25px;
        font-size: 1.1rem;
    }
    
    .neon-search-btn {
        padding: 18px 35px;
        font-size: 1.1rem;
    }
}

/* ===== CORRECCIÓN ESPECÍFICA PARA PANTALLAS > 760px ===== */
/* Esto fuerza a que la galería siempre ocupe el 100% */
@media (min-width: 761px) {
    .gallery-container {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    #gallery-grid {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ===== CORRECCIÓN PARA LAYOUT DE 3 COLUMNAS ===== */
/* Si hay un contenedor padre dividiendo en 3 columnas */
.main-content > .container > div {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
}

/* Eliminar cualquier float que cause problemas */
.gallery-container:before,
.gallery-container:after {
    content: "";
    display: table;
    clear: both;
}

/* ===== UTILIDADES ===== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease-out;
}

/* Retraso escalonado para los elementos de la galería */
.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: 1.0s; }

/* ===== CORRECCIÓN PARA FIREFOX ===== */
@-moz-document url-prefix() {
    .gallery-item {
        display: flex;
        flex-direction: column;
    }
    
    .gallery-item img {
        flex: 1;
    }
}

/* ===== CORRECCIÓN PARA SAFARI ===== */
@media not all and (min-resolution: 0.001dpcm) {
    @supports (-webkit-appearance:none) {
        .gallery-item {
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }
    }
}

/* Agregar al final de galeria.css */

/* ===== CORRECCIÓN ESPECÍFICA PARA EL PROBLEMA DE 3 COLUMNAS ===== */

/* Asegurar que el main-content ocupe 100% */
.main-content {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Contenedor principal - ancho completo */
.main-content > .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    float: none !important;
    clear: both !important;
    display: block !important;
}

/* Resetear cualquier grid o flex que cause problemas */
.main-content > .container > * {
    width: 100% !important;
    float: none !important;
    display: block !important;
    clear: both !important;
}

/* Forzar la galería al 100% */
.gallery-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
    clear: both !important;
    position: relative;
}

/* Reset de cualquier layout de columnas */
body > div,
body > div > div,
body > div > div > div {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
}

/* Si hay un sistema de grid, resetearlo */
.row, 
.columns, 
.grid,
[class*="col-"],
[class*="column"] {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Eliminar cualquier margen negativo que cause overflow */
*[style*="margin-left"],
*[style*="margin-right"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ===== FIX PARA FOOTER MEZCLADO ===== */
footer, 
.footer,
#footer {
    clear: both !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    margin-top: 50px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Asegurar que el footer esté después del main */
main {
    min-height: calc(100vh - 200px);
    display: block;
    position: relative;
}

/* Clearfix para contenedores */
.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.gallery-container:before,
.gallery-container:after {
    content: " ";
    display: table;
    clear: both;
}

/* ===== FIX ESPECÍFICO PARA PANTALLAS > 760px ===== */
@media (min-width: 761px) {
    /* Deshabilitar cualquier layout de columnas */
    body {
        display: block !important;
    }
    
    .main-content {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Forzar single column layout */
    .main-content > * {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
    
    /* Asegurar que la galería no flote */
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        grid-auto-flow: row !important;
    }
}

/* ===== ESTILOS PARA PÁGINA DE DESCARGA ===== */
.download-page {
    padding: 20px 0;
    min-height: 80vh;
}

.download-main-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.preview-column {
    flex: 1;
    min-width: 300px;
}

.options-column {
    flex: 1;
    min-width: 300px;
}

.preview-container {
    margin-bottom: 20px;
}

.preview-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quick-info {
    background: rgba(20, 20, 30, 0.7);
    border-radius: 10px;
    padding: 20px;
}

.quick-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-info-item:last-child {
    border-bottom: none;
}

.quick-info-label {
    color: #aaa;
    font-size: 14px;
}

.quick-info-value {
    color: white;
    font-weight: 500;
}

.download-options {
    margin-bottom: 30px;
}

.options-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.option-card {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.9));
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(79, 195, 247, 0.3);
    margin-bottom: 20px;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.option-icon {
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.3);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.option-header-text {
    flex: 1;
}

.option-title {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.option-subtitle {
    color: #aaa;
    margin: 0;
    font-size: 0.9rem;
}

.option-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.option-specs li {
    color: #ddd;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-specs li:last-child {
    border-bottom: none;
}

.spec-icon {
    color: #4fc3f7;
    width: 20px;
    text-align: center;
}

.option-specs strong {
    color: white;
    font-weight: 600;
}

.download-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.download-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 195, 247, 0.4);
    text-decoration: none;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-btn {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.image-info-section {
    background: rgba(20, 20, 30, 0.5);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.info-section-title {
    color: white;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.info-card {
    background: rgba(20, 20, 30, 0.7);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card-icon {
    font-size: 1.5rem;
    color: #4fc3f7;
}

.info-card-title {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.info-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #aaa;
    font-size: 14px;
    flex: 1;
}

.info-value {
    color: white;
    font-weight: 500;
    flex: 2;
    text-align: right;
    word-break: break-word;
}

.tags-section {
    margin-top: 30px;
}

.tags-title {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(79, 195, 247, 0.2);
    color: #4fc3f7;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

.tag:hover {
    background: rgba(79, 195, 247, 0.4);
    text-decoration: none;
    transform: translateY(-2px);
}

.tag-neon {
    background: rgba(0, 229, 255, 0.2);
    color: #00e5ff;
    border-color: rgba(0, 229, 255, 0.3);
}

.tag-digital {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border-color: rgba(156, 39, 176, 0.3);
}

.tag-free {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border-color: rgba(76, 175, 80, 0.3);
}

/* Responsive para descarga */
@media (max-width: 768px) {
    .download-main-layout {
        flex-direction: column;
    }
    
    .preview-column,
    .options-column {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        min-width: 100%;
    }
}




