/**
 * Events Section Styles
 * 
 * Styles for the upcoming events shortcode section
 * Based on The Iron Fairies Figma design
 * 
 * @package Nexter Child
 * @version 1.0.0
 */

/* Events Section Container */
.nexter-upcoming-events {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Events Header */
.events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 60px;
    gap: 20px;
}

.events-title {
    font-family: var(--font-primary);
    font-size: 64px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0;
    letter-spacing: 0;
}

.no-events {
  width: 100%;
}

.browse-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    color: var(--color-text);
    padding: 10px 22px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 15px;
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.browse-all-btn:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 166, 95, 0.3);
}

/* Events Content Layout */
.events-content {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

/* Featured Event (Large) */
.featured-event {
    position: relative;
    width: 60%;
    height: 736px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.event-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.event-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6) 100%);
    border-radius: 8px;
}

.event-info {
    position: absolute;
    left: 50px;
    bottom: 50px;
    right: 50px;
    z-index: 2;
}

.event-details {
    margin-bottom: 20px;
}

.event-date {
    font-family: var(--font-secondary);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--color-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
}

.event-title {
    font-family: var(--font-primary);
    font-size: 36px;
    line-height: 1;
    color: var(--color-accent);
    margin: 0;
    text-transform: uppercase;
    /* max-width: 291px; */
}

.get-tickets-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-text);
    font-size: 20px;
    font-weight: bold;
    line-height: 30px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    /* Button resets for when element is <button> */
    background: none !important;
    border: none;
    padding: 0 !important;
    cursor: pointer;
    outline: none;
}

.get-tickets-btn:hover {
    color: var(--color-accent);
    transform: translateX(5px);
}

.get-tickets-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.get-tickets-btn:hover svg {
    transform: translateX(3px);
}

/* Side Events */
.side-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 40%;
    flex-shrink: 0;
}

