:root {
    --color-black: #353535;
    --color-primary: #1A75BB;
}

/* For latest content */
.latest-content-border {
    width: 35%;
    height: 4px;
    margin: 6px 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.kingtube-posts-content-wrapper .latest-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 25px;
}

.content-event {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.content-event-info .title h2 {
    line-height: 20px;
    margin: 10px 0;
}

.content-event .content-event-wrapper {
    display: flex;
    gap: 0px;
    width: 100%;
    height: 480px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.content-event-wrapper::-webkit-scrollbar {
    display: none;
}

.content-event-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-event-wrapper .content-event-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background-color: #ffffff;
    border-radius: 10px;
}

.event-btn-prev,
.event-btn-next {
    position: absolute;
    top: 43%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.event-btn-prev:hover:not([style*="pointer-events: none"]),
.event-btn-next:hover:not([style*="pointer-events: none"]) {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.event-btn-prev {
    left: 5px;
}

.event-btn-next {
    right: 5px;
}

.event-btn-prev i,
.event-btn-next i {
    color: #333;
}

/* Card internal styles */
.content-event-card .thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.content-event-card .thumbnail .king-box-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.content-event-card .thumbnail:hover .king-box-bg {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.content-event-info {
    padding: 10px;
    background-color: #fff;
}

.content-event-info .title h2 {
    font-size: 16px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.content-event-info .title h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.content-event-info .title h2 a:hover {
    color: #4CAF50;
}

.content-event-info .description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    height: 37px;
}

.content-event-info .details {
    margin: 20px 0;
    height: 75px;
}

span.event-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    color: #EE4035;
    background-color: #fff;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.location-details {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.location-details i {
    margin-right: 10px;
    color: #e74c3c;
    font-size: 16px;
}

.event-dates {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
}

.event-dates span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.event-dates i {
    margin-right: 10px;
    color: #3498db;
    width: 16px;
}

.content-event-buttons {
    display: flex;
    justify-content: space-evenly;
    gap: 15px;
    margin-top: 20px;
}

.content-event-buttons .btn {
    flex: 1;
    padding: 8px 30px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-register {
    background-color: #1E88E5;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.2);
}

.btn-register:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.btn-detail {
    background-color: #ffffff;
    color: #424242 !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-detail:hover {
    background-color: #f9f9f9;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.content-event-wrapper .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.latest-event-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: transform 0.5s ease, filter 0.3s ease;
}


.btn {
    display: inline-block;
    padding: 7px 45px;
    border-radius: 5px;
}

.btn-detail {
    border: 1px solid #F5F5F5;
}

.btn-register {
    background-color: var(--color-primary);
}

@media (min-width: 1920px) {

    .event-dates span,
    .content-event-info .title h2 a,
    .content-event-info .description {
        font-size: 1.1rem;
    }

    body.lang_km-kh .content-event-info .title h2 a,
    body.lang_km-kh .content-event-info .description {
        font-size: 1.25rem;
        line-height: 25px;
    }

    .location-details,
    .event-dates span {
        font-size: 1rem;
    }
}

@media (min-width: 1440px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (max-width: 1200px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .content-event-info .title h2 {
        font-size: 19px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 768px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .kingtube-posts-content-wrapper .latest-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-event-card .thumbnail {
        height: 175px;
    }
}

/* @media (min-width: 2560px) {} */