/* -------------------------------
   Body y contenedores
-------------------------------- */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #111;
    margin: 0;
    padding: 0;
    background-image: url('background2.jpg'); /* Pon aquí la ruta real */
    background-repeat: no-repeat;       /* No repetir la imagen */
    background-position: center center; /* Centrada */
    background-attachment: fixed;       /* Fija al hacer scroll */
    background-size: cover;             /* Ocupa todo el fondo manteniendo proporción */
}

}

.max-w-6xl {
    max-width: 1200px;
    margin: 0 auto;
}

.max-w-4xl {
    max-width: 800px;
    margin: 0 auto;
}

/* -------------------------------
   Lista
-------------------------------- */
#listView {
    list-style: none;
    padding: 0;
}

#listView li {
    cursor: pointer;
    transition: background-color 0.2s;
}

/* -------------------------------
   Tabla
-------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 0.5rem;
    text-align: left;
}

table th {
    cursor: pointer;
    background-color: #eee;
}

table tbody tr:hover {
    background-color: #f2f2f2;
}

/* -------------------------------
   Barra de progreso
-------------------------------- */
.progress-bar {
    height: 16px; /* h-4 */
    border-radius: 4px;
    background-color: #3b82f6; /* azul predeterminado */
}

/* -------------------------------
   Botones
-------------------------------- */
button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
}

button:hover {
    opacity: 0.9;
}

/* -------------------------------
   Inputs
-------------------------------- */
input[type="number"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    width: 60px;
}

/* -------------------------------
   Hidden
-------------------------------- */
.hidden {
    display: none;
}

/* -------------------------------
   Links
-------------------------------- */
a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* -------------------------------
   Otros
-------------------------------- */
.bg-white {
    background-color: #fff;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cursor-pointer {
    cursor: pointer;
}

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

.ml-2 { margin-left: 0.5rem; }

.text-blue-600 { color: #2563eb; }

/* ────────────────────────────────
   GRID LAYOUT
────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 0;
    list-style: none;
}


/* ────────────────────────────────
   CARD BASE
────────────────────────────────── */
.card {
    background: white;
    border-radius: 16px;
    padding: 16px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;

    /* Animation base */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

/* Reveal via IntersectionObserver */
[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}


/* ────────────────────────────────
   IMAGE INSIDE THE CARD
────────────────────────────────── */
.card-inner img {
    width: 100%;
    height: 300px;
    object-fit: cover;

    border-radius: 12px;
    margin-bottom: 16px;

    opacity: 0;
    transition: opacity .5s
}

[data-animate].visible .card-inner img {
    opacity: 1;
}


/* ────────────────────────────────
   TITLE
────────────────────────────────── */
.card-inner h2 {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
}


/* ────────────────────────────────
   HOVER EFFECT
────────────────────────────────── */
.card:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    transition: transform 5s ease, box-shadow 5s ease;
}


/* ────────────────────────────────
   ANIMATION ATTRIBUTES
────────────────────────────────── */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