.side-event {
    width: 100%;
    height: 362px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.side-event-image-container {
    width: 100%;
    height: 100%;
}

.side-event-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.side-event:hover .side-event-image {
    transform: scale(1.05);
}

/* Side Event Links */
.side-event-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.side-event-link:hover {
    transform: translateY(-2px);
}

.side-event-link:hover .side-event-image {
    transform: scale(1.05);
}

/* Featured Event Links */
.featured-event-link, .featured-event-link .event-image {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
    height: 100% !important;
    object-fit: cover;
}

.featured-event-link:hover {
    transform: translateY(-3px);
}

.featured-event-link:hover .event-image {
    transform: scale(1.02);
}

/* Stay Tuned Boxes */
.stay-tuned {
    background: linear-gradient(135deg, var(--color-secondary) 0%, rgba(90, 78, 38, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.stay-tuned::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(193, 166, 95, 0.1) 0%, rgba(193, 166, 95, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.stay-tuned-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.stay-tuned-content h3,
.stay-tuned-content h4 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.stay-tuned-content h3 {
    font-size: 36px;
    line-height: 1;
}

.stay-tuned-content h4 {
    font-size: 24px;
    line-height: 1;
}

.stay-tuned-content p {
    font-family: var(--font-text);
    color: var(--color-text);
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.stay-tuned-large {
    width: 60%;
    height: 736px;
}

/* No Events State */
.no-events {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

/* Responsive Design */
@media (max-width: var(--breakpoint-large)) {
    .nexter-upcoming-events {
        max-width: 100%;
    }
    
    .events-content {
        gap: 8px;
    }
    
    /* Keep percentage widths but ensure minimum widths */
    .featured-event {
        min-width: 400px;
    }
    
    .side-events {
        min-width: 250px;
    }
    
    .stay-tuned-large {
        min-width: 400px;
    }
}

@media (max-width: 1024px) {

    .events-header {
      flex-direction: flex;
    }

    .events-title {
        font-size: 48px;
    }
    
    .events-header {
        margin-bottom: 40px;
    }
    
    .featured-event {
        height: 500px;
    }
    
    .side-event {
        height: 240px;
    }
    
    .stay-tuned-large {
        height: 500px;
    }
    
    .event-info {
        left: 30px;
        bottom: 30px;
        right: 30px;
    }
    
    .event-title {
        font-size: 28px;
        max-width: none;
    }
    
    .event-date {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .events-title {
        font-size: 36px;
    }
    
    .browse-all-btn {
        align-self: stretch;
        text-align: center;
    }
    
    .events-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .featured-event,
    .side-events,
    .stay-tuned-large {
        width: 100%;
        min-width: auto;
    }
    
    .featured-event {
        height: 350px;
    }
    
    .side-event {
        height: 200px;
    }
    
    .stay-tuned-large {
        height: 350px;
    }
    
    .event-info {
        left: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .event-title {
        font-size: 24px;
    }
    
    .event-date {
        font-size: 18px;
    }
    
    .get-tickets-btn {
        font-size: 16px;
    }
    
    .stay-tuned-content h3 {
        font-size: 28px;
    }
    
    .stay-tuned-content h4 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {

    .events-header {
      flex-direction: column;
    }

    .nexter-upcoming-events {
        padding: 0 15px;
    }
    
    .events-title {
        font-size: 28px;
    }
    
    .featured-event {
        height: 280px;
    }
    
    .side-event {
        height: 160px;
    }
    
    .stay-tuned-large {
        height: 280px;
    }
    
    .event-title {
        font-size: 20px;
    }
    
    .event-date {
        font-size: 16px;
    }
    
    .get-tickets-btn {
        font-size: 14px;
    }
    
    .stay-tuned-content h3 {
        font-size: 24px;
    }
    
    .stay-tuned-content h4 {
        font-size: 18px;
    }
    
    .browse-all-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Loading States */
.events-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--color-text);
    font-family: var(--font-text);
}

/* Accessibility Improvements */
.get-tickets-btn:focus,
.browse-all-btn:focus,
.side-event-link:focus,
.featured-event-link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.side-event-image {
    transition: transform 0.3s ease, filter 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .get-tickets-btn,
    .browse-all-btn,
    .side-event-image,
    .side-event-link,
    .featured-event-link,
    .event-image,
    .get-tickets-btn svg {
        transition: none;
    }
    
    .get-tickets-btn:hover,
    .browse-all-btn:hover,
    .side-event-link:hover,
    .featured-event-link:hover {
        transform: none;
    }
    
    .side-event:hover .side-event-image,
    .side-event-link:hover .side-event-image,
    .featured-event-link:hover .event-image {
        transform: none;
    }
}

/* Post Card Component Styles */
.post-card {
    width: 308px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #2a2527;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.post-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Image Container */
.post-card__image-container {
    height: 192px;
    overflow: hidden;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.post-card__image-container--tall {
    height: 224px;
}

.post-card__image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

/* Past Event Badge */
.post-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-text);
    padding: 4px 12px;
    border-radius: 16px;
    font-family: var(--font-text);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.15px;
}

/* Past Event Opacity */
.post-card--past-event {
    opacity: 0.75;
}

/* Content Container */
.post-card__content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-card__content--post {
    padding: 20px;
    gap: 12px;
}

/* Title */
.post-card__title {
    font-family: var(--font-primary);
    font-size: 20px;
    line-height: 24px;
    color: var(--color-text);
    margin: 0;
    font-weight: 400;
    text-transform: uppercase;
}

/* Post Date (for post type) */
.post-card__date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #928787;
    font-family: var(--font-text);
    font-size: 14px;
    letter-spacing: -0.15px;
}

/* Meta Information */
.post-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-block: 1rem;
    text-transform: capitalize;
}

.post-card__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #928787;
    font-family: var(--font-text);
    font-size: 14px;
    letter-spacing: -0.15px;
}

.post-card__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Description */
.post-card__description {
    color: #928787;
    font-family: var(--font-text);
    font-size: 14px;
    line-height: 18px;
    letter-spacing: -0.15px;
    margin: 0;
    flex: 1;
}

/* Read More Link */
.post-card__read-more {
    color: var(--color-primary);
    font-family: var(--font-text);
    font-size: 14px;
    letter-spacing: -0.15px;
    margin-top: auto;
    text-align: left;
    transition: color 0.3s ease;
}

.post-card__link:hover .post-card__read-more {
    color: var(--color-text);
}

/* Events Carousel Styles */
.events-carousel {
    width: 100%;
    margin: 40px 0;
}

.events-carousel--empty {
    text-align: center;
    color: #928787;
    font-family: var(--font-text);
    padding: 60px 20px;
}

/* Carousel Header */
.events-carousel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.events-carousel__title {
    font-family: var(--font-primary);
    font-size: 36px;
    line-height: 100%;
    color: var(--color-primary);
    margin: 0;
    text-transform: uppercase;
    font-weight: 400;
}

/* Carousel Container */
.events-carousel__container {
    overflow: hidden;
    width: 100%;
}

.events-carousel__track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease;
    align-items: start;
}

.events-carousel__slide {
    flex: 0 0 auto;
}

/* Responsive Design */
@media (max-width: var(--breakpoint-desktop)) {
    .events-carousel__title {
        font-size: 28px;
    }
    
    .events-carousel__header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .post-card {
        width: 280px;
    }
}

@media (max-width: var(--breakpoint-tablet)) {
    .events-carousel__title {
        font-size: 24px;
    }
    
    .events-carousel__nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .events-carousel__nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .post-card {
        width: 260px;
    }
    
    .post-card__content {
        padding: 16px;
    }
}

@media (max-width: var(--breakpoint-mobile)) {
    .events-carousel__track {
        gap: 16px;
    }
    
    .post-card {
        width: 240px;
    }
    
    .post-card__title {
        font-size: 18px;
    }
    
    .post-card__button {
        padding: 10px 40px;
        font-size: 14px;
    }
}