/* Style 3: Elegant Reveal Sweep */
.priego-card-s3 {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: box-shadow 0.4s ease;
}

.priego-card-s3:hover,
.priego-card-s3.touch-active {
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.s3-front-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.s3-bg-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.8s ease;
}

.priego-card-s3:hover .s3-bg-image,
.priego-card-s3.touch-active .s3-bg-image {
    transform: scale(1.06);
}

.s3-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
}

.s3-content-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 30px 80px 30px; /* Espacio inferior para el botón */
    z-index: 2;
    transition: opacity 0.3s ease;
}

.priego-card-s3:hover .s3-content-wrapper,
.priego-card-s3.touch-active .s3-content-wrapper {
    opacity: 0;
}

.s3-tag {
    display: inline-block;
    background: #c89628; /* Priego Gold */
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.s3-title {
    color: #fff;
    font-size: 2rem;
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0 0 10px 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.s3-front-desc {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reveal layer */
.s3-reveal-layer {
    position: absolute;
    inset: 0;
    background: #253c78; /* Priego Navy */
    z-index: 5;
    clip-path: circle(0% at 100% 100%);
    -webkit-clip-path: circle(0% at 100% 100%);
    transition: clip-path 0.7s cubic-bezier(0.19, 1, 0.22, 1), -webkit-clip-path 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 40px 80px 40px; /* Espacio inferior para el botón */
    overflow-y: auto;
}

.priego-card-s3:hover .s3-reveal-layer,
.priego-card-s3.touch-active .s3-reveal-layer {
    clip-path: circle(150% at 100% 100%);
    -webkit-clip-path: circle(150% at 100% 100%);
}

.s3-reveal-layer::-webkit-scrollbar { width: 4px; }
.s3-reveal-layer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.s3-reveal-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.priego-card-s3:hover .s3-reveal-content,
.priego-card-s3.touch-active .s3-reveal-content {
    opacity: 1;
    transform: translateY(0);
}

.s3-back-title {
    color: #fff;
    font-size: 2.2rem;
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 15px;
    line-height: 1.2;
}

.s3-back-desc {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.s3-action-layer {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 10;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
}

.s3-btn-line {
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.s3-button:hover + .s3-btn-line,
.priego-card-s3:hover .s3-btn-line {
    width: 96px !important; /* crece a w-24 equivalente */
}

.s3-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c89628; /* Oro Priego */
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px; /* Estilo editorial más rectilíneo */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(200, 150, 40, 0.2);
}

.s3-button:hover {
    background: #fff;
    color: #253c78; /* Azul Navy */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}
