/* --- ESTILO DE LAS CARTAS (MENU GRID) --- */
.card-wrap {
    position: relative;
    width: 100%;
    max-width: 350px; 
    margin: 0 auto;
    margin-bottom: 35px;

    background-image: url('../img/card.png');
    background-repeat: no-repeat;
    background-size: 100% 100%; 
    background-position: center;
    
    /* Padding inferior para el sello */
    padding: 30px 30px 75px 30px;
    min-height: 260px; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
    filter: drop-shadow(5px 10px 10px rgba(0,0,0,0.6));    filter: drop-shadow(5px 10px 10px rgba(0,0,0,0.6));
    transition: transform 0.5s ease;
}

.card-wrap:hover,
.card-wrap:focus-within {
    scale: 1.1; 
    z-index: 100;
    cursor: pointer;
    transition: all 0.5s ease;
}

/* --- CABECERA DE LA CARTA --- */
.card-header-row {
    display: flex;
    flex-direction: row;
    align-items: center; 
    justify-content: center;
    gap: 4px; 
    width: 100%;
    margin-bottom: 5px;
    height: 45px; 
}

.card-title {
    font-family: 'Pirata One', cursive;
    font-size: 2rem; 
    color: var(--gold-treasure);
    text-shadow: 
        2px 2px 0px #3e2723, 
        -1px -1px 0px #3e2723,
        1px -1px 0px #3e2723,
        -1px 1px 0px #3e2723,
        1px 1px 0px #3e2723;
    margin-bottom: 0; 
    line-height: 1;
}

.card-icon-big {
    font-size: 1.6rem; 
    margin: 0; 
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.5));
}

img.card-icon-big {
    width: 45px;       
    height: auto;
    object-fit: contain;
    margin-right: 5px;
}

.card-desc {
    font-size: 0.9rem; 
    color: #ffca28; 
    font-weight: 900; 
    text-shadow: 1.5px 1.5px 0px #211512;
    line-height: 1.2;
    margin-bottom: 0;
    flex-grow: 1; 
    display: flex;
    align-items: center; 
    justify-content: center;
    max-width: 98%; 
}

/* --- ELEMENTOS DEL FORMULARIO (ESPECÍFICOS DE HOME) --- */
.form-wrapper {
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    margin-top: auto; 
    margin-bottom: 15px; 
}

.pirate-select {
    background-color: #fff0d0; 
    background-image: radial-gradient(ellipse at center, #fffaf0 10%, #f2e2c2 100%);
    box-shadow: inset 0 0 6px rgba(93, 64, 55, 0.3);
    border: 3px ridge #8d6e63;
    border-radius: 4px;
    color: #3e2723;
    font-family: 'Pirata One', cursive;
    font-size: 1.2rem;
    font-weight: normal;
    padding: 5px 10px;
    text-align: center;
    width: 90%;
    cursor: pointer;
    margin-bottom: 0; 
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: 
        radial-gradient(ellipse at center, #fffaf0 10%, #f2e2c2 100%),
        url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%233e2723%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat, no-repeat;
    background-position: center, right .7em top 50%;
    background-size: cover, .65em auto;
}

.pirate-select:hover {
    background-color: #fffaf0;
    border-color: #a1887f;
}

.pirate-select:focus, .pirate-select:focus-visible {
    outline: none !important;
    border-color: var(--gold-treasure) !important;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.6) !important;
}

.pirate-select option {
    background-color: #fff0d0;
    color: #3e2723;
    font-family: 'Pirata One', cursive;
    font-size: 1.1rem;
    padding: 10px;
}

/* Botón Sello (Zarpar) */
.btn-seal-img {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    height: 70px;
    width: auto;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 5;
    filter: drop-shadow(3px 3px 4px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}

.btn-seal-img:hover {
    transform: translateX(-50%) scale(1.05);
}

/* --- ROTACIONES GRID (PC) --- */
@media (min-width: 992px) {
    .col-lg-4:nth-child(1) .card-wrap { transform: rotate(-4deg); margin-top: 20px; }
    .col-lg-4:nth-child(3) .card-wrap { transform: rotate(5deg); margin-top: 20px; }
    .col-lg-4:nth-child(4) .card-wrap { transform: rotate(-3deg); }
    .col-lg-4:nth-child(5) .card-wrap { transform: rotate(4deg); }

    .card-wrap { margin-bottom: 0; }
}

/* Ajustes Mobile de Cartas */
@media (max-width: 600px) {
    .card-wrap {
        min-height: 240px; 
        transition: none;
    }
    .card-wrap:hover,
    .card-wrap:focus-within {
        scale: 1.0;
        transform: none; 
        z-index: auto;
        transition: none; 
    }
    .pirate-select{
        margin-top: 5px;
    }
}

/* --- ANIMACIONES ENTRADA HOME --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-animate {
    opacity: 0; 
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Retardos escalonados para las cartas */
.col-12:nth-child(1).card-animate { animation-delay: 0.1s; }
.col-12:nth-child(2).card-animate { animation-delay: 0.2s; }
.col-12:nth-child(3).card-animate { animation-delay: 0.3s; }
.col-12:nth-child(4).card-animate { animation-delay: 0.4s; }
.col-12:nth-child(5).card-animate { animation-delay: 0.5s; }
.col-12:nth-child(6).card-animate { animation-delay: 0.6s; }