﻿/* ==================== EVENTS PAGE - TIN TỨC & SỰ KIỆN ==================== */
/* Design: HEADER XANH CHO NEWS, HEADER ĐỎ CHO GALLERY (GIỐNG RECRUITMENT) */
/* ✅ SỬ DỤNG CSS VARIABLES TỪ SETTING DATABASE: --ashico-blue, --ashico-red */

/* ==================== PAGE LAYOUT ==================== */
.events-page-content {
    padding: 30px 0 50px;
    background: #f8f9fa;
}

/* ==================== SECTION HEADER - NỀN XANH ==================== */
.events-section-header {
    background: var(--ashico-blue, #034ea2);
    padding: 15px 25px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.events-section-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 12px 12px;
    border-radius: 8px;
    pointer-events: none;
}

.events-section-header__company {
    position: relative;
    z-index: 2;
    margin-bottom: 5px;
}

.events-section-header__company-name {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
    color: #fff;
}

.events-section-header__company-name .letter-a {
    color: var(--ashico-red, #ec2028);
}

.events-section-header__company-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 3px 0;
}

.events-section-header__company-dots span {
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
}

.events-section-header__company-dots span:nth-child(2) {
    width: 6px;
    height: 6px;
    background: var(--ashico-red, #ec2028);
}

.events-section-header__company-fullname {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.events-section-header__title {
    position: relative;
    z-index: 2;
    margin-top: 6px;
}

.events-section-header__title h2 {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ==================== NEWS GRID ==================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* ==================== EVENT CARD ==================== */
.event-card {
    display: flex;
    gap: 15px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid transparent;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left-color: var(--ashico-blue, #034ea2);
}

/* Card Image */
.event-card__img {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
}

.event-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.event-card:hover .event-card__img img {
    transform: scale(1.08);
}

/* Card Content */
.event-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.event-card__category {
    display: inline-block;
    background: linear-gradient(135deg, var(--ashico-red, #ec2028), #c41e22);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
    width: fit-content;
}

.event-card__title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-card__title a:hover {
    color: var(--ashico-blue, #034ea2);
}

.event-card__excerpt {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.event-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.event-card__date {
    color: var(--ashico-red, #ec2028);
    font-weight: 600;
}

.event-card__date i {
    margin-right: 4px;
}

.event-card__author {
    color: var(--ashico-blue, #034ea2);
    font-weight: 600;
}

/* ==================== VIEW ALL BUTTONS ==================== */
.events-view-all,
.gallery-view-all {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.gallery-view-all {
    margin-top: 25px;
    margin-bottom: 0;
}

.events-view-all .thm-btn,
.gallery-view-all .thm-btn {
    color: #fff;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
}

/* Nút Xem tất cả tin tức - MÀU XANH */
.events-view-all .thm-btn {
    background: var(--ashico-blue, #034ea2);
}

.events-view-all .thm-btn:hover {
    background: #023d82;
    transform: translateY(-2px);
    color: #fff;
}

/* Nút Xem tất cả Video - MÀU ĐỎ */
.gallery-view-all .thm-btn,
.gallery-view-all .thm-btn.thm-btn--red {
    background: var(--ashico-red, #ec2028);
}

.gallery-view-all .thm-btn:hover,
.gallery-view-all .thm-btn.thm-btn--red:hover {
    background: #c41e22;
    transform: translateY(-2px);
    color: #fff;
}

/* ==================== GALLERY SECTION - NỀN ĐỎ ==================== */
.gallery-section,
.related-news-section {
    margin-top: 40px;
}

.gallery-section-header {
    background: var(--ashico-red, #ec2028);
    padding: 15px 25px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-section-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 12px 12px;
    border-radius: 8px;
    pointer-events: none;
}

.gallery-section-header__company {
    position: relative;
    z-index: 2;
    margin-bottom: 5px;
}

.gallery-section-header__company-name {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0;
    color: #fff;
}

/* Chữ A màu XANH trên nền ĐỎ (giống Recruitment) */
.gallery-section-header__company-name .letter-a {
    color: var(--ashico-blue, #034ea2);
}

.gallery-section-header__company-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 3px 0;
}

.gallery-section-header__company-dots span {
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
}

/* Dot giữa màu XANH (giống Recruitment) */
.gallery-section-header__company-dots span:nth-child(2) {
    width: 6px;
    height: 6px;
    background: var(--ashico-blue, #034ea2);
}

.gallery-section-header__company-fullname {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.gallery-section-header__title {
    position: relative;
    z-index: 2;
    margin-top: 6px;
}

.gallery-section-header__title h2 {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ==================== GALLERY GRID ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==================== GALLERY ITEM ==================== */
.gallery-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left-color: var(--ashico-red, #ec2028);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Gallery Item Type Badge */
.gallery-item__type {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, var(--ashico-blue, #034ea2), #023d82);
    color: #fff;
    z-index: 3;
}

.gallery-item__type.video {
    background: linear-gradient(135deg, var(--ashico-red, #ec2028), #c41e22);
}

/* Gallery Item Overlay */
.gallery-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

/* Gallery Item Icon */
.gallery-item__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--ashico-blue, #034ea2), #023d82);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gallery-item:hover .gallery-item__icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-item[data-type="video"] .gallery-item__icon {
    background: linear-gradient(135deg, var(--ashico-red, #ec2028), #c41e22);
}

.gallery-item__title {
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1.4;
}

/* ==================== CTA SECTION ==================== */
.events-cta {
    background: linear-gradient(135deg, var(--ashico-blue, #034ea2) 0%, #023d82 100%);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-top: 30px;
}

.events-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 15px 15px;
    pointer-events: none;
}

.events-cta__content {
    position: relative;
    z-index: 1;
}

.events-cta h3 {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.events-cta p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.events-cta .thm-btn {
    background: var(--ashico-red, #ec2028);
    color: #fff;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.events-cta .thm-btn:hover {
    background: #c41e22;
    transform: translateY(-2px);
    color: #fff;
}

/* ==================== PAGINATION ==================== */
.events-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.events-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
}

.events-pagination__btn:hover {
    border-color: var(--ashico-blue, #034ea2);
    color: var(--ashico-blue, #034ea2);
}

.events-pagination__btn.active {
    background: var(--ashico-blue, #034ea2);
    border-color: var(--ashico-blue, #034ea2);
    color: #fff;
}

.events-pagination__btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ==================== PAGINATION INFO ==================== */
.events-pagination-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* ==================== EVENT MAIN DETAIL ==================== */
.event-main-detail {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.06);
}

.event-main-detail__img {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.event-main-detail__img img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.event-main-detail__title {
    font-family: var(--tanspot-font-two), 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1c2539;
    line-height: 1.3;
}

.event-main-detail__meta {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.event-main-detail__meta-single {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.event-main-detail__meta-icon {
    width: 40px;
    height: 40px;
    background: var(--ashico-red, #ec2028);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-main-detail__meta-icon span {
    color: #ffffff;
    font-size: 16px;
}

.event-main-detail__meta-text p {
    margin: 0;
    color: #74787c;
    font-size: 12px;
}

.event-main-detail__meta-text span {
    font-size: 14px;
    font-weight: 600;
    color: #1c2539;
}

.event-main-detail__social {
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.event-main-detail__social h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #1c2539;
}

.event-main-detail__social-list {
    display: flex;
    gap: 8px;
}

.event-main-detail__social-list a {
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #74787c;
    transition: all 0.3s;
    font-size: 14px;
}

.event-main-detail__social-list a:hover {
    background: var(--ashico-red, #ec2028);
    color: #ffffff;
}

/* ==================== RESPONSIVE ==================== */

/* Full HD (≥1920px) */
@media (min-width: 1920px) {
    .events-section-header,
    .gallery-section-header {
        padding: 18px 30px;
        border-radius: 10px;
    }
    
    .events-section-header__company-name,
    .gallery-section-header__company-name {
        font-size: 16px;
    }
    
    .events-section-header__company-fullname,
    .gallery-section-header__company-fullname {
        font-size: 10px;
    }
    
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 32px;
    }
    
    .event-card {
        padding: 18px;
    }
    
    .event-card__title {
        font-size: 14px;
    }
    
    .gallery-item__title {
        font-size: 14px;
    }
    
    .event-main-detail__title {
        font-size: 28px;
    }
}

/* Desktop (1366-1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 26px;
    }
}

/* Laptop (992-1365px) */
@media (min-width: 992px) and (max-width: 1365px) {
    .events-section-header,
    .gallery-section-header {
        padding: 12px 20px;
    }
    
    .events-section-header__company-name,
    .gallery-section-header__company-name {
        font-size: 12px;
    }
    
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 24px;
    }
    
    .event-card__img {
        width: 100px;
        height: 75px;
    }
    
    .event-card__title {
        font-size: 12px;
    }
    
    .gallery-item__title {
        font-size: 12px;
    }
    
    .event-main-detail__title {
        font-size: 22px;
    }
}

/* Tablet (768-991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .events-section-header,
    .gallery-section-header {
        padding: 12px 15px;
    }
    
    .events-section-header__company-name,
    .gallery-section-header__company-name {
        font-size: 11px;
    }
    
    .events-section-header__company-fullname,
    .gallery-section-header__company-fullname {
        font-size: 7px;
    }
    
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 22px;
    }
    
    .event-card {
        padding: 12px;
        gap: 12px;
    }
    
    .event-card__img {
        width: 100px;
        height: 75px;
    }
    
    .event-card__title {
        font-size: 11px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-item__title {
        font-size: 11px;
    }
    
    .events-view-all .thm-btn,
    .gallery-view-all .thm-btn {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .event-main-detail {
        padding: 15px;
    }
    
    .event-main-detail__title {
        font-size: 20px;
    }
    
    .event-main-detail__meta {
        padding: 15px;
    }
    
    .event-main-detail__meta-icon {
        width: 35px;
        height: 35px;
    }
    
    .event-main-detail__meta-icon span {
        font-size: 14px;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .events-page-content {
        padding: 20px 0 40px;
    }
    
    .events-section-header,
    .gallery-section-header {
        padding: 10px 12px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .events-section-header__company-name,
    .gallery-section-header__company-name {
        font-size: 10px;
    }
    
    .events-section-header__company-fullname,
    .gallery-section-header__company-fullname {
        font-size: 6px;
    }
    
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 20px;
    }
    
    /* Grid 1 cột */
    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .event-card {
        padding: 12px;
        gap: 10px;
    }
    
    .event-card__img {
        width: 100px;
        height: 75px;
    }
    
    .event-card__category {
        font-size: 8px;
        padding: 2px 6px;
    }
    
    .event-card__title {
        font-size: 12px;
    }
    
    .event-card__excerpt {
        font-size: 10px;
    }
    
    .event-card__meta {
        font-size: 9px;
    }
    
    .events-view-all,
    .gallery-view-all {
        margin-top: 15px;
        margin-bottom: 30px;
    }
    
    .gallery-view-all {
        margin-bottom: 0;
    }
    
    .events-view-all .thm-btn,
    .gallery-view-all .thm-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .gallery-section,
    .related-news-section {
        margin-top: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .gallery-item__type {
        font-size: 7px;
        padding: 2px 6px;
        top: 8px;
        right: 8px;
    }
    
    .gallery-item__icon {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .gallery-item__title {
        font-size: 11px;
    }
    
    .events-cta {
        padding: 20px 15px;
        margin-top: 25px;
    }
    
    .events-cta h3 {
        font-size: 16px;
    }
    
    .events-cta p {
        font-size: 12px;
    }
    
    .events-cta .thm-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .events-pagination__btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .events-pagination-info {
        font-size: 11px;
    }
    
    /* Event Main Detail Mobile */
    .event-main-detail {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .event-main-detail__img {
        margin-bottom: 15px;
    }
    
    .event-main-detail__img img {
        max-height: 250px;
    }
    
    .event-main-detail__title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .event-main-detail__meta {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .event-main-detail__meta-single {
        gap: 10px;
    }
    
    .event-main-detail__meta-icon {
        width: 32px;
        height: 32px;
    }
    
    .event-main-detail__meta-icon span {
        font-size: 12px;
    }
    
    .event-main-detail__meta-text p {
        font-size: 11px;
    }
    
    .event-main-detail__meta-text span {
        font-size: 13px;
    }
    
    .event-main-detail__social {
        padding-top: 12px;
    }
    
    .event-main-detail__social h4 {
        font-size: 13px;
    }
    
    .event-main-detail__social-list a {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Extra Small Mobile (≤480px) */
@media (max-width: 480px) {
    .events-section-header__title h2,
    .gallery-section-header__title h2 {
        font-size: 18px;
    }
    
    .event-card__img {
        width: 80px;
        height: 60px;
    }
    
    .event-card__title {
        font-size: 11px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        aspect-ratio: 16/9;
    }
    
    .gallery-item__icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .event-main-detail__title {
        font-size: 16px;
    }
    
    .event-main-detail__meta-icon {
        width: 28px;
        height: 28px;
    }
    
    .event-main-detail__meta-icon span {
        font-size: 11px;
    }
}