/* =========================================================
   MEDIA PAGE
========================================================= */

.media-page {
    min-height: 700px;

    padding:
        42px 24px 80px;

    background:
        linear-gradient(180deg,
            #f4f8fc 0%,
            #ffffff 100%);
}


.media-container {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;
}


/* =========================================================
   PAGE HEADER
========================================================= */

.media-page-header {
    margin-bottom: 42px;

    text-align: center;
}


.media-page-label {
    display: inline-block;

    margin-bottom: 8px;

    color: #d99b15;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 2px;
}


.media-page-header h1 {
    margin: 0;

    color: #173f78;

    font-size: 38px;
    font-weight: 800;

    line-height: 1.2;
}


.media-page-header p {
    max-width: 560px;

    margin:
        10px auto 0;

    color: #8494a7;

    font-size: 15px;

    line-height: 1.7;
}


/* =========================================================
   SECTION
========================================================= */

.media-section {
    margin-bottom: 58px;
}


.media-section:last-child {
    margin-bottom: 0;
}


.media-section-header {
    margin-bottom: 22px;

    padding-bottom: 15px;

    border-bottom:
        1px solid #dfe8f1;
}


.media-section-heading {
    display: flex;
    align-items: center;

    gap: 13px;
}


.media-section-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #eaf3ff;

    color: #1d579c;

    font-size: 20px;
}


.media-section-video-icon {
    background: #fff0ef;

    color: #d6534c;
}


.media-section-header h2 {
    margin: 0;

    color: #153f75;

    font-size: 23px;
    font-weight: 800;
}


.media-section-header p {
    margin:
        3px 0 0;

    color: #91a0b0;

    font-size: 12px;
}


/* =========================================================
   PHOTO GRID
========================================================= */

