/* --- VARIABLES --- */
:root {
    --c-orange: #e29529;
    --c-btn-orange: #c75b39;
    --c-blue: #2b3f60;
    --c-dark-text: #30405a;
    --c-white: #ffffff;
    --c-beige-bg: #e2d5c2;
    --c-border: #e0e0e0;
    --c-pill-bg: #f0f0f0;
    --c-upcoming-bg: #e29529;
}

.wd-page-content {
    background-color: var(--c-beige-bg) !important;
}

/* --- LAYOUT --- */
.workshop-main-wrapper {
    padding: 0 0 80px;
    background: transparent;
    min-height: 80vh;
}

.workshop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.archive-header {
    padding: 60px 0 50px;
    text-align: center;
}

.archive-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--c-blue);
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.archive-subtitle {
    font-size: 1.2rem;
    color: var(--c-dark-text);
    opacity: 0.8;
    margin: 0;
}

/* --- GRID --- */
.workshop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.no-events-container {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    width: 100%;
    grid-column: 1 / -1;
}

/* --- CARD DESIGN --- */
.workshop-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.workshop-card:hover {
    transform: translateY(-5px);
}

.card-thumb {
    height: 220px;
    position: relative;
    overflow: hidden;
    display: block;
    background: #ddd;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.workshop-card:hover .card-thumb img {
    transform: scale(1.05);
}

.no-img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ccc;
}

/* Badge Styles */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    z-index: 2;
}

.status-badge.past {
    background-color: rgba(0, 0, 0, 0.6);
}

