/* Estilo 4: Cinematic Glow Reveal */
.priego-card-s4 {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #0a0a0a;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    cursor: pointer;
}

.s4-image-container {
    position: absolute;
    inset: 0;
    transition: transform 2.2s var(--priego-flip-ease, cubic-bezier(0.4, 0.05, 0.25, 1));
}

.s4-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.7;
    transition: opacity 1.5s var(--priego-flip-ease, cubic-bezier(0.4, 0.05, 0.25, 1));
}

.priego-card-s4:hover .s4-image-container {
    transform: scale(1.15);
}

.priego-card-s4:hover .s4-image-container img {
    opacity: 0.3;
}

/* El titulo va centrado y el radial era transparente justo en el centro: con una foto
   clara ahi el texto desaparecia. Se añade una veladura minima en el centro (spotlight
   invertido) que no toca los bordes ni el aspecto de vigneta original. */
.s4-gradient-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at center, rgba(11, 18, 38, 0.45) 0%, rgba(11, 18, 38, 0) 100%),
        radial-gradient(circle at center, transparent 0%, #0a0a0a 120%);
    transition: background 1.5s var(--priego-flip-ease, cubic-bezier(0.4, 0.05, 0.25, 1));
}

.priego-card-s4:hover .s4-gradient-overlay {
    background: radial-gradient(circle at center, rgba(37,60,120,0.8) 0%, #0a0a0a 100%); /* Glow base color */
}

.s4-text-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 30px 85px 30px; /* Espacio para el botón absoluto */
    z-index: 5;
    transition: opacity 1.05s ease, transform 1.35s var(--priego-flip-ease, cubic-bezier(0.4, 0.05, 0.25, 1));
    overflow: hidden auto; /* hidden en X: overflow-y:auto solo forzaría overflow-x a auto y saca scroll horizontal */
}

.priego-card-s4:hover .s4-text-layer {
    opacity: 0;
    transform: scale(0.9);
}

.s4-tag {
    color: #db6889;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(219,104,137,0.5);
}

.s4-title {
    color: #fff;
    text-shadow: 0 1px 2px rgba(11, 18, 38, 0.55), 0 10px 30px rgba(11, 18, 38, 0.4);
    font-size: 2.2rem;
    font-weight: 300;
    text-align: center;
    margin: 0;
    font-family: serif;
    letter-spacing: 1px;
}

/* Reveal Layer */
.s4-hover-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 40px 90px 40px; /* Espacio para el botón absoluto */
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.15s ease 0.25s;
    overflow: hidden auto;
}

.priego-card-s4:hover .s4-hover-layer {
    opacity: 1;
    pointer-events: auto;
}

.s4-hover-content {
    text-align: center;
    transform: translateY(30px);
    transition: transform 1.15s var(--priego-flip-ease, cubic-bezier(0.4, 0.05, 0.25, 1)) 0.25s;
}

.priego-card-s4:hover .s4-hover-content {
    transform: translateY(0);
}

.s4-back-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.s4-back-desc {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.s4-action-layer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

.s4-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease;
}

.s4-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #db6889;
    transition: left 0.4s ease;
    z-index: -1;
}

.s4-button:hover {
    border-color: #db6889;
}

.s4-button:hover::before {
    left: 0;
}