.media-photo-grid {
    display: grid;

    grid-template-columns:
        repeat(4,
            minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   VIDEO GRID
========================================================= */

.media-video-grid {
    display: grid;

    grid-template-columns:
        repeat(3,
            minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   MEDIA CARD
========================================================= */

.media-card {
    position: relative;

    display: block;

    width: 100%;

    padding: 0;

    overflow: hidden;

    border: 0;

    border-radius: 18px;

    background: #e7edf4;

    cursor: pointer;

    text-align: left;

    box-shadow:
        0 7px 25px rgba(20, 52, 89, 0.10);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.media-photo-card {
    aspect-ratio: 4 / 3;
}


.media-video-card {
    aspect-ratio: 16 / 9;

    background: #101820;
}


.media-card:hover {
    transform:
        translateY(-5px) scale(1.015);

    box-shadow:
        0 18px 42px rgba(20, 52, 89, 0.20);
}


/* =========================================================
   CARD IMAGE / VIDEO
========================================================= */

.media-card>img,
.media-card>video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.4s ease,
        filter 0.3s ease;
}


.media-card:hover>img,
.media-card:hover>video {
    transform: scale(1.055);
}


/* =========================================================
   OVERLAY
========================================================= */

.media-card-overlay {
    position: absolute;

    right: 0;
    bottom: 0;
    left: 0;

    z-index: 3;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;

    padding:
        58px 15px 15px;

    color: #ffffff;

    background:
        linear-gradient(to top,
            rgba(7, 26, 49, 0.92),
            rgba(7, 26, 49, 0));

    pointer-events: none;
}


.media-card-type {
    display: block;

    margin-bottom: 5px;

    color: rgba(255,
            255,
            255,
            0.86);

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}


.media-card-type i {
    margin-right: 4px;
}


.media-card-overlay h3 {
    max-width: 230px;

    margin: 0;

    overflow: hidden;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.4;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   NEWS BADGE
========================================================= */

.media-news-badge {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 5;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding:
        7px 10px;

    border-radius: 10px;

    background:
        rgba(255,
            255,
            255,
            0.94);

    color: #174d8d;

    font-size: 10px;
    font-weight: 800;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.10);

    backdrop-filter: blur(7px);

    pointer-events: none;
}


/* =========================================================
   EXPAND ICON
========================================================= */

.media-expand {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(255,
            255,
            255,
            0.30);

    border-radius: 10px;

    background:
        rgba(255,
            255,
            255,
            0.14);

    color: #ffffff;

    font-size: 12px;
}


/* =========================================================
   PLAY BUTTON
========================================================= */

.media-play-button {
    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 4;

    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        3px solid rgba(255,
            255,
            255,
            0.85);

    border-radius: 50%;

    background:
        rgba(16,
            63,
            116,
            0.78);

    color: #ffffff;

    font-size: 18px;

    transform:
        translate(-50%,
            -50%);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.30);

    backdrop-filter: blur(5px);

    pointer-events: none;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


.media-card:hover .media-play-button {

    transform:
        translate(-50%,
            -50%) scale(1.12);

    background:
        rgba(16,
            63,
            116,
            0.95);
}


/* =========================================================
   HOVER LARGE PREVIEW
========================================================= */

.media-hover-preview {
    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 45px;

    /*
     * VERY IMPORTANT
     *
     * Preview មិនចាប់ mouse។
     * Mouse នៅតែត្រូវបានគិតលើ
     * original media card។
     */
    pointer-events: none;

    visibility: hidden;

    opacity: 0;

    background:
        rgba(4,
            14,
            28,
            0);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        background 0.25s ease;

    will-change:
        opacity;
}


/* =========================================================
   SHOW PREVIEW
========================================================= */

.media-hover-preview.show {
    visibility: visible;

    opacity: 1;

    background:
        rgba(4,
            14,
            28,
            0.76);

    backdrop-filter:
        blur(5px);
}


/* =========================================================
   HOVER CONTENT
========================================================= */

.media-hover-content {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 88vh;

    opacity: 0;

    transform:
        scale(0.80) translateY(18px);

    transition:
        opacity 0.22s ease,
        transform 0.32s cubic-bezier(0.22,
            1,
            0.36,
            1);

    will-change:
        transform,
        opacity;
}


.media-hover-preview.show .media-hover-content {

    opacity: 1;

    transform:
        scale(1) translateY(0);
}


/* =========================================================
   LARGE IMAGE
========================================================= */

.media-hover-content img {
    display: block;

    width: auto;
    height: auto;

    max-width: 90vw;
    max-height: 84vh;

    object-fit: contain;

    border:
        5px solid rgba(255,
            255,
            255,
            0.95);

    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 30px 90px rgba(0,
            0,
            0,
            0.55);
}


/* =========================================================
   LARGE VIDEO
========================================================= */

.media-hover-content video {
    display: block;

    width: auto;
    height: auto;

    max-width: 90vw;
    max-height: 84vh;

    object-fit: contain;

    border:
        5px solid rgba(255,
            255,
            255,
            0.95);

    border-radius: 20px;

    background: #000000;

    box-shadow:
        0 30px 90px rgba(0,
            0,
            0,
            0.55);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .media-photo-grid {

        grid-template-columns:
            repeat(3,
                minmax(0, 1fr));

    }


    .media-video-grid {

        grid-template-columns:
            repeat(2,
                minmax(0, 1fr));

    }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 850px) {

    .media-photo-grid {

        grid-template-columns:
            repeat(2,
                minmax(0, 1fr));

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    .media-page {

        padding:
            28px 15px 60px;

    }


    .media-page-header {

        margin-bottom: 30px;

    }


    .media-page-header h1 {

        font-size: 29px;

    }


    .media-page-header p {

        font-size: 14px;

    }


    .media-photo-grid {

        grid-template-columns:
            repeat(2,
                minmax(0, 1fr));

        gap: 12px;

    }


    .media-video-grid {

        grid-template-columns:
            1fr;

        gap: 15px;

    }


    .media-card-overlay {

        padding:
            40px 11px 11px;

    }


    .media-expand {

        display: none;

    }


    .media-play-button {

        width: 50px;
        height: 50px;

        font-size: 15px;

    }

}


/* =========================================================
   PHONE
========================================================= */

@media (max-width: 450px) {

    .media-photo-grid {

        grid-template-columns:
            1fr;

    }


    .media-section-header h2 {

        font-size: 20px;

    }

}


/* =========================================================
   TOUCH DEVICE
   No hover preview
========================================================= */

@media (hover: none),
(pointer: coarse) {

    .media-hover-preview {

        display: none !important;

    }


    .media-card:hover {

        transform: none;

    }

}

/* Font ទំព័រ News ទាំងមូល */
.news-page,
.news-page button,
.news-page input {
    font-family:
        'Poppins',
        'Noto Sans Khmer',
        Arial,
        sans-serif !important;
}

/* News title */
.news-card-header-info h2 {
    margin: 0;

    color: #102d52;

    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.45;
}

/* Date */
.news-card-meta {
    margin-top: 6px;

    color: #7186a0;

    font-size: 13px !important;
    font-weight: 500;
}

/* Post description */
.news-card-content,
.post-content {
    color: #294765;

    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.75;
}

/* Like និង Comment */
.news-action-btn {
    color: #294765;

    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Like count និង Comment count */
.news-social-summary {
    color: #607792;

    font-size: 13px !important;
    font-weight: 500;
}

/* Show more */
.show-more-btn {
    color: #0963bd;

    font-size: 13px !important;
    font-weight: 600;
}

@media (max-width: 600px) {
    .news-card-header-info h2 {
        font-size: 18px !important;
    }

    .news-card-content,
    .post-content {
        font-size: 14px !important;
    }

    .news-action-btn {
        font-size: 13px !important;
    }
}

/* Media Gallery — Page Header */
.media-page .media-page-header {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;

    margin: 0 0 38px;
    padding: 38px 24px;

    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: linear-gradient(120deg, #ffffff, #edf4fc);
    box-shadow: 0 4px 14px rgba(32, 56, 102, 0.04);

    text-align: center;
}

/* Decorative circle */
.media-page .media-page-header::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -70px;
    width: 240px;
    height: 240px;

    border: 35px solid rgba(32, 56, 102, 0.035);
    border-radius: 50%;
    pointer-events: none;
}

.media-page .media-page-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin: 0 0 12px;
    padding: 6px 14px;

    border: 1px solid #e8dcba;
    border-radius: 999px;
    background: #fffaf0;
    color: #957018;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.media-page .media-page-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b18a2b;
}

.media-page .media-page-header h1 {
    position: relative;
    margin: 0 0 12px;
    color: #203866;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: normal;
}

.media-page .media-page-header p {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
    color: #6c7c91;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .media-page .media-page-header {
        padding: 28px 18px;
        margin-bottom: 28px;
        border-radius: 14px;
    }

    .media-page .media-page-header p {
        font-size: 14px;
    }
}

.media-page .media-page-header {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 3px 12px rgba(32, 56, 102, 0.035);
}

/* រង្វង់តុបតែង */
.media-page .media-page-header::before {
    border-color: rgba(32, 56, 102, 0.035);
}

/* LMTC MEDIA */
.media-page .media-page-label {
    color: #34547a;
    background: #f0f4f9;
    border-color: #dce5ef;
}

.media-page .media-page-label::before,
.media-page .media-label-dot {
    background: #54759b;
}

/* ចំណងជើង */
.media-page .media-page-header h1,
.media-page .media-title-amp,
.media-page .media-title-highlight {
    color: #203858;
}

/* អត្ថបទខាងក្រោម */
.media-page .media-page-header p {
    color: #748194;
}

.media-page .media-page-header {
    position: relative;
    overflow: hidden;
    padding: 38px 24px;
    margin-bottom: 34px;

    border: 1px solid #284775;
    border-radius: 16px;
    background: linear-gradient(115deg, #172e50, #294b78);
    box-shadow: 0 5px 16px rgba(23, 46, 80, 0.1);
    text-align: center;
}

/* រង្វង់តុបតែងស្រាល */
.media-page .media-page-header::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -55px;
    width: 260px;
    height: 260px;
    border: 32px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.media-page .media-page-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 14px;

    border: 1px solid rgba(225, 198, 139, 0.3);
    border-radius: 999px;
    background: rgba(225, 198, 139, 0.08);
    color: #e1c68b;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.media-page .media-page-label::before,
.media-page .media-label-dot {
    background: #e1c68b;
}

.media-page .media-page-header h1 {
    position: relative;
    margin: 0 0 12px;
    color: #ffffff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: normal;
}

.media-page .media-page-header p {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    color: #d0dbea;
    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .media-page .media-page-header {
        padding: 30px 18px;
        border-radius: 12px;
    }

    .media-page .media-page-header p {
        font-size: 14px;
    }
}

.media-page .media-page-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 12px;
    margin-bottom: 14px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.8px;
}

.media-page .media-page-label::before,
.media-page .media-label-dot {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
}

/* Preview ពេញអេក្រង់ */
#mediaHoverPreview {
    position: fixed !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    transform: none !important;

    z-index: 2147483647 !important;
}

#mediaHoverContent {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
}

#mediaHoverContent video,
#mediaHoverContent img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;

    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}

.media-page .media-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ប្រអប់ជុំវិញ icon */
.media-page .media-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    min-width: 48px;
    flex: 0 0 48px;

    margin: 0;
    padding: 0;
    border-radius: 13px;
}

