/* fosiles.css */

/* Contenedor principal del catálogo */
.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Encabezado del catálogo */
.catalog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.catalog-header h1 {
    font-family: var(--font-titulos);
    color: var(--color-primario);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.catalog-description {
    font-size: 1.1rem;
    color: var(--color-texto);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Instrucciones AR */
.ar-instructions-top {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.ar-instructions-top h3 {
    font-family: var(--font-titulos);
    color: var(--color-primario);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.ar-instructions-top ol {
    padding-left: 20px;
    list-style: none;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.ar-instructions-top li {
    font-family: var(--font-cuerpo);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ar-instructions-top li span {
    font-weight: bold;
    color: var(--color-acento);
    margin-right: 5px;
}

/* Grid de minerales */
.fossils-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Tarjeta de mineral */
.fossil-card {
    background: var(--color-blanco);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.fossil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Preview del modelo 3D - TAMAÑO REDUCIDO */
.fossil-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.fossil-thumbnail {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

/* Información del mineral */
.fossil-info {
    padding: 1.5rem;
    text-align: center;
}

.fossil-info h3 {
    font-family: var(--font-titulos);
    color: var(--color-primario);
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.fossil-info p {
    color: var(--color-secundario);
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

/* Estilos mejorados para encabezados de categorías */
.category-header {
    grid-column: 1 / -1;
    margin: 3rem 0 2rem 0;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #ff9800 100%);
    color: white;
    border-radius: 16px;
    text-align: center;
    font-family: var(--font-titulos);
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.category-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.category-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.category-header:first-of-type {
    margin-top: 2rem;
}

.category-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(26, 35, 126, 0.4);
    transition: all 0.3s ease;
}

/* Mineral Image Styles - TAMAÑO REDUCIDO */
.mineral-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.fossil-preview:hover .mineral-image {
    transform: scale(1.1);
    filter: brightness(1);
}

.fossil-preview::after {
    content: "🔳 Ver en AR";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fossil-preview:hover::after {
    opacity: 1;
}

.fossil-info .composition {
    color: var(--color-secundario);
    margin: 0 0 0.8rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    background: #f0f4f8;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    display: inline-block;
}

.fossil-info .location {
    color: #555;
    margin: 0 0 0.8rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
    font-style: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.4rem;
    border-radius: 6px;
}

.fossil-info .location:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: translateX(3px);
}

.fossil-info .museum {
    color: #777;
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Botón Ver en 3D/AR */
.view-button {
    background: var(--color-acento);
    color: var(--color-blanco);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-cuerpo);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.view-button:hover {
    background: #d35400;
    transform: scale(1.05);
}

/* Indicador de falta de archivo RA */
.no-ar-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Buscador */
.search-container {
    margin-bottom: 2rem;
}

#buscador {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    font-family: var(--font-cuerpo);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#buscador:focus {
    border-color: var(--color-acento);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
    transform: translateY(-2px);
}

#buscador::placeholder {
    color: #999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--color-blanco);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--color-primario);
}

#modalTitle {
    font-family: var(--font-titulos);
    color: var(--color-primario);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
}

.modal-viewer {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.modal-instructions {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.modal-instructions p {
    margin: 0;
    color: var(--color-secundario);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-header h1 {
        font-size: 2rem;
    }

    .fossils-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .fossil-preview {
        height: 180px;
    }

    .category-header {
        font-size: 1.5rem;
        padding: 1rem 1.5rem;
    }

    .ar-instructions-top ol {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
        margin: 5% auto;
    }

    .modal-viewer {
        height: 400px;
    }

    #modalTitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .fossils-grid {
        grid-template-columns: 1fr;
    }

    .fossil-preview {
        height: 160px;
    }
}