/*
 * mynews-tec-slider.css
 * Styles cho TEC Events Slider (template-parts/tec-events-slider.php)
 * Card cao 350px, layout 4 cột desktop.
 *
 * @package MyNews_Theme
 * @since 1.2.0
 */

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
.mn-tec-section {
    padding: 40px 0 48px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* ============================================================
   SECTION HEADER — tái dùng layout mn-event-header
   ============================================================ */
.mn-tec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.mn-tec-header .mn-section-title {
    margin: 0;
}

/* ============================================================
   SWIPER — visibility hidden khi chưa init
   ============================================================ */
.mn-tec-swiper {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.mn-tec-swiper.swiper-initialized {
    visibility: visible;
    height: auto;
    overflow: visible;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.mn-tec-skeleton {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mn-skeleton-tec {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

.mn-skeleton-tec .mn-skeleton-img {
    height: 210px;
}

.mn-skeleton-tec .mn-skeleton-body {
    padding: 16px;
}

.mn-skeleton-tec .mn-skeleton-line {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #e0e0e0;
}

@keyframes mn-tec-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .45; }
}

.mn-tec-skeleton .mn-skeleton-pulse {
    animation: mn-tec-pulse 1.4s ease-in-out infinite;
}

/* ============================================================
   CARD — cao 350px cố định
   ============================================================ */
.mn-tec-card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    height: 350px;               /* chiều cao cố định theo yêu cầu */
    transition: box-shadow .3s ease, transform .3s ease;
}

.mn-tec-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.15);
    transform: translateY(-4px);
}

/* ── Thumbnail ── */
.mn-tec-thumb-wrap {
    position: relative;
    overflow: hidden;
    flex: 0 0 210px;             /* ảnh chiếm 210px, phần body còn 140px */
    height: 210px;
}

.mn-tec-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.mn-tec-card:hover .mn-tec-thumb {
    transform: scale(1.06);
}

.mn-tec-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 55%);
    pointer-events: none;
}

/* ── Date Badge ── */
.mn-tec-date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--mn-primary, #029fb2);
    color: #fff;
    border-radius: 8px;
    padding: 7px 11px;
    text-align: center;
    line-height: 1;
    min-width: 46px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    z-index: 2;
}

.mn-tec-date-day {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
}

.mn-tec-date-month {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
    opacity: .9;
}

/* ── Body ── */
.mn-tec-body {
    flex: 1;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.mn-tec-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mn-tec-date-text,
.mn-tec-time {
    font-size: 12px;
    color: var(--mn-primary, #029fb2);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mn-tec-time {
    color: #777;
}

.mn-tec-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mn-tec-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .2s;
}

.mn-tec-title a:hover {
    color: var(--mn-primary, #029fb2);
}

.mn-tec-venue {
    font-size: 12px;
    color: #888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── CTA Button ── */
.mn-tec-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mn-primary, #029fb2);
    text-decoration: none;
    margin-top: auto;
    transition: gap .2s;
}

.mn-tec-btn:hover {
    gap: 10px;
    color: var(--mn-primary, #029fb2);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.mn-tec-pagination {
    margin-top: 20px;
    text-align: center;
}

.mn-tec-section .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.mn-tec-section .swiper-pagination-bullet-active {
    background: var(--mn-primary, #029fb2);
}

/* ============================================================
   NAV BUTTONS — tái dùng .mn-slider-btn từ event-slider
   ============================================================ */
.mn-tec-header .mn-slider-controls {
    display: flex;
    gap: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: 2 cột */
@media (max-width: 991px) {
    .mn-tec-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }

    .mn-tec-skeleton .mn-skeleton-card:nth-child(n+3) {
        display: none;
    }
}

/* Mobile: 1 cột */
@media (max-width: 580px) {
    .mn-tec-section {
        padding: 28px 0 36px;
    }

    .mn-tec-skeleton {
        grid-template-columns: 1fr;
    }

    .mn-tec-skeleton .mn-skeleton-card:nth-child(n+2) {
        display: none;
    }

    .mn-tec-card {
        height: 320px;
    }

    .mn-tec-thumb-wrap,
    .mn-tec-thumb {
        flex: 0 0 180px;
        height: 180px;
    }
}