/* Icon ខាងក្នុង */
.media-page .media-section-icon i {
    font-size: 22px;
    line-height: 1;
    margin: 0;
}

/* Photos / Videos */
.media-page .media-section-heading h2 {
    margin: 0 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
}

/* អត្ថបទខាងក្រោម */
.media-page .media-section-heading p {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.media-page .media-news-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.media-page .media-post-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;

    color: #e2e8f0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.media-page .media-post-date i {
    font-size: 12px;
}

.media-page .media-news-link:focus-visible {
    outline: 3px solid #e1b858;
    outline-offset: 4px;
}

/* ចំណងជើង */
.media-page .media-news-link h3 {
    margin: 0 0 8px;
}

/* ថ្ងៃខែឆ្នាំ៖ អក្សរ និងលេខមានទម្រង់ស្មើគ្នា */
.media-page .media-news-link .media-post-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 0;
    color: #e2e8f0;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;

    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: "lnum" 1, "tnum" 1;
}

.media-page .media-post-date i {
    font-size: 13px;
    line-height: 1;
}

/* Zoom រូបនៅក្នុងកាត */
.media-page .media-photo-card {
    overflow: hidden;
}

.media-page .media-photo-card>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.45s ease;
}

@media (hover: hover) {
    .media-page .media-photo-card:hover>img {
        transform: scale(1.07);
    }
}

