
/* KHMER MAGAZINE MOBILE OPTIMIZATION */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

header .nav {
    width: 100%;
}

.khmer-header-brands {
    min-width: 0;
}

.khmer-header-brands img {
    max-width: 100%;
}

.khmer-header-nav a {
    white-space: nowrap;
}

.khmer-feature img {
    width: 100%;
    height: auto;
}

.khmer-home-hero {
    background-position: center center;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #e5a93d;
    outline-offset: 3px;
}

@media (max-width: 768px) {

    header {
        position: relative !important;
    }

    header .nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 15px !important;
        min-height: auto !important;
    }

    .khmer-header-brands {
        width: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 14px !important;
    }

    .khmer-magazine-logo {
        width: 100px !important;
        max-height: 74px !important;
    }

    .khmer-tv-logo {
        width: 105px !important;
        max-height: 65px !important;
    }

    .khmer-social {
        gap: 7px !important;
    }

    .khmer-social a {
        width: 30px !important;
        height: 30px !important;
    }

    .khmer-header-nav {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 5px 16px !important;
        width: 100%;
    }

    .khmer-header-nav a {
        font-size: 13px !important;
        padding: 8px 3px !important;
    }

    .khmer-home-hero {
        min-height: auto !important;
        padding: 35px 12px 45px !important;
        background-position: center center !important;
    }

    .khmer-original-headline {
        font-size: clamp(23px, 6vw, 33px) !important;
        line-height: 1.55 !important;
        margin-bottom: 26px !important;
    }

    .khmer-featured {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px !important;
        width: 100%;
        max-width: 520px;
        margin: auto;
    }

    .khmer-feature {
        width: 100% !important;
        min-width: 0;
    }

    .khmer-feature img {
        max-height: 280px !important;
        object-fit: contain;
    }

    .khmer-feature-actions {
        gap: 9px !important;
        margin-top: 12px !important;
    }

    .khmer-feature-actions a {
        font-size: 13px !important;
        padding: 11px 5px !important;
        min-height: 42px;
    }

    .khmer-home-title {
        font-size: clamp(32px, 8vw, 44px) !important;
        margin-top: 30px !important;
    }

    .khmer-home-english {
        font-size: 16px !important;
    }

    .wrap {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 13px !important;
    }

    .cover {
        height: 230px !important;
    }

    .cardbody strong {
        font-size: 15px !important;
    }

    .pageintro {
        padding-top: 35px !important;
    }

    .pageintro h1 {
        font-size: clamp(30px, 7vw, 43px) !important;
    }

    .readerbox,
    .real-flipbook {
        max-width: 100%;
        overflow: hidden;
    }

    .rf-stage {
        min-height: 350px !important;
    }

    .rf-toolbar {
        gap: 5px !important;
        padding: 10px 5px !important;
    }

    .rf-toolbar button {
        font-size: 12px !important;
        padding: 10px 8px !important;
    }

    .rf-counter {
        min-width: 90px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 390px) {

    .khmer-header-brands {
        gap: 10px !important;
    }

    .khmer-magazine-logo {
        width: 85px !important;
    }

    .khmer-tv-logo {
        width: 90px !important;
    }

    .khmer-original-headline {
        font-size: 22px !important;
    }

    .khmer-featured {
        gap: 10px !important;
    }

    .khmer-feature img {
        max-height: 225px !important;
    }

    .khmer-feature-actions a {
        font-size: 12px !important;
    }

    .cover {
        height: 190px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
