/* WDHC EQUO Events - Frontend Styles */

/* List View Styles */
.wdhc-equo-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.wdhc-event-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.wdhc-event-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wdhc-event-date-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-shrink: 0;
}

.wdhc-event-date {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.wdhc-event-date .day {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.wdhc-event-date .month {
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.95;
}

.wdhc-event-discipline-beside-date {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 5px;
}

.wdhc-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wdhc-event-main-row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 25px;
    align-items: start;
}

.wdhc-event-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wdhc-event-meta-sidebar {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 13px;
    line-height: 1.6;
}

.wdhc-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.wdhc-meta-half {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.wdhc-meta-item {
    margin-bottom: 8px;
}

.wdhc-meta-item:last-child {
    margin-bottom: 0;
}

.wdhc-meta-item strong {
    color: #495057;
    display: inline;
    margin-right: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wdhc-meta-item a {
    color: #667eea;
    text-decoration: none;
    word-break: break-word;
}

.wdhc-meta-item a:hover {
    text-decoration: underline;
}

.wdhc-event-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
}

.wdhc-event-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wdhc-event-title a:hover {
    color: #667eea;
}

.wdhc-event-discipline-beside-date .discipline-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #e7f1ff;
    color: #0066cc;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #cce4ff;
    white-space: nowrap;
}

/* Discipline-specific colors - must override base styles */
.wdhc-event-discipline-beside-date .discipline-badge.discipline-showjumping,
.wdhc-event-discipline-grid .discipline-badge.discipline-showjumping {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-dressage,
.wdhc-event-discipline-grid .discipline-badge.discipline-dressage {
    background: #ddd6fe !important;
    color: #5b21b6 !important;
    border-color: #c4b5fd !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-eventing,
.wdhc-event-discipline-beside-date .discipline-badge.discipline-cross-country,
.wdhc-event-discipline-beside-date .discipline-badge.discipline-arena-eventing,
.wdhc-event-discipline-grid .discipline-badge.discipline-eventing,
.wdhc-event-discipline-grid .discipline-badge.discipline-cross-country,
.wdhc-event-discipline-grid .discipline-badge.discipline-arena-eventing {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0 !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-showing,
.wdhc-event-discipline-grid .discipline-badge.discipline-showing {
    background: #fce7f3 !important;
    color: #9f1239 !important;
    border-color: #fbcfe8 !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-working-hunter,
.wdhc-event-discipline-grid .discipline-badge.discipline-working-hunter {
    background: #fed7aa !important;
    color: #7c2d12 !important;
    border-color: #fdba74 !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-flatwork,
.wdhc-event-discipline-grid .discipline-badge.discipline-flatwork {
    background: #bfdbfe !important;
    color: #1e40af !important;
    border-color: #93c5fd !important;
}

.wdhc-event-discipline-beside-date .discipline-badge.discipline-other,
.wdhc-event-discipline-grid .discipline-badge.discipline-other {
    background: #e5e7eb !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.wdhc-event-venue {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 15px;
}

.wdhc-event-venue svg {
    flex-shrink: 0;
    color: #667eea;
}

.wdhc-event-information {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 12px;
}

.wdhc-event-information h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.wdhc-information-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.wdhc-information-blocks img,
.wdhc-single-information-blocks img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
}

.wdhc-information-blocks .wp-block-columns,
.wdhc-single-information-blocks .wp-block-columns {
    margin-bottom: 0;
}

.wdhc-information-blocks .wp-block-column,
.wdhc-single-information-blocks .wp-block-column {
    padding: 0;
}

.wdhc-information-blocks p,
.wdhc-single-information-blocks p {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin: 0 0 10px 0;
}

.wdhc-information-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wdhc-information-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.wdhc-information-text {
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
}

.wdhc-information-text p {
    margin: 0 0 10px 0;
}

.wdhc-information-text p:last-child {
    margin-bottom: 0;
}

.wdhc-information-content {
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
}

.wdhc-information-content p {
    margin: 0 0 10px 0;
}

.wdhc-information-content p:last-child {
    margin-bottom: 0;
}

.wdhc-event-extra-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
}

.wdhc-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.wdhc-detail-item {
    margin-bottom: 6px;
    color: #666;
}

.wdhc-detail-left {
    text-align: left;
    flex: 0 0 auto;
}

.wdhc-detail-right {
    text-align: right;
    flex: 0 0 auto;
}

.wdhc-detail-item:last-child {
    margin-bottom: 0;
}

.wdhc-detail-item strong {
    color: #333;
    font-weight: 600;
}

.wdhc-detail-item a {
    color: #667eea;
    text-decoration: none;
}

.wdhc-detail-item a:hover {
    text-decoration: underline;
}

.wdhc-event-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn-view-details,
.btn-enter-event {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-view-details {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-view-details:hover {
    background: #5568d3;
    color: white;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn-enter-event {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-enter-event:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Grid View Styles */
.wdhc-equo-events-grid {
    display: grid;
    gap: 25px;
    margin: 20px 0;
}

.wdhc-grid-cols-1 {
    grid-template-columns: 1fr;
}

.wdhc-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wdhc-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wdhc-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wdhc-event-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.wdhc-event-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.wdhc-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wdhc-event-card:hover .wdhc-event-image img {
    transform: scale(1.05);
}

.wdhc-event-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.wdhc-grid-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.wdhc-grid-detail-line {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.wdhc-grid-detail-line strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 90px;
}

.wdhc-grid-description {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    flex: 1;
}

.wdhc-event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.wdhc-event-date-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.wdhc-event-discipline-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: flex-start;
}

.wdhc-event-discipline-grid .discipline-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #e7f1ff;
    color: #0066cc;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #cce4ff;
}

.wdhc-event-card .wdhc-event-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.wdhc-event-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.wdhc-event-card .wdhc-event-venue {
    font-size: 14px;
    margin-bottom: 15px;
}

.wdhc-event-card .wdhc-event-actions {
    margin-top: 15px;
}

.wdhc-event-card .btn-view-details {
    display: block;
    text-align: center;
    width: 100%;
}

/* No Events Message */
.wdhc-no-events {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wdhc-grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wdhc-event-main-row {
        grid-template-columns: 1fr 240px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wdhc-grid-cols-3,
    .wdhc-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wdhc-event-item {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .wdhc-event-main-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wdhc-event-date-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .wdhc-event-date {
        width: 70px;
        height: 70px;
    }
    
    .wdhc-event-date .day {
        font-size: 28px;
    }
    
    .wdhc-event-date .month {
        font-size: 13px;
    }
    
    .wdhc-event-discipline-beside-date {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .wdhc-event-title {
        font-size: 20px;
    }
    
    .wdhc-event-actions {
        flex-direction: column;
    }
    
    .btn-view-details,
    .btn-enter-event {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wdhc-grid-cols-2,
    .wdhc-grid-cols-3,
    .wdhc-grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .wdhc-event-actions {
        flex-direction: column;
    }
    
    .btn-view-details,
    .btn-enter-event {
        width: 100%;
        text-align: center;
    }
}

/* Single Event Page Styles */
.single-wdhc_equo_event .wdhc-event-meta {
    background: #e8eef2;
    padding: 0;
    border-radius: 0;
    margin: 20px 0;
    border: 1px solid #d0d8de;
}

.single-wdhc_equo_event .wdhc-details-heading {
    background: #9dafbd;
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.single-wdhc_equo_event .wdhc-subsection-heading {
    background: #c5d3dd;
    color: #333;
    padding: 10px 20px;
    margin: 20px 0 0 0;
    font-size: 16px;
    font-weight: 600;
}

.single-wdhc_equo_event .wdhc-details-grid {
    padding: 20px;
}

.single-wdhc_equo_event .wdhc-detail-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.single-wdhc_equo_event .wdhc-detail-row:last-child {
    margin-bottom: 0;
}

.single-wdhc_equo_event .wdhc-detail-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.single-wdhc_equo_event .wdhc-detail-column strong {
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.single-wdhc_equo_event .wdhc-detail-column div {
    color: #333;
    font-size: 14px;
}

.single-wdhc_equo_event .wdhc-link-orange {
    color: #d97706;
    text-decoration: none;
}

.single-wdhc_equo_event .wdhc-link-orange:hover {
    text-decoration: underline;
}

.single-wdhc_equo_event .wdhc-information-text {
    padding: 20px;
    background: white;
    color: #333;
    line-height: 1.6;
}

.single-wdhc_equo_event .wdhc-information-text p {
    margin-bottom: 15px;
}

.single-wdhc_equo_event .wdhc-information-text p:last-child {
    margin-bottom: 0;
}

.single-wdhc_equo_event .wdhc-event-meta-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.single-wdhc_equo_event .wdhc-event-meta-item svg {
    flex-shrink: 0;
    color: #667eea;
}

.single-wdhc_equo_event .wdhc-event-meta-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.single-wdhc_equo_event .wdhc-event-meta-value {
    color: #666;
}

.single-wdhc_equo_event .wdhc-equo-enter-section {
    margin: 30px 0;
    text-align: center;
}

.single-wdhc_equo_event .wdhc-equo-link {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-wdhc_equo_event .wdhc-equo-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Responsive adjustments for details grid */
@media (max-width: 768px) {
    .wdhc-information-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .single-wdhc_equo_event .wdhc-detail-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Clickable discipline badges */
a.discipline-badge {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

a.discipline-badge:hover {
    transform: translateY(-2px);
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Clickable Sunshine Tour logo */
a .sunshine-qualifier-logo {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

a:hover .sunshine-qualifier-logo {
    transform: scale(1.05);
    opacity: 0.85;
}
