/* Shared mobile layout for the Vietnamese/English home and article templates. */
@media (max-width: 768px) {
    .ai-theme .ai-container {
        padding-inline: 20px;
    }

    .ai-theme .ai-hero-slider,
    .ai-theme .ai-hero-slider .swiper {
        height: auto;
    }

    .ai-theme .ai-hero-slider .swiper-wrapper {
        align-items: stretch;
    }

    .ai-theme .ai-hero-slider .swiper-slide {
        height: auto;
        min-height: 500px;
        padding: 40px 0 80px;
        box-sizing: border-box;
    }

    .ai-theme .ai-hero-inner {
        width: 100%;
        padding-inline: 20px;
    }

    .ai-theme .ai-h1 {
        font-size: clamp(27px, 7.5vw, 34px);
        line-height: 1.2;
        margin-bottom: 20px;
        overflow-wrap: break-word;
    }

    .ai-theme .ai-hero-desc {
        font-size: 16px;
        line-height: 1.65;
        margin-bottom: 24px;
    }

    .ai-theme .ai-btn,
    .ai-theme .ai-btn-blue {
        min-height: 48px;
        max-width: 100%;
        padding: 12px 24px;
        white-space: normal;
    }

    .ai-theme .ai-hero-slider .swiper-pagination {
        bottom: 44px;
    }

    .ai-theme .ai-stats-wrap {
        margin: -28px auto 0;
        padding-inline: 20px;
    }

    .ai-theme .ai-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
        padding: 24px 16px;
    }

    .ai-theme .ai-stats h4 {
        font-size: 30px;
        line-height: 1.1;
        margin-bottom: 6px;
    }

    .ai-theme .ai-stats p {
        font-size: 10px;
        line-height: 1.5;
        letter-spacing: 0.03em;
    }

    .ai-theme .ai-section {
        padding: 40px 0;
    }

    .ai-theme .ai-h2,
    .ai-theme .ai-cta-title {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .ai-theme .ai-about,
    .ai-theme .ai-about-imgs {
        margin-bottom: 32px;
    }

    .ai-theme .ai-about-imgs {
        gap: 16px;
    }

    .ai-theme .ai-split {
        gap: 24px;
        margin-bottom: 48px;
    }

    .ai-theme .ai-split:last-child {
        margin-bottom: 0;
    }

    .ai-theme .ai-split-content {
        padding-right: 0;
        min-width: 0;
    }

    .ai-theme .ai-icon-list li {
        gap: 12px;
    }

    .ai-theme .ai-news-header {
        margin-bottom: 24px;
    }

    .ai-theme .ai-news-grid {
        gap: 28px;
    }

    .ai-theme .ai-cta-section {
        padding: 36px 20px;
        margin-bottom: 0;
    }

    .ai-theme .ai-cta-inner {
        gap: 24px;
    }

    .ai-theme .ai-animate,
    .news-detail-template .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }

    .news-detail-template .wrap {
        width: auto;
        max-width: none;
        margin-inline: 20px;
        padding: 0;
    }

    .news-detail-template .news-hero {
        padding: 36px 0 !important;
        min-height: 0 !important;
        text-align: left;
    }

    .news-detail-template .news-hero::after {
        display: none;
    }

    .news-detail-template .post-meta-top {
        gap: 10px 16px;
        margin-bottom: 20px;
    }

    .news-detail-template .section-tag {
        font-size: 11px;
        line-height: 1.5;
        padding: 6px 12px;
        margin: 0;
        color: #7dd3fc !important;
    }

    .news-detail-template .news-hero .post-date,
    .news-detail-template .post-author-meta {
        color: #e2e8f0;
        font-size: 13px;
    }

    .news-detail-template .news-hero h1 {
        font-size: clamp(25px, 6.8vw, 30px) !important;
        line-height: 1.35 !important;
        margin-bottom: 16px;
        overflow-wrap: break-word;
    }

    .news-detail-template .grid-layout-sidebar {
        grid-template-columns: minmax(0, 1fr) !important;
        margin-top: 24px !important;
        gap: 32px !important;
        padding-bottom: 32px;
    }

    .news-detail-template .primary-content,
    .news-detail-template .sidebar-content {
        min-width: 0;
    }

    .news-detail-template .primary-content .post-article {
        padding: 24px 20px !important;
        margin-bottom: 32px;
    }

    .news-detail-template .entry-content {
        font-size: 16px !important;
        line-height: 1.75;
        overflow-wrap: anywhere;
    }

    .news-detail-template .entry-content :is(h2, h3, h4) {
        line-height: 1.4;
        margin: 28px 0 16px;
    }

    .news-detail-template .entry-content h2 { font-size: 24px; }
    .news-detail-template .entry-content h3 { font-size: 21px; }
    .news-detail-template .entry-content h4 { font-size: 18px; }
    .news-detail-template .entry-content p { margin-bottom: 20px; }

    .news-detail-template .entry-content :is(img, video, iframe, figure, .wp-caption) {
        max-width: 100% !important;
    }

    .news-detail-template .entry-content :is(img, video) { height: auto; }
    .news-detail-template .entry-content figure { margin-inline: 0; }
    .news-detail-template .entry-content :is(ul, ol) { padding-left: 22px; margin-left: 0; }
    .news-detail-template .entry-content :is(table, pre) { display: block; max-width: 100%; overflow-x: auto; }

    .news-detail-template .post-tags {
        margin-top: 24px;
        padding-top: 20px;
    }

    .news-detail-template .related-posts .section-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 20px;
    }

    .news-detail-template .related-posts .section-header h3 {
        font-size: 23px;
        margin: 0;
    }

    .news-detail-template .news-card-small .card-body { padding: 20px; }
    .news-detail-template .news-card-small h4 { font-size: 18px; }
    .news-detail-template .sidebar-widget { padding: 24px 20px !important; }
}