@media (prefers-reduced-motion: reduce) {
    .media-page .media-photo-card>img {
        transition: none;
    }

    .media-page .media-photo-card:hover>img {
        transform: none;
    }
}

#mediaHoverPreview,
#mediaHoverPreview * {
    pointer-events: none !important;
}

#mediaHoverPreview {
    background: rgba(12, 22, 38, 0.65) !important;
    backdrop-filter: blur(3px);

    align-items: center !important;
    justify-content: center !important;
}

#mediaHoverContent {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 85vw !important;
    height: 85vh !important;
    height: 85dvh !important;
    max-width: 1200px !important;

    background: transparent !important;
    border-radius: 14px !important;
}

#mediaHoverContent img,
#mediaHoverContent video {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25) !important;
}

@media (max-width: 767px) {
    #mediaHoverContent {
        width: 92vw !important;
        height: 80vh !important;
        height: 80dvh !important;
    }
}

/* =========================================================
   MOBILE PHONE REFINEMENTS
   These final rules intentionally override earlier mobile rules.
   Desktop styling remains unchanged.
========================================================= */
@media (max-width: 767px) {
    .media-page {
        min-height: 0;
        padding: 22px 12px 48px;
    }

    .media-container {
        width: 100%;
        max-width: none;
    }

    .media-page .media-page-header {
        margin: 0 0 26px;
        padding: 25px 16px;
        border-radius: 14px;
    }

    .media-page .media-page-label {
        gap: 7px;
        margin-bottom: 11px;
        padding: 5px 10px;
        font-size: 11px;
        line-height: 1.4;
        letter-spacing: 0.5px;
    }

    .media-page .media-page-header h1 {
        margin: 0 0 10px;
        font-size: clamp(25px, 6.8vw, 32px);
        line-height: 1.25;
        letter-spacing: normal;
        overflow-wrap: anywhere;
    }

    .media-page .media-page-header p {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.75;
    }

    .media-page .media-section {
        margin-bottom: 36px;
    }

    .media-page .media-section-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }

    .media-page .media-section-heading {
        gap: 10px;
        min-width: 0;
    }

    .media-page .media-section-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        flex: 0 0 42px;
        border-radius: 11px;
    }

    .media-page .media-section-icon i {
        font-size: 19px;
    }

    .media-page .media-section-heading>div,
    .media-page .media-section-heading>div * {
        min-width: 0;
    }

    .media-page .media-section-heading h2 {
        margin: 0 0 4px;
        font-size: clamp(18px, 4.8vw, 22px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .media-page .media-section-heading p {
        font-size: 12px;
        line-height: 1.6;
    }

    /* Photos: two comfortable columns on phones */
    .media-page .media-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .media-page .media-photo-card {
        min-width: 0;
        aspect-ratio: 4 / 3;
        border-radius: 12px;
    }

    /* Videos stay full-width for easier viewing */
    .media-page .media-video-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .media-page .media-video-card {
        aspect-ratio: 16 / 9;
        border-radius: 13px;
    }

    .media-page .media-card-overlay {
        gap: 8px;
        padding: 38px 9px 10px;
    }

    .media-page .media-card-type {
        margin-bottom: 3px;
        font-size: 9px;
        line-height: 1.35;
        letter-spacing: 0.3px;
    }

    .media-page .media-card-overlay h3 {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.35;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        overflow-wrap: anywhere;
    }

    .media-page .media-news-badge {
        top: 7px;
        left: 7px;
        gap: 4px;
        padding: 5px 7px;
        border-radius: 8px;
        font-size: 9px;
        line-height: 1.3;
    }

    .media-page .media-play-button {
        width: 44px;
        height: 44px;
        border-width: 2px;
        font-size: 14px;
    }

    .media-page .media-expand {
        display: none;
    }

    /* No hover movement on touch screens */
    .media-page .media-card:hover {
        transform: none;
        box-shadow: 0 7px 20px rgba(20, 52, 89, 0.10);
    }

    .media-page .media-card:hover>img,
    .media-page .media-card:hover>video {
        transform: none;
    }
}

@media (max-width: 380px) {
    .media-page {
        padding-right: 10px;
        padding-left: 10px;
    }

    .media-page .media-photo-grid {
        gap: 8px;
    }

    .media-page .media-section-heading {
        gap: 8px;
    }

    .media-page .media-section-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        flex-basis: 38px;
    }

    .media-page .media-section-icon i {
        font-size: 17px;
    }

    .media-page .media-card-overlay h3 {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .media-page .media-card,
    .media-page .media-card>img,
    .media-page .media-card>video {
        transition: none !important;
    }
}

/* Mobile: fit news title neatly inside each card */
@media (max-width: 720px) {
    .media-page .media-card-overlay h3 {
        max-width: 100%;
        margin: 0;

        font-family: "Battambang", "Noto Sans Khmer", sans-serif;
        font-size: 11px !important;
        font-weight: 600;
        line-height: 1.5;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;

        white-space: normal;
        overflow: hidden;
        overflow-wrap: anywhere;
        text-overflow: ellipsis;
    }

    .media-page .media-card-overlay {
        gap: 8px;
        padding: 38px 10px 10px;
    }
}

/* Very narrow phones */
@media (max-width: 380px) {
    .media-page .media-card-overlay h3 {
        font-size: 10px !important;
        line-height: 1.45;
    }
}

/* Mobile: compact title and date inside media cards */
@media (max-width: 720px) {
    .media-page .media-card-overlay {
        gap: 4px !important;
        padding: 30px 9px 8px !important;
    }

    .media-page .media-card-overlay h3 {
        margin: 0 0 3px !important;
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    .media-page .media-card-overlay .media-post-date,
    .media-page .media-news-link .media-post-date {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;

        margin: 0 !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
    }

    .media-page .media-card-overlay .media-post-date i {
        font-size: 11px !important;
        line-height: 1 !important;
    }
}

@media (max-width: 380px) {

    .media-page .media-card-overlay .media-post-date,
    .media-page .media-news-link .media-post-date {
        font-size: 10px !important;
    }

    .media-page .media-card-overlay .media-post-date i {
        font-size: 10px !important;
    }
}

/* Mobile: reduce space between title and date */
@media (max-width: 720px) {
    .media-page .media-card-overlay h3 {
        margin-top: 0 !important;
        margin-bottom: 1px !important;
        padding: 0 !important;
        line-height: 1.3 !important;
    }

    .media-page .media-card-overlay .media-post-date,
    .media-page .media-news-link .media-post-date {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
    }

    .media-page .media-card-overlay .media-post-date i {
        line-height: 1 !important;
    }

    .media-page .media-card-overlay {
        gap: 2px !important;
        padding: 20px 9px 8px !important;
    }
}

@media (max-width: 720px) {
    .media-page .media-card-overlay h3 {
        transform: translateY(4px) !important;
        margin-bottom: 0 !important;
        line-height: 1.3 !important;
    }
}


/* =========================================================
   FEATURED MEDIA SLIDER — reuse the four static gallery photos
========================================================= */
.media-page .media-featured-section {
    margin: 0 0 42px;
    overflow: hidden;
}

.media-page .media-featured-heading {
    max-width: 720px;
    margin: 0 auto 18px;
    text-align: center;
}

.media-page .media-featured-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 5px 10px;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #f0f4f9;
    color: #34547a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .7px;
}

.media-page .media-featured-heading h2 {
    margin: 0 0 6px;
    color: #203858;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(23px, 2.5vw, 31px);
    font-weight: 500;
    line-height: 1.25;
}

.media-page .media-featured-heading p {
    margin: 0;
    color: #748194;
    font-size: 13px;
    line-height: 1.55;
}

.media-page .media-featured-carousel {
    width: 100%;
    overflow: hidden;
}

.media-page .media-featured-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 5px 0 9px;
    touch-action: pan-y;
}

