/**
 * Event Search & Display Block - Styles
 * Author: Contentscape (https://contentscape.co.uk)
 * Brand Color: #d84349 (Ropetackle Red)
 */

/* Container */
.event-search-block-container {
    width: 100%;
    margin: 0 auto;
    padding: 40px 0;
}

/* Block Title */
.block-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.block-title {
    font-size: 40px;
    font-weight: 700;
    font-family: 'Butler', serif;
    color: #111;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.block-title::after {
    content: '';
    display: block;
    width: 66px;
    height: 3px;
    background: #d84349;
    margin: 20px auto 0;
}
}
}

/* Search Form */
.event-search-form {
    margin-bottom: 40px;
}

.search-wrapper {
    position: relative;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.event-search-input {
    position: relative;
    flex: 1;
    min-width: 300px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 0;
    font-size: 16px;
    font-family: 'Gordita', sans-serif;
    transition: border-color 0.3s ease;
}

.event-search-input:focus {
    outline: none;
    border-color: #d84349;
}

.event-search-btn {
    padding: 0 30px;
    min-height: 52px;
    background: #d84349;
    color: #fff;
    border: 2px solid #d84349;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Gordita', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.event-search-btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

.event-search-btn[data-state="reset"] {
    background: #111;
    border-color: #111;
    color: #fff;
}

.event-search-btn[data-state="reset"]:hover {
    background: #d84349;
    border-color: #d84349;
    color: #fff;
}

/* Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    margin-top: 0;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 20px;
    min-width: 400px;
}

.dropdown-section {
    margin-bottom: 20px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Gordita', sans-serif;
    color: #111;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.event-category-select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Gordita', sans-serif;
    transition: border-color 0.3s ease;
    background: #fff;
    cursor: pointer;
}

.event-category-select:focus {
    outline: none;
    border-color: #d84349;
}

/* Quick Search Buttons */
.quick-search-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-search-btn {
    padding: 0 20px;
    min-height: 40px;
    background: #fff;
    color: #111;
    border: 2px solid #ddd;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Gordita', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-search-btn:hover {
    background: #d84349;
    border-color: #d84349;
    color: #fff;
}

.quick-search-btn.active {
    background: #d84349;
    border-color: #d84349;
    color: #fff;
}

/* Results Grid */
.event-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    transition: opacity 0.3s ease;
    margin-top: 40px;
}

.event-card-wrapper {
    display: flex;
    width: 100%;
    min-width: 0;
}

/* Event Card - Matching Search Enhancement Plugin */
.event-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.event-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: all 1.5s cubic-bezier(0, 0, 0.2, 1);
}

.event-card:hover .event-image img {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #d84349;
    color: #fff;
    padding: 5px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Gordita', sans-serif;
    text-transform: uppercase;
}

.event-date-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #d84349;
    color: #fff;
    padding: 5px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Gordita', sans-serif;
    text-transform: uppercase;
}

.event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #111;
    line-height: 1.4;
    font-family: 'Butler', serif;
    text-transform: capitalize;
    flex: 0 0 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.event-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: 'Gordita', sans-serif;
    flex: 0 0 auto;
}

.event-time i {
    color: #d84349;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d84349;
    font-weight: 700;
    font-size: 14px;
    transition: gap 0.3s ease;
    font-family: 'Butler', serif;
    margin-top: auto;
}

.event-card:hover .event-link {
    gap: 12px;
}

/* Loading */
.event-search-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px 50px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    font-family: 'Gordita', sans-serif;
    background: #095c7f;
    border: none;
    border-radius: 0;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.event-search-loading span {
    display: block;
}

.event-search-loading span::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.event-results-container {
    position: relative;
    min-height: 400px;
}

/* No Events */
.no-events {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
    font-family: 'Gordita', sans-serif;
    grid-column: 1 / -1;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #d84349;
    font-family: 'Gordita', sans-serif;
    grid-column: 1 / -1;
}

/* Load More Button */
.load-more-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 0 40px;
    min-height: 52px;
    background: #b46a8f;
    color: #fff;
    border: 2px solid #b46a8f;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Gordita', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.load-more-btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* View All Events Button */
.view-all-events-wrapper {
    text-align: center;
    margin-top: 50px;
}

.view-all-events-btn {
    padding: 0 50px;
    min-height: 52px;
    background: #b46a8f;
    color: #fff;
    border: 2px solid #b46a8f;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Gordita', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.view-all-events-btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
    .event-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .search-wrapper {
        flex-direction: column;
    }
    
    .event-search-input,
    .event-search-btn {
        width: 100%;
    }
    
    .search-dropdown {
        left: 0;
        right: auto;
        width: 100% !important;
        min-width: auto;
    }
    
    .quick-search-buttons {
        flex-direction: column;
    }
    
    .quick-search-btn {
        width: 100%;
    }
    
    .event-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 543px) {
    .event-results-grid {
        grid-template-columns: 1fr;
    }
    
    .event-search-block-container {
        padding: 20px 0;
    }
    
    .event-image {
        height: 180px;
    }
}