.status-badge.upcoming {
    background-color: var(--c-upcoming-bg);
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Top Row (Date Left, Cat Right) --- */
.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.card-date-primary {
    color: var(--c-orange);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.card-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.cat-pill {
    background-color: var(--c-pill-bg);
    color: #666;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.cat-pill:hover {
    background-color: var(--c-blue);
    color: #fff;
}

/* Title */
.card-title {
    margin: 0 0 10px;
    line-height: 1.3;
    font-size: 1.3rem;
}

.card-title a {
    color: var(--c-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--c-btn-orange);
}

/* Meta Details */
.card-meta-details {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-row {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.meta-row i {
    color: #999;
    width: 16px;
    text-align: center;
    margin-top: 3px;
}

.meta-row span {
    color: #555;
}

/* Footer & Buttons */
.card-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.btn-text {
    font-weight: 700;
    color: var(--c-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-action {
    background: var(--c-btn-orange);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-action.btn-view {
    display: inline-block;
    background: transparent;
    color: var(--c-btn-orange);
    border: 2px solid var(--c-btn-orange);
    padding: 8px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-disabled {
    background: #e0e0e0;
    color: #999;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: not-allowed;
    display: inline-block;
    text-transform: uppercase;
}

.workshop-card.is-past .card-thumb img {
    filter: grayscale(100%);
    opacity: 0.8;
}

.workshop-card.is-past {
    background-color: rgba(255, 255, 255, 0.8);
}

/* --- PAGINATION --- */
.pagination-wrapper {
    margin-top: 60px;
    text-align: center;
}

.pagination-wrapper.page-numbers {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--c-blue);
    border-radius: 50%;
    text-decoration: none;
    margin: 0 5px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-wrapper.page-numbers.current {
    background: var(--c-btn-orange);
    color: #fff;
}

/* --- HORIZONTAL LAYOUT (Overlay Design) --- */
.is-wazile-horizontal .workshop-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.is-wazile-horizontal .workshop-card {
    position: relative;
    /* Essential for absolute positioning of thumb */
    min-height: 300px;
    /* Taller minimal height for impact */
    border: none;
    /* Remove default border if any */
    display: flex;
    flex-direction: column;
}

/* Fix Badge & Pills Overlap */
.is-wazile-horizontal .status-badge {
    top: 30px;
    right: 30px;
    z-index: 10;
}

.is-wazile-horizontal .card-top-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: auto;
    max-width: 80%;
    margin-bottom: auto;
    /* Push other content to bottom */
}

.is-wazile-horizontal .card-cat-pills {
    justify-content: flex-start;
    width: 100%;
}

.is-wazile-horizontal .card-date-primary {
    display: block !important;
    /* Show date */
    color: var(--c-white);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Background Image styling */
.is-wazile-horizontal .card-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.is-wazile-horizontal .card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

.is-wazile-horizontal .card-content {
    position: relative;
    z-index: 2;
    /* Above image and overlay */
    background: transparent;
    color: #fff;
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Text Colors */
.is-wazile-horizontal .card-title a {
    color: #fff;
    font-size: 1.8rem;
    /* Larger title */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.is-wazile-horizontal .card-title a:hover {
    color: var(--c-upcoming-bg);
}

.is-wazile-horizontal .card-date-primary {
    color: var(--c-white);
    /* Make date pop */
    font-size: 1rem;
    margin-bottom: 5px;
}

.is-wazile-horizontal .meta-row,
.is-wazile-horizontal .meta-row span,
.is-wazile-horizontal .meta-row i {
    color: rgba(255, 255, 255, 0.9);
}

.is-wazile-horizontal .card-excerpt {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 20px;
}

.is-wazile-horizontal .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

.is-wazile-horizontal .btn-text {
    color: #fff;
}

.is-wazile-horizontal .btn-text:hover {
    color: var(--c-upcoming-bg);
}

/* Mobile: Maintain overlay style (Override default stacking) */
@media (max-width: 992px) {
    .is-wazile-horizontal .workshop-card {
        flex-direction: column;
        /* Keep column flex */
        min-height: 250px;
    }

    .is-wazile-horizontal .card-thumb {
        width: 100%;
        height: 100%;
        /* Force full height background */
    }

    /* Mobile Alignment & Overlap Prevention */
    .is-wazile-horizontal .status-badge {
        top: 20px;
        right: 20px;
        font-size: 0.65rem;
        /* Slightly smaller on mobile */
        padding: 4px 10px;
    }

    .is-wazile-horizontal .card-content {
        padding: 20px;
        flex: 1;
    }

    .is-wazile-horizontal .card-top-row {
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2.2rem;
    }

    .workshop-grid {
        grid-template-columns: 1fr;
    }

    .card-thumb {
        height: 200px;
    }
}

.wd-sidebar-opener {
    display: none;
}

/* --- SHORTCODE COMPATIBILITY --- */
.workshop-shortcode-wrapper {
    min-height: auto;
    padding: 40px 0;
}

/* --- CAROUSEL SUPPORT --- */
.workshops-skills-design.wd-carousel-container {
    padding: 20px 60px 60px;
    /* Space for outer arrows */
    position: relative;
    margin: 0 auto;
    /* On desktop, pull container out to allow arrows to be outside the 1200px container */
    /* while keeping card content area at exactly 1160px (same as grid) */
    width: auto !important;
}

@media (min-width: 1320px) {
    .workshops-skills-design.wd-carousel-container {
        width: calc(100% + 120px) !important;
        margin-left: -60px !important;
        margin-right: -60px !important;
        max-width: none !important;
    }
}


.workshops-skills-design .wd-carousel-wrap {
    display: flex !important;
    align-items: stretch !important;
    /* Force all slides to be same height */
}

.workshops-skills-design .wd-carousel-item {
    display: flex !important;
    justify-content: center;
    align-items: stretch !important;
    height: auto !important;
    /* Allow slides to grow to tallest */
}

.workshops-skills-design .workshop-card {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    /* Let flex: 1 handle the height */
    flex: 1 1 auto !important;
}


/* Skills Design Pattern for Arrows */
.workshops-skills-design .wd-nav-arrows {
    position: static;
}

.workshops-skills-design .wd-prev,
.workshops-skills-design .wd-next {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background: var(--c-white) !important;
    color: var(--c-dark-text) !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    z-index: 10;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
}

.workshops-skills-design .wd-prev:hover,
.workshops-skills-design .wd-next:hover {
    background: var(--c-orange) !important;
    color: var(--c-white) !important;
}

.workshops-skills-design .wd-prev {
    left: -30px !important;
    /* Specific request for -30px */
}

.workshops-skills-design .wd-next {
    right: 35px !important;
    /* Move it "a bit inner" as requested */
}

.wd-nav-arrows.wd-pos-sep .wd-next {
    inset-inline-start: calc(100% + var(--wd-arrow-offset-h, -15px)) !important;
}




/* Navigation Hiding Logic (Desktop: 3 columns default) */
@media (min-width: 1200px) {

    .workshops-skills-design[data-count="1"] .wd-nav-arrows,
    .workshops-skills-design[data-count="2"] .wd-nav-arrows,
    .workshops-skills-design[data-count="3"] .wd-nav-arrows {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .workshops-skills-design.wd-carousel-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .workshops-skills-design .wd-prev {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .workshops-skills-design .wd-next {
        right: -10px !important;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}