.media-page .media-featured-track {
    display: flex;
    align-items: stretch;
    gap: 18px;
    width: max-content;
    will-change: transform;
    transition: transform 620ms cubic-bezier(.22, 1, .36, 1);
}

.media-page .media-featured-slide {
    position: relative;
    display: block;
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 17px;
    background: #10243e;
    color: #fff;
    box-shadow: 0 7px 25px rgba(20, 52, 89, .12);
    cursor: pointer;
}

.media-page .media-featured-slide>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .media-page .media-featured-slide:hover>img {
        transform: scale(1.045);
    }
}

.media-page .media-featured-overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 36px 14px 13px;
    color: #fff;
    background: linear-gradient(180deg, rgba(5, 18, 35, 0) 0%, rgba(5, 18, 35, .25) 38%, rgba(5, 18, 35, .94) 100%);
}

.media-page .media-featured-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, .96);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.media-page .media-featured-overlay h3 {
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(13px, 1.2vw, 16px);
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}

.media-page .media-featured-expand {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 11px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    backdrop-filter: blur(5px);
}

.media-page .media-featured-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 23px;
    margin-top: 4px;
}

.media-page .media-featured-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #c2c9d3;
    cursor: pointer;
    transition: width 220ms ease, background-color 220ms ease;
}

.media-page .media-featured-dot.is-active {
    width: 21px;
    background: #203858;
}

