/* ============================================
   Leisure Centre Flip Card Styles
   Add to: child theme's style.css or via
   Appearance > Customize > Additional CSS
   ============================================ */

/* Card container — sets the 3D perspective */
.wpex-leisure-card {
    perspective: 1200px;
    width: 100%;
    max-width: 340px;
    height: 520px; /* Adjust to suit your content */
    margin: 0 auto;
}

/* Inner wrapper — this is what physically rotates */
.wpex-leisure-card .wpex-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 12px;
}

/* Flipped state — toggled by JS */
.wpex-leisure-card.is-flipped .wpex-card-inner {
    transform: rotateY(180deg);
}

/* Shared front/back styles */
.wpex-leisure-card .wpex-card-front,
.wpex-leisure-card .wpex-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

/* =====================
   FRONT
   ===================== */
.wpex-leisure-card .wpex-card-front {
    background-color: #3b1a5a;
    display: flex;
    flex-direction: column;
}

/* Feature image — top portion */
.wpex-leisure-card .wpex-leisure-photo {
    width: 100%;
    flex-shrink: 0;
    height: 55%;
    overflow: hidden;
}

.wpex-leisure-card .wpex-leisure-photo-img,
.wpex-leisure-card .wpex-leisure-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text area below image */
.wpex-leisure-card .wpex-card-front-content {
    background-color: #3b1a5a;
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    gap: 10px;
}

/* Page title */
.wpex-leisure-card .wpex-leisure-title,
.wpex-leisure-card .wpex-leisure-title a {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    text-decoration: none;
}

/* Excerpt */
.wpex-leisure-card .wpex-leisure-excerpt,
.wpex-leisure-card .wpex-leisure-excerpt p {
    color: #e0d4f0;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* =====================
   BACK
   ===================== */
.wpex-leisure-card .wpex-card-back {
    background-color: #3b1a5a;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

.wpex-leisure-card .wpex-card-back-content {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 12px;
    overflow-y: auto;
}

/* Back title */
.wpex-leisure-card .wpex-back-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

/* Activities list */
.wpex-leisure-card .wpex-activities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.wpex-leisure-card .wpex-activity-item {
    color: #e0d4f0;
    font-size: 0.875rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.4;
}

.wpex-leisure-card .wpex-activity-item:last-child {
    border-bottom: none;
}

.wpex-leisure-card .wpex-no-activities {
    color: #c0a8d8;
    font-style: italic;
    font-size: 0.875rem;
}

/* =====================
   BUTTONS
   ===================== */

/* Learn More (front) */
.wpex-leisure-card .wpex-learn-more-btn {
    display: inline-block;
    background-color: transparent;
    border: 2px solid #7c3aed;
    color: #ffffff;
    padding: 12px 28px;
    margin-top: auto;
    width: 100%;
    max-width: 200px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wpex-leisure-card .wpex-learn-more-btn:hover,
.wpex-leisure-card .wpex-learn-more-btn:focus {
    background-color: #7c3aed;
    outline: none;
}

/* Visit Page button (back) */
.wpex-leisure-card .wpex-page-btn {
    display: block;
    background-color: #7c3aed;
    border: 2px solid #7c3aed;
    color: #ffffff;
    padding: 12px 28px;
    width: 100%;
    text-align: center;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wpex-leisure-card .wpex-page-btn:hover,
.wpex-leisure-card .wpex-page-btn:focus {
    background-color: #6d28d9;
    border-color: #6d28d9;
    color: #ffffff;
    outline: none;
}

/* Back arrow button (back) */
.wpex-leisure-card .wpex-back-btn {
    background: none;
    border: none;
    color: #c0a8d8;
    padding: 4px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-align: left;
    margin-top: auto;
    transition: color 0.2s ease;
}

.wpex-leisure-card .wpex-back-btn:hover,
.wpex-leisure-card .wpex-back-btn:focus {
    color: #ffffff;
    outline: none;
}
