/* index.php */

   /* Estructura de la Grilla Responsiva */
   .pokedex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding: 0 10px;
}

/* Tarjeta de Pokémon */
.pokemon-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    min-height: 220px;
    text-decoration: none; 
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    box-sizing: border-box;
    justify-content: flex-start;
}

.pokemon-card:hover {
    transform: translateY(-5px);
    background: #f3f3f3;
    border-color: var(--cp-red);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Contenedor de Imagen */
.img-container { 
    width: 85px; 
    height: 85px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px;
    flex-shrink: 0;
}
.img-container img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08)); 
}

/* Información del Pokémon */
.pokemon-info { 
    text-align: center; 
    width: 100%; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pokemon-card .number { 
    font-size: 0.65em; 
    color: #999; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 2px;
}

.pokemon-card .name { 
    font-size: 0.85em; 
    font-weight: 800; 
    text-transform: uppercase; 
    color: var(--pk-dark); 
    line-height: 1.2;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Especialidades */
.spec-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: auto; 
    padding-top: 10px;
    width: 100%;
}

.icon-wrapper {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.mini-spec { width: 28px; height: 28px; object-fit: contain; }

.unknown-spec {
    font-size: 0.65em;
    color: #bbb;
    font-style: italic;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    height: 30px;
}

/* Buscador y Hub */
.home-search { max-width: 500px; margin: 0 auto 40px; text-align: center; padding: 0 15px; }
.home-search input {
    width: 100%; padding: 15px 25px; border-radius: 30px; border: 2px solid #eee;
    outline: none; font-size: 1em; transition: 0.3s;
}
.home-search input:focus { border-color: var(--cp-red); }

.hub-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; padding: 0 15px; font-weight: 600;}
.hub-card-main {
    position: relative; height: 110px; border-radius: 15px; overflow: hidden;
    text-decoration: none; color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: 0.3s;
}
.habitat-bg { background: url('/pokopiadex/img/menu/habitats_bg.webp') no-repeat center center; background-size: cover; }
.special-bg { background: url('/pokopiadex/img/menu/especialidades_bg.webp') no-repeat center center; background-size: cover; }
.hub-overlay {
    background: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 100%);
    width: 100%; height: 100%; display: flex; align-items: center; padding: 0 20px; gap: 15px;
}

/* AJUSTES PARA MÓVILES */
@media (max-width: 480px) {
    .hub-container { grid-template-columns: 1fr; gap: 10px; }
    .pokedex-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .pokemon-card { padding: 10px; min-height: 190px; }
    .img-container { width: 65px; height: 65px; }
    .pokemon-card .name { font-size: 0.75em; }
    .icon-wrapper { width: 32px; height: 32px; }
    .mini-spec { width: 24px; height: 24px; }
    .unknown-spec { font-size: 0.55em; height: 25px; }
}