.media-page .media-featured-dot:focus-visible {
    outline: 2px solid #203858;
    outline-offset: 4px;
}

@media (max-width: 1099px) {
    .media-page .media-featured-track {
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .media-page .media-featured-section {
        margin-bottom: 32px;
    }

    .media-page .media-featured-heading {
        margin-bottom: 13px;
    }

    .media-page .media-featured-heading h2 {
        font-size: clamp(21px, 5.8vw, 27px);
    }

    .media-page .media-featured-heading p {
        max-width: 330px;
        margin: 0 auto;
        font-size: 12px;
    }

    .media-page .media-featured-track {
        gap: 12px;
        transition-duration: 550ms;
    }

    .media-page .media-featured-slide {
        border-radius: 15px;
    }

    .media-page .media-featured-overlay {
        gap: 4px;
        padding: 29px 11px 11px;
    }

    .media-page .media-featured-kicker {
        font-size: 10px;
    }

    .media-page .media-featured-overlay h3 {
        font-size: 13px;
        line-height: 1.4;
    }

    .media-page .media-featured-expand {
        right: 8px;
        bottom: 8px;
        width: 31px;
        height: 31px;
        border-radius: 9px;
    }

    .media-page .media-featured-dots {
        gap: 7px;
        margin-top: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .media-page .media-featured-track,
    .media-page .media-featured-slide>img,
    .media-page .media-featured-dot {
        transition: none !important;
    }
}


/* =========================================================
   MEDIA VIDEO PLAYBACK
   Show native controls after a video card is clicked.
========================================================= */
.media-page .media-video-card.is-playing>video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.media-page .media-video-card.is-playing .media-play-button,
.media-page .media-video-card.is-playing .media-card-overlay {
    display: none !important;
}

.media-page .media-video-card.is-playing {
    cursor: default;
    background: #000;
}