/* ======================
   UTILIDADES GENERALES
   ====================== */
.alignleft {
    float: left;
    margin-right: 25px;
    margin-bottom: 30px;
    text-align: left;
    margin-top: 0;
}

/* Limpia floats */
.clear-both {
    clear: both;
}

/* ======================
   CONTENEDORES DE CARTAS
   ====================== */
.conteTarot {
    display: block;
    width: 100%;
}

/* Imagen de carta individual en resultados */
.imagenTarot,
.tarot-post-image {
    padding: 2px;
    float: left;
    padding-right: 15px;
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

/* ======================
   GRID DE SELECCIÓN DE CARTAS
   ====================== */
.c-tarot-img {
    width: 18%;
    max-width: 60px;
    min-width: 40px;
    height: auto;
    padding: 5px;
    margin: 5px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 2px 2px 10px rgba(15, 14, 14, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backface-visibility: hidden;
    -moz-osx-font-smoothing: grayscale;
}

.c-tarot-img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 4px 4px 15px rgba(15, 14, 14, 0.5);
}

.c-tarot-img:active {
    transform: scale(0.95);
}

/* Carta seleccionada (opacity 0.5) */
.c-tarot-img[style*="opacity: 0.5"] {
    filter: grayscale(50%);
    cursor: not-allowed;
}

/* ======================
   OVERLAYS DE SELECCIÓN
   ====================== */
#overlay0, #overlay1 {
    text-align: center;
    padding: 20px 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#overlay1 {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

/* Contador de cartas */
#textof {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    /*display: inline-block;*/
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#textos-o {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 1.6;
}

/* ======================
   CONTENEDOR DE IMAGEN CON TEXTO
   ====================== */
.containerimg {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.centeredtxt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* ======================
   PÁGINAS RELACIONADAS
   ====================== */
.relatedpages {
    padding: 0.5em;
    margin-top: 0;
    display: inline-flex;
    font-size: var(--global--font-size-xs, 14px);
    min-height: 44px;
    min-width: max-content;
    box-shadow: none;
    color: var(--button--color-background-active, #fff);
    border: 2px solid var(--button--color-text-active, #4CAF50);
    background-color: var(--button--color-text-active, #4CAF50);
    border-radius: 6px;
}

.otrocolor {
    padding: 8px;
    display: inline-flex;
    box-shadow: none;
    background: #333;
    color: #fff;
    border-radius: 4px;
    margin: 0 4px;
}

/* ======================
   RESPONSIVE - TABLETS
   ====================== */
@media (max-width: 768px) {
    .c-tarot-img {
        width: 28%;
        max-width: 100px;
        min-width: 70px;
        margin: 3px;
        padding: 3px;
    }
    
    #textof {
        font-size: 1.2rem;
        padding: 8px 15px;
    }
    
    .imagenTarot,
    .tarot-post-image {
        max-width: 150px;
        padding-right: 10px;
    }
    
    .centeredtxt {
        font-size: 1.5rem;
    }
    
    #overlay0, #overlay1 {
        padding: 15px 5px;
    }
}

/* ======================
   RESPONSIVE - MÓVILES
   ====================== */
@media (max-width: 480px) {
    .alignleft {
        float: none;
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
        display: block;
        max-width: 100% !important;
    }
    
    .c-tarot-img {
        width: 28%;
        max-width: 60px;
        min-width: 40px;
        margin: 2px;
        padding: 2px;
    }
    
    #textof {
        font-size: 1rem;
        padding: 6px 12px;
        margin-bottom: 10px;
    }
    
    .imagenTarot,
    .tarot-post-image {
        float: none;
        max-width: 100%;
        margin: 0 auto 15px;
        display: block;
        padding: 0;
    }
    
    .centeredtxt {
        font-size: 1.2rem;
    }
    
    #overlay0, #overlay1 {
        padding: 10px 5px;
        border-radius: 8px;
    }
    
    #textos-o {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .otrocolor {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
}

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

#overlay1 {
    animation: fadeIn 0.5s ease-out;
}

#btnTirar {
    animation: fadeIn 0.5s ease-out 0.3s backwards;
}