/* =========================================================
   MOBILE.CSS — гар утасны хувилбарын засвар
   Тавих газар: front_assets/css/mobile.css
   head.blade.php дотор ks_custom.css-ийн ДАРАА нь link-лэнэ.
   Desktop-ийн стилийг огт хөндөөгүй, зөвхөн ≤991px.
   ========================================================= */


/* ─────────────────────────────────────────────
   0. Хэвтээ гүйлт (horizontal scroll) хаах
   ───────────────────────────────────────────── */
@media (max-width: 991.98px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    html {
        scroll-padding-top: 64px;
    }

    img,
    svg,
    iframe,
    table {
        max-width: 100%;
    }
}


/* ─────────────────────────────────────────────
   1. NAVBAR — лого + hamburger
   ───────────────────────────────────────────── */

/* Desktop дээр бургер нуух, меню нь үргэлж харагдана */
@media (min-width: 992px) {

    .kstarter-navbar .nav-burger {
        display: none;
    }

    .kstarter-navbar .navbar-menu {
        display: block !important;
        height: auto !important;
    }
}

@media (max-width: 991.98px) {

    .kstarter-navbar .navbar-inner {
        position: relative;
        flex-wrap: wrap !important;
        padding: 10px 16px;
        gap: 10px;
    }

    /* 220px лого дэлгэцээс гарч байсан */
    .web-logo-img {
        width: 150px;
        max-width: 52vw;
        height: auto;
    }

    .kstarter-navbar .nav-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        flex: 0 0 auto;
        padding: 0;
        border: 1.5px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        color: var(--text-dark, #111827);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        transition: border-color 0.2s, background 0.2s;
    }

    .kstarter-navbar .nav-burger[aria-expanded="true"] {
        border-color: var(--kp, #004794);
        background: var(--kp-light, #e6f0fa);
        color: var(--kp, #004794);
    }

    /* Меню — бургерээс доош унжина (навбарын мөрийг өргөсгөхгүй) */
    .kstarter-navbar .navbar-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 16px !important;
        background: #fff;
        border-bottom: 1px solid #f0f0f5;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
        z-index: 1001;
    }

    .kstarter-navbar .navbar-menu .navbar-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 8px !important;
        padding: 12px 0 16px !important;
        margin: 0 !important;
    }

    /* Гарах товчны form нь display:contents — багана дотор зөв суух */
    .kstarter-navbar .navbar-menu .navbar-actions form {
        display: contents !important;
    }

    .kstarter-navbar .navbar-menu .btn-github,
    .kstarter-navbar .navbar-menu .btn-download-nav {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 48px;
        padding: 12px 18px !important;
        font-size: 15px;
        border-radius: 12px;
    }
}


/* ─────────────────────────────────────────────
   2. HERO SLIDER — 4:3 зураг, гарчиг доор
   ───────────────────────────────────────────── */
@media (max-width: 767.98px) {

    .hero-slider-section .carousel-item {
        background: #fff;
    }

    /* 16/7 биш — гар утсан дээр 4:3 */
    .hero-full-slide-image {
        aspect-ratio: 4 / 3;
    }

    /* Overlay-г зургийн доорх цагаан блок болгоно */
    .hero-full-slide-overlay {
        position: static;
        background: #fff;
        padding: 14px 16px 4px;
    }

    .hero-full-slide-content {
        color: var(--text-dark, #111827);
    }

    .hero-full-slide-content h2 {
        max-width: none;
        margin: 0 0 6px;
        color: var(--text-dark, #111827);
        font-size: 18px;
        line-height: 1.35;
        text-wrap: pretty;
    }

    .hero-full-slide-content p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-width: none;
        margin: 0 0 12px;
        color: #6b7280;
        font-size: 13.5px;
        line-height: 1.55;
    }

    .hero-full-slide-button {
        display: flex;
        justify-content: center;
        width: 100%;
        min-height: 46px;
        padding: 12px 18px;
        border-radius: 12px;
        font-size: 15px;
    }

    /* Индикаторыг зургийн дээр биш, доор нь тавина */
    .hero-slider-section .carousel-indicators {
        position: static;
        margin: 10px 0 0;
        padding: 0;
    }

    .hero-slider-section .carousel-indicators button {
        width: 7px;
        height: 7px;
        margin: 0 4px;
        background-color: #cbd5e1;
        border: none;
        opacity: 1;
    }

    .hero-slider-section .carousel-indicators button.active {
        width: 20px;
        border-radius: 4px;
        background-color: var(--kp, #004794);
    }

    /* Сум нуух — хуруугаар шудрах (swipe) хангалттай */
    .hero-slider-section .carousel-control-prev,
    .hero-slider-section .carousel-control-next {
        display: none;
    }
}


/* ─────────────────────────────────────────────
   3. СҮҮЛИЙН МЭДЭЭ
   ───────────────────────────────────────────── */
@media (max-width: 767.98px) {

    .front-news-section {
        padding: 28px 0 20px;
    }

    .front-news-inner {
        padding: 0 16px;
    }

    .front-news-header {
        gap: 12px;
        margin-bottom: 14px;
    }

    .front-news-kicker {
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    .front-news-title {
        font-size: 21px;
        font-weight: 700;
    }

    .front-news-actions {
        width: 100%;
        justify-content: space-between;
    }

    .front-news-all {
        font-size: 14px;
    }

    .front-news-btn {
        width: 44px;
        height: 44px;
    }

    .front-news-card {
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    }

    .front-news-card-body {
        padding: 12px 14px 16px;
    }

    .front-news-date {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .front-news-card-title {
        font-size: 15px;
        line-height: 1.45;
        min-height: 0;
        text-wrap: pretty;
    }
}


/* ─────────────────────────────────────────────
   4. ҮЙЛЧИЛГЭЭ — 2 багана, тайлбар нуух
   ───────────────────────────────────────────── */
@media (max-width: 767.98px) {

    .features-section {
        padding: 28px 16px 30px;
    }

    .features-inner .row {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }

    .features-section [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .feature-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 14px;
        border-radius: 14px;
        min-height: 112px;
    }

    .feature-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        margin-bottom: 0;
    }

    .feature-icon-wrap i {
        font-size: 18px;
    }

    .feature-title {
        font-size: 13.5px;
        line-height: 1.35;
        margin: 0;
        text-wrap: pretty;
    }

    /* Тайлбар нь гар утсан дээр хэт урт болдог */
    .feature-desc {
        display: none;
    }
}


/* ─────────────────────────────────────────────
   5. АШИГ ТУС (stats)
   ───────────────────────────────────────────── */
@media (max-width: 767.98px) {

    .stats-section {
        padding: 0 16px 30px;
    }

    .stats-inner {
        flex-direction: column;
        border-radius: 14px;
    }

    .stat-item {
        flex: 0 0 auto;
        width: 100%;
        gap: 12px;
        padding: 14px 16px;
        border-right: none;
        border-top: 1px solid #f0f0f5;
    }

    .stat-item:first-child {
        border-top: none;
    }

    .stat-item:nth-child(3),
    .stat-item:nth-child(4),
    .stat-item:last-child {
        border-top: 1px solid #f0f0f5;
    }

    .stat-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .stat-icon-wrap i {
        font-size: 18px;
    }

    .stat-label {
        font-size: 14px;
    }

    .stat-desc {
        font-size: 12.5px;
        line-height: 1.5;
    }
}


/* ─────────────────────────────────────────────
   6. FOOTER
   ───────────────────────────────────────────── */
@media (max-width: 767.98px) {

    .kstarter-footer {
        padding: 30px 16px 26px;
    }

    .footer-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand-col {
        grid-column: auto;
    }

    .footer-logo {
        margin-bottom: 10px;
    }

    .footer-logo .logo-text {
        font-size: 15px;
        line-height: 1.4;
    }

    .footer-tagline {
        font-size: 13px;
        max-width: 100%;
    }

    .footer-col-title {
        margin-bottom: 10px;
    }

    /* Хуруугаар дарахад хүрэлцээтэй байх */
    .footer-links li {
        margin-bottom: 2px;
    }

    .footer-links a {
        font-size: 14px;
        padding: 7px 0;
        word-break: break-word;
    }

    .footer-support-text {
        font-size: 13px;
        margin-bottom: 0;
    }
}
