/*--------------------------------------------------------------
# Destacados — Featured Events Horizontal Carousel
# A scrollable row of featured event cards displayed on the
# front page between the hero and the main event listing.
#
# @package TicketSystemTango
--------------------------------------------------------------*/


/* ==========================================================================
   §1  SECTION WRAPPER
   Full-bleed dark section with subtle top/bottom borders.
   ========================================================================== */

.tev-destacados {
    background-color: var(--ts-black);
    padding: 48px 0 56px;
    border-top: 1px solid var(--ts-border-color);
    position: relative;
    overflow: hidden;
}

.tev-destacados__inner {
    max-width: min(90vw, 1600px);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}


/* ==========================================================================
   §2  SECTION TITLE
   Playfair Display, gold accent, with a star icon.
   ========================================================================== */

.tev-destacados__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.tev-destacados__title {
    font-family: var(--font-headings);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.tev-destacados__title-icon {
    color: var(--ts-gold);
    font-size: 0.85em;
    line-height: 1;
}

.tev-destacados__title-text {
    color: #ffffff;
}

/* Scroll navigation arrows (desktop only) */
.tev-destacados__nav {
    display: none;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .tev-destacados__nav {
        display: flex;
    }
}

.tev-destacados__nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--ts-border-color);
    background: var(--ts-surface-1);
    color: var(--ts-lightgrey);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--ts-transition-fast) var(--ts-ease-out),
                border-color var(--ts-transition-fast) var(--ts-ease-out),
                color var(--ts-transition-fast) var(--ts-ease-out);
    padding: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.tev-destacados__nav-btn:hover {
    background: var(--ts-surface-4) !important;
    border-color: var(--ts-gold) !important;
    color: var(--ts-gold) !important;
    transform: none !important;
    box-shadow: none !important;
}

.tev-destacados__nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.tev-destacados__nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* ==========================================================================
   §3  SCROLL TRACK
   Horizontal overflow with snap points and hidden scrollbar.
   ========================================================================== */

.tev-destacados__track-wrapper {
    position: relative;
}

.tev-destacados__track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 8px; /* breathing room for shadow overflow */

    /* Hide scrollbar — all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.tev-destacados__track::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

/* Edge fade hints — left and right gradients */
.tev-destacados__track-wrapper::before,
.tev-destacados__track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--ts-transition-normal) var(--ts-ease-out);
}

.tev-destacados__track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--ts-black), transparent);
}

.tev-destacados__track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--ts-black), transparent);
}

/* Show fades when content is scrollable */
.tev-destacados__track-wrapper.has-overflow-right::after {
    opacity: 1;
}

.tev-destacados__track-wrapper.has-overflow-left::before {
    opacity: 1;
}


/* ==========================================================================
   §4  EVENT CARD
   Compact card with landscape image, title, date, location.
   ========================================================================== */

.tev-destacados__card {
    flex: 0 0 280px;
    min-width: 280px;
    scroll-snap-align: start;
    background: var(--ts-surface-1);
    border-radius: var(--md-border-radius-card);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: box-shadow var(--ts-transition-normal) var(--ts-ease-out),
                transform var(--ts-transition-normal) var(--ts-ease-out),
                border-color var(--ts-transition-normal) var(--ts-ease-out);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.tev-destacados__card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(198, 166, 100, 0.2);
    transform: translateY(-4px);
    border-color: rgba(198, 166, 100, 0.15);
}

/* — Image — */
.tev-destacados__card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--ts-surface-2);
}

.tev-destacados__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ts-transition-slow) var(--ts-ease-out);
}

.tev-destacados__card:hover .tev-destacados__card-image img {
    transform: scale(1.06);
}

/* "Destacado" badge overlay */
.tev-destacados__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(198, 166, 100, 0.9);
    color: var(--ts-black);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--ts-radius-sm);
    backdrop-filter: blur(4px);
    line-height: 1.3;
}

/* — Content — */
.tev-destacados__card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tev-destacados__card-title {
    font-family: var(--font-headings);
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tev-destacados__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ts-transition-fast) var(--ts-ease-out);
}

.tev-destacados__card-title a:hover {
    color: var(--ts-gold);
}

/* Date row */
.tev-destacados__card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ts-gold);
    font-size: 0.82rem;
    font-weight: 600;
}

.tev-destacados__card-date svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Location row */
.tev-destacados__card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ts-mediumgrey-text);
    font-size: 0.8rem;
}

.tev-destacados__card-location svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* Category pill tags inside Destacados cards */
.tev-destacados__card-body .tev-category-tags {
    margin-top: auto;
    gap: 5px;
}

.tev-destacados__card-body .tev-category-tag {
    font-size: 0.62rem;
    padding: 3px 9px;
}


/* ==========================================================================
   §5  RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
    .tev-destacados {
        padding: 36px 0 42px;
    }

    .tev-destacados__inner {
        max-width: 100%;
        padding: 0 clamp(12px, 4vw, 24px);
    }

    .tev-destacados__card {
        flex: 0 0 240px;
        min-width: 240px;
    }

    .tev-destacados__card-body {
        padding: 14px 16px 18px;
    }

    .tev-destacados__card-title {
        font-size: 0.95rem;
    }

    .tev-destacados__header {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .tev-destacados__card {
        flex: 0 0 220px;
        min-width: 220px;
    }

    .tev-destacados__card-body {
        padding: 12px 14px 16px;
        gap: 6px;
    }

    .tev-destacados__card-title {
        font-size: 0.9rem;
    }
}

/* Larger cards on very wide screens */
@media (min-width: 1440px) {
    .tev-destacados__card {
        flex: 0 0 320px;
        min-width: 320px;
    }
}
