/**
 * Calendar Filter Widget CSS
 * 
 * Styles for the Calendar Filter widget
 */


/* Container */

.wf-calendar-container {
    width: 100%;
    box-sizing: border-box;
}


/* Add responsive improvements */

.wf-calendar-responsive {
    overflow: hidden;
    /* Prevent horizontal scrolling */
}


/* Filter Buttons */

.wf-calendar-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.wf-calendar-filter-button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background-color: #f5f5f5;
    color: #333333;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Active State Colors */

.wf-calendar-filter-button[data-filter="theater"].active {
    background-color: #8963BA;
    color: #ffffff;
    border-color: #8963BA;
}

.wf-calendar-filter-button[data-filter="congres"].active {
    background-color: #50A2A7;
    color: #ffffff;
    border-color: #50A2A7;
}

.wf-calendar-filter-button[data-filter="all"].active {
    background-color: #333333;
    color: #ffffff;
    border-color: #333333;
}


/* Grid Layout */

.wf-calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 3rem;
}

.wf-calendar-grid>article {
    height: 100%;
    /* Ensure all grid items have equal height */
}


/* Responsive Improvements */

@media (max-width: 1200px) {
    .wf-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Reduce gap on smaller screens */
    .wf-calendar-filter-buttons {
        gap: 8px;
        margin-bottom: 25px;
    }
    .wf-calendar-filter-button {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
    /* Adjust divider for tablet */
    .wf-calendar-item-image.wf-divider-enabled::after {
        bottom: -15px;
        height: 35px;
    }
    .wf-calendar-item-image.wf-divider-enabled+.wf-calendar-item-content-wrapper {
        margin-top: -8px;
    }
    /* Adjust content spacing for equal heights */
    .wf-calendar-item-content-wrapper {
        padding: 18px;
    }
    .wf-calendar-item-image img {
        height: 200px;
    }
    .wf-calendar-item-read-more {
        padding: 10px 22px;
    }
}

@media (max-width: 767px) {
    .wf-calendar-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* Stack filter buttons on small screens */
    .wf-calendar-filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-bottom: 20px;
    }
    .wf-calendar-filter-button {
        padding: 6px 14px;
        font-size: 0.9rem;
    }
    .wf-calendar-item-title {
        font-size: 1.1rem;
    }
    .wf-calendar-item-date {
        margin-bottom: 15px;
        font-size: 0.9rem;
    }
    .wf-calendar-item-read-more {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    /* Adjust divider for mobile */
    .wf-calendar-item-image.wf-divider-enabled::after {
        bottom: -12px;
        height: 30px;
        transform: skewY(2deg);
    }
    .wf-calendar-item-image.wf-divider-enabled+.wf-calendar-item-content-wrapper {
        margin-top: -6px;
    }
    .wf-calendar-item-image img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .wf-calendar-grid {
        gap: 15px;
    }
    .wf-calendar-filter-buttons {
        gap: 5px;
        margin-bottom: 15px;
    }
    .wf-calendar-filter-button {
        padding: 5px 12px;
        font-size: 0.85rem;
        flex: 1 0 auto;
        text-align: center;
        min-width: 60px;
    }
    .wf-calendar-item-content-wrapper {
        padding: 15px;
    }
    /* Adjust divider for small mobile */
    .wf-calendar-item-image.wf-divider-enabled::after {
        bottom: -10px;
        height: 25px;
        transform: skewY(2deg);
    }
    .wf-calendar-item-image.wf-divider-enabled+.wf-calendar-item-content-wrapper {
        margin-top: -4px;
    }
    /* Adjust spacing for equal heights */
    .wf-calendar-item-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    .wf-calendar-item-date {
        margin-bottom: 12px;
        font-size: 0.85rem;
    }
    .wf-calendar-item-read-more {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}


/* Item - New Card Style based on image */

.wf-calendar-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.075);
    height: 100%;
    border: 1px solid #D9D9D9 !important;
}


/* Remove hover transform animation */

.wf-calendar-item:hover {
    /* Removed shadow enhancement and transform */
}


/* Theater-specific divider styling */

.wf-calendar-item[data-type="theater"] .wf-calendar-item-image.wf-divider-enabled::after {
    box-shadow: 0 -3px 8px rgba(137, 99, 186, 0.1);
}


/* Congres-specific divider styling */

.wf-calendar-item[data-type="congres"] .wf-calendar-item-image.wf-divider-enabled::after {
    box-shadow: 0 -3px 8px rgba(80, 162, 167, 0.1);
}


/* Image with divider */

.wf-calendar-item-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    width: 100%;
}


/* Ensure images are consistent height */

.wf-calendar-item-image a {
    display: block;
    height: 100%;
}


/* Tilted divider - only applied when enabled */

.wf-calendar-item-image.wf-divider-enabled::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #ffffff;
    transform: skewY(2deg);
    transform-origin: top right;
    z-index: 1;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.08);
}

.wf-calendar-item-image img {
    display: block;
    width: 100%;
    height: 220px;
    /* Fixed height for consistent look */
    object-fit: cover;
}


/* Remove image scale hover effect */

.wf-calendar-item:hover .wf-calendar-item-image img {
    /* Removed transform scale effect */
}


/* Content Container */

.wf-calendar-item-content-wrapper {
    padding: 0px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    /* Allow content to grow and push button to bottom */
}


/* Make sure there's space at the bottom for the button */

.wf-calendar-item-title,
.wf-calendar-item-date {
    margin-bottom: 10px;
}


/* Adjust content margin when divider is enabled */

.wf-calendar-item-image.wf-divider-enabled+.wf-calendar-item-content-wrapper {
    margin-top: -10px;
    /* Pull content up to overlap with tilted divider */
}


/* Title */

.wf-calendar-item-title {
    margin: 0 !important;
    font-size: 1.25rem;
    font-weight: 600 !important;
    line-height: 1.3rem !important;
    color: #222222;
}

.wf-calendar-item-title a {
    color: inherit;
    text-decoration: none;
}


/* Date */

.wf-calendar-item-date {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #666666;
}


/* Button Styling */

.wf-calendar-item-read-more {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    align-self: flex-start;
    margin-top: auto;
    /* Push button to bottom of flex container */
}


/* Theater-specific styling */

.wf-calendar-item[data-type="theater"] .wf-calendar-item-read-more {
    background-color: #8963BA;
    color: #ffffff;
}


/* Congres-specific styling */

.wf-calendar-item[data-type="congres"] .wf-calendar-item-read-more {
    background-color: #50A2A7;
    color: #ffffff;
}


/* Remove category tags (not in the reference design) */

.wf-calendar-item-category-tag {
    display: none;
}


/* Excerpt - hide it as it's not in the reference design */

.wf-calendar-item-excerpt {
    display: none;
}


/* No posts message */

.wf-calendar-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    font-size: 1.1rem;
    color: #666666;
}


/* Error message */

.wf-calendar-error {
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    color: #ff0000;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}


/* Hidden items */

.wf-hidden {
    display: none;
}