/* ============================================================
   responsive.css — TO'LIQ RESPONSIVE (telefon, tablet, kompyuter)
   Breakpoints:
     xs  < 480px    (kichik telefon)
     sm  480–575px  (katta telefon)
     md  576–767px  (kichik tablet / landscape telefon)
     lg  768–991px  (tablet)
     xl  992–1199px (kichik noutbuk)
     xxl ≥ 1200px   (katta ekran) — asosiy stil home.css da
============================================================ */

/* ============================================================
   1. BOX-SIZING VA GLOBAL HIMOYA
============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body { overflow-x: hidden; }

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   2. CONTAINER PADDING
============================================================ */
@media (max-width: 575px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }
}
@media (max-width: 374px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ============================================================
   3. TOP BAR
============================================================ */

/* Kompyuter: panel hamma kengliklarda BITTA qatorda turadi (kontakt, davlat ramzlari, reyting logolari, til,
   ijtimoiy tarmoqlar, tun rejimi). Joy yetmay qolganda avval ijtimoiy tarmoqlar (ular pastki qismda ham bor),
   keyin elektron pochta yashiriladi; shu tufayli panel ikki qatorga o'tib, logolar siljib ketmaydi. */
@media (min-width: 993px) {
    .top-bar .container { flex-wrap: nowrap !important; gap: 12px !important; }
}
@media (min-width: 993px) and (max-width: 1399px) {
    .top-bar-socials { display: none; }
}
@media (min-width: 993px) and (max-width: 1199px) {
    .top-bar-contacts a:nth-child(2) { display: none; }
}

/* Tablet va undan kichik — vertikal tuzilma */
@media (max-width: 991px) {
    .top-bar .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 12px;
        padding: 5px 14px;
    }
    .top-bar-contacts { display: none; }
    .top-bar-langs    { margin-left: 0; }
}

@media (max-width: 575px) {
    .top-bar { font-size: 11px; }
    .top-bar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 5px 12px;
    }
    .top-bar-langs {
        margin-left: 0;
        gap: 1px;
    }
    .top-bar-langs a {
        padding: 2px 7px;
        font-size: 10px;
    }
    .top-bar-socials { display: none; }
    .dark-toggle-topbar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

@media (max-width: 374px) {
    .top-bar-langs a { padding: 2px 5px; font-size: 9.5px; }
}

/* ============================================================
   4. XA-BOX (reyting logolari)
============================================================ */
@media (max-width: 1199px) {
    .XA-box { --xa-h: 32px; }
}

@media (max-width: 1100px) {
    .XA-box { --xa-h: 28px; gap: 0; }
    .XA-box a { padding: 2px 6px; }
}

/* 992px da yashiriladi (home.css da bor, takrorlaymiz ishonch uchun) */
@media (max-width: 992px) {
    .XA-box { display: none !important; }
    .navbar { padding: 0 !important; }
}

/* ============================================================
   5. NAVBAR
============================================================ */
@media (max-width: 1199px) {
    .navbar-nav .nav-link {
        font-size: 13px;
        padding: 20px 11px !important;
    }
}

@media (max-width: 1050px) {
    .navbar-nav .nav-link {
        font-size: 12px;
        padding: 18px 9px !important;
    }
}

/* Mobil / tablet — collapsed navbar */
@media (max-width: 991px) {
    .navbar-brand img { width: 44px !important; }
    .navbar-brand span { font-size: 14px; }

    /* Mega menu mobilda to'liq kenglik */
    .dropdown-menu.main-menu {
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        border-radius: 0 0 10px 10px !important;
        max-height: 65vh;
        overflow-y: auto;
    }

    /* Dropdown ichidagi row vertikal */
    .dropdown-menu .row {
        flex-direction: column;
    }
    .dropdown-menu .col-md-3 {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0 !important;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .dropdown-menu .col-md-3:last-child { border-bottom: none; }

    /* Navbar collapse overlay */
    .navbar-collapse {
        background: inherit;
        padding: 8px 0 14px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .navbar-nav .nav-link {
        padding: 10px 16px !important;
        font-size: 14px;
    }
    .navbar-nav .nav-link::after { display: none; }
}

@media (max-width: 575px) {
    .navbar-brand span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        font-size: 13px;
    }
    .navbar-brand img { width: 38px !important; }
}

@media (max-width: 374px) {
    .navbar-brand span {
        max-width: 120px;
        font-size: 12px;
    }
    .navbar-brand img { width: 34px !important; }
}

/* ============================================================
   6. HOLIDAY MARQUEE
============================================================ */
@media (max-width: 767px) {
    .holiday-marquee      { font-size: 12px; padding: 6px 0; }
    .holiday-marquee-item { padding: 0 22px; gap: 7px; }
    .hm-icon              { font-size: 14px; }
    .hm-sep               { font-size: 11px; margin-left: 6px; }
    .hm-year-num          { font-size: 14px; }
    .hm-years-badge       { font-size: 10px; padding: 1px 7px; }
}

@media (max-width: 480px) {
    .holiday-marquee      { font-size: 11px; }
    .holiday-marquee-item { padding: 0 16px; }
    .hm-icon              { font-size: 13px; }
}

/* ============================================================
   7. LOGO OVERLAY-LAR VA SEASON BADGE
============================================================ */
@media (max-width: 767px) {
    .logo-overlay { transform: scale(0.82); }
    .season-badge { display: none; }
}

@media (max-width: 480px) {
    .logo-overlay { transform: scale(0.70); }
}

/* ============================================================
   8. HERO / COVERFLOW
============================================================ */
@media (max-width: 1100px) {
    .coverflow-item { width: 420px; height: 280px; }
    .coverflow      { height: 280px; }
    .info h2        { font-size: 22px; }
    .nav-button.prev { left: 14px; }
    .nav-button.next { right: 14px; }
}

@media (max-width: 768px) {
    .info { top: 10%; width: 92%; }
    .info h2 { font-size: 18px; line-height: 1.4; }
    .info-badge { font-size: 9.5px; letter-spacing: 1.4px; }
    .coverflow-item { width: 290px; height: 195px; }
    .coverflow      { height: 195px; top: 40px; }
    .nav-button { width: 40px; height: 40px; font-size: 20px; }
    .nav-button.prev { left: 6px; }
    .nav-button.next { right: 6px; }
    .dots-container { bottom: 18px; }
    .dot { width: 6px; height: 6px; }
    .dot.active { width: 18px; }
}

@media (max-width: 575px) {
    .coverflow-wrapper { height: 90vw; min-height: 320px; max-height: 85vh; }
    .coverflow-item { width: 62vw; height: 42vw; min-height: 170px; }
    .coverflow      { height: 42vw; min-height: 170px; top: 36px; }
    .info           { top: 8%; width: 95%; }
    .info h2        { font-size: 16px; }
    .nav-button     { width: 36px; height: 36px; font-size: 18px; }
}

@media (max-width: 480px) {
    .info { top: 7%; width: 96%; }
    .info h2 { font-size: 15px; }
    .info-badge { font-size: 9px; }
    .coverflow-item { width: 220px; height: 148px; }
    .coverflow      { height: 148px; top: 28px; }
    .nav-button     { width: 32px; height: 32px; font-size: 17px; }
    .dot            { width: 6px; height: 6px; }
    .dot.active     { width: 16px; }
    .dots-container { gap: 5px; bottom: 14px; }
}

@media (max-width: 374px) {
    .coverflow-item { width: 185px; height: 126px; }
    .coverflow      { height: 126px; top: 24px; }
    .info h2        { font-size: 13.5px; }
    .nav-button     { width: 28px; height: 28px; font-size: 15px; }
}

/* ============================================================
   9. SECTION SPACING
============================================================ */
@media (max-width: 991px) {
    .home-section     { padding: 52px 0 !important; }
    .tizimlar-section { padding: 44px 0 !important; }
    .rektor-section   { padding: 44px 0 !important; }
    .stats-section    { padding: 52px 0 !important; }
    .welcome-section  { padding: 52px 0 !important; }
    .xavola-section   { padding: 44px 0 !important; }
}

@media (max-width: 767px) {
    .home-section     { padding: 40px 0 !important; }
    .tizimlar-section { padding: 36px 0 !important; }
    .rektor-section   { padding: 36px 0 !important; }
    .stats-section    { padding: 40px 0 !important; }
    .welcome-section  { padding: 40px 0 !important; }
    .xavola-section   { padding: 36px 0 !important; }
}

@media (max-width: 480px) {
    .home-section     { padding: 30px 0 !important; }
    .tizimlar-section { padding: 28px 0 !important; }
    .rektor-section   { padding: 28px 0 !important; }
    .stats-section    { padding: 32px 0 !important; }
    .welcome-section  { padding: 32px 0 !important; }
    .xavola-section   { padding: 28px 0 !important; }
}

/* ============================================================
   10. SECTION HEADER
============================================================ */
@media (max-width: 767px) {
    .section-header { margin-bottom: 24px; gap: 10px; }
    .section-header h3 { font-size: 18px; }
    .section-header .header-line { display: none; }
}

@media (max-width: 480px) {
    .section-header { margin-bottom: 18px; flex-wrap: wrap; }
    .section-header h3 { font-size: 16px !important; white-space: normal; }
    .header-underline { width: 36px; height: 3px; }
}

@media (max-width: 374px) {
    .section-header h3 { font-size: 14.5px !important; }
}

/* ============================================================
   11. NEWS / ELON CARDS
============================================================ */
@media (max-width: 991px) {
    .news-card img { height: 175px; }
}

@media (max-width: 767px) {
    /* 2 ustun */
    #elonlar .col-md-3,
    #yangiliklar .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .news-card img        { height: 155px; }
    .news-card-body h5    { font-size: 13px; }
    .news-card-body p     { font-size: 12px; }
    .news-card-body .btn-news { font-size: 11px; padding: 5px 14px; }
}

@media (max-width: 480px) {
    /* 1 ustun */
    #elonlar .col-md-3,
    #yangiliklar .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .news-card img        { height: 185px; }
    .news-card-body h5    { font-size: 14px; }
}

@media (max-width: 374px) {
    .news-card img { height: 160px; }
}

.all-link {
    font-size: 14px;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .all-link { font-size: 12.5px; padding: 7px 16px; }
}

/* ============================================================
   12. TIZIMLAR CAROUSEL
============================================================ */
@media (max-width: 991px) {
    .tizim-slide { flex: 0 0 33.333% !important; }
}

@media (max-width: 767px) {
    .tizim-carousel-wrapper { margin: 0 36px; }
    .tizim-slide            { flex: 0 0 50% !important; }
    .tizim-card             { padding: 18px 10px 14px; gap: 10px; }
    .tizim-card .icon-box   { width: 52px; height: 52px; }
    .tizim-card .icon-box i { font-size: 20px; }
    .tizim-card h6          { font-size: 12px; }
    .tizim-dots             { margin-top: 14px; }
    .tizim-nav              { width: 34px; height: 34px; font-size: 13px; }
}

@media (max-width: 480px) {
    .tizim-carousel-wrapper { margin: 0 28px; }
    .tizim-slide            { flex: 0 0 50% !important; }
    .tizim-card             { padding: 14px 8px 12px; border-radius: 12px; }
    .tizim-card .icon-box   { width: 44px; height: 44px; }
    .tizim-card .icon-box i { font-size: 17px; }
    .tizim-card h6          { font-size: 11px; }
    .tizim-nav              { width: 28px !important; height: 28px !important; font-size: 11px !important; }
}

@media (max-width: 374px) {
    .tizim-carousel-wrapper { margin: 0 22px; }
    .tizim-card h6          { font-size: 10.5px; }
    .tizim-nav              { width: 24px !important; height: 24px !important; }
}

/* ============================================================
   13. FAKULTETLAR
============================================================ */
@media (max-width: 991px) {
    /* 2 ustun */
    #fakultetlar .col-md-4 { flex: 0 0 50%; max-width: 50%; }
    .fakultet-card         { height: 200px; }
}

@media (max-width: 767px) {
    .fakultet-card          { height: 175px; }
    .fakultet-card .overlay h6 { font-size: 13px; }
}

@media (max-width: 480px) {
    /* 1 ustun */
    #fakultetlar .col-md-4 { flex: 0 0 100%; max-width: 100%; }
    .fakultet-card          { height: 190px; border-radius: 12px; }
    .fakultet-card .overlay h6 { font-size: 14px; }
}

/* ============================================================
   14. STATISTIKA
============================================================ */
@media (max-width: 991px) {
    .stats-section h2 { font-size: 22px !important; margin-bottom: 36px; }
    .stat-item .stat-number     { font-size: 32px !important; }
}

@media (max-width: 767px) {
    .stats-section h2   { font-size: 20px !important; margin-bottom: 28px; }
    .stat-item .stat-number       { font-size: 28px !important; }
    .stat-item p        { font-size: 11.5px !important; }
    .stat-icon-box      { width: 50px !important; height: 50px !important; }
    .stat-icon-box i    { font-size: 20px !important; }
    /* 2 ustun ichida 4 li qator */
    .stats-section .col-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 480px) {
    .stats-section h2   { font-size: 17px !important; }
    .stat-item          { padding: 10px 4px; }
    .stat-item .stat-number       { font-size: 24px !important; }
    .stat-item p        { font-size: 10.5px !important; }
    .stat-icon-box      { width: 42px !important; height: 42px !important; }
    .stat-icon-box i    { font-size: 17px !important; }
}

@media (max-width: 374px) {
    .stat-item .stat-number       { font-size: 21px !important; }
}

/* ============================================================
   15. REKTOR QABULI
============================================================ */
@media (max-width: 991px) {
    .rektor-card .rektor-right { width: 220px !important; }
    .rektor-card .rektor-left  { padding: 30px 26px; }
    .rektor-card .rektor-left h3 { font-size: 20px !important; }
}

@media (max-width: 767px) {
    .rektor-card                     { flex-direction: column-reverse !important; }
    .rektor-card .rektor-right       { width: 100% !important; height: 230px !important; }
    .rektor-card .rektor-left        { padding: 22px 18px !important; }
    .rektor-card .rektor-left h3     { font-size: 17px !important; }
    .rektor-card .rektor-left p      { font-size: 13px; }
}

@media (max-width: 480px) {
    .rektor-card .rektor-right       { height: 190px !important; }
    .rektor-card .rektor-left        { padding: 16px 14px !important; }
    .rektor-card .rektor-left h3     { font-size: 15px !important; }
    .rektor-card .rektor-left .badge-label { font-size: 10px; }
    .btn-rektor                      { font-size: 13px !important; padding: 8px 18px !important; }
}

@media (max-width: 374px) {
    .rektor-card .rektor-right { height: 160px !important; }
    .rektor-card .rektor-left h3 { font-size: 14px !important; }
}

/* ============================================================
   16. ISHONCH BANNER
============================================================ */
@media (max-width: 991px) {
    .info-banner { padding: 20px 24px; gap: 14px; }
}

@media (max-width: 767px) {
    .info-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
        gap: 14px;
        border-radius: 12px;
    }
    .info-banner .banner-text h5 { font-size: 14px !important; }
    .info-banner .banner-text p  { font-size: 12.5px; }
    .info-banner .banner-link    { width: 100%; text-align: center; display: block; }
}

@media (max-width: 480px) {
    .info-banner .banner-text h5 { font-size: 13px !important; }
    .info-banner .banner-link    { font-size: 12.5px; padding: 9px 18px; }
}

/* ============================================================
   17. FOYDALI XAVOLALAR
============================================================ */
@media (max-width: 991px) {
    .xavola-logo-card {
        min-width: 145px !important;
        max-width: 145px !important;
        height: 118px !important;
    }
}

@media (max-width: 767px) {
    .xavola-logo-card {
        min-width: 124px !important;
        max-width: 124px !important;
        height: 106px !important;
        padding: 12px 10px !important;
        border-radius: 12px;
    }
    .xavola-logo-card img { height: 34px !important; }
    .xavola-logo-card span { font-size: 11px !important; }
    .xavola-scroll-outer::before,
    .xavola-scroll-outer::after { width: 32px; }
    .xavola-scroll-track { gap: 10px; }
}

@media (max-width: 480px) {
    .xavola-logo-card {
        min-width: 106px !important;
        max-width: 106px !important;
        height: 94px !important;
        padding: 10px 8px !important;
    }
    .xavola-logo-card img   { height: 30px !important; }
    .xavola-logo-card span  { font-size: 10px !important; }
    .xavola-scroll-track    { gap: 8px; animation-duration: 18s; }
    .xavola-fallback        { width: 38px !important; height: 38px !important; }
    .xavola-fallback i      { font-size: 16px !important; }
    .xavola-scroll-outer::before,
    .xavola-scroll-outer::after { width: 18px; }
}

@media (max-width: 374px) {
    .xavola-logo-card {
        min-width: 90px !important;
        max-width: 90px !important;
        height: 82px !important;
    }
    .xavola-logo-card img  { height: 26px !important; }
    .xavola-logo-card span { font-size: 9.5px !important; }
}

/* ============================================================
   18. WELCOME / INSTITUT TA'RIFI
============================================================ */
@media (max-width: 991px) {
    .welcome-section h2     { font-size: 25px !important; }
    .welcome-feature        { padding: 24px 20px; }
}

@media (max-width: 767px) {
    /* 1 ustun */
    .welcome-section .col-md-4 { flex: 0 0 100%; max-width: 100%; }
    .welcome-section h2         { font-size: 21px !important; }
    .welcome-section .subtitle  { font-size: 14px !important; margin-bottom: 28px; }
    .welcome-section .text-center { margin-bottom: 24px !important; }
    .welcome-feature            { padding: 20px 16px; }
    .welcome-feature h5         { font-size: 14px !important; }
    .welcome-feature p          { font-size: 13px !important; }
}

@media (max-width: 480px) {
    .welcome-section h2         { font-size: 17px !important; }
    .welcome-section .subtitle  { font-size: 13px !important; }
    .welcome-badge              { font-size: 10px; padding: 4px 11px; }
    .welcome-feature .feat-icon { width: 38px; height: 38px; border-radius: 10px; }
    .welcome-feature .feat-icon i { font-size: 16px; }
}

@media (max-width: 374px) {
    .welcome-section h2 { font-size: 15.5px !important; }
    .welcome-feature h5 { font-size: 13.5px !important; }
}

/* ============================================================
   19. FOOTER
============================================================ */
@media (max-width: 991px) {
    footer .col-md-3 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 767px) {
    footer .col-md-3     { flex: 0 0 100%; max-width: 100%; text-align: center; }
    footer .d-flex.gap-2 { justify-content: center; }
    footer img           { display: block; margin: 0 auto; }
    footer ul            { padding: 0; }
    footer a:hover       { padding-left: 0 !important; }
}

@media (max-width: 480px) {
    footer              { padding: 28px 0 !important; }
    footer h5           { font-size: 12px; }
    footer a,
    footer .text-white  { font-size: 13px; }
    footer .d-flex a    { width: 30px; height: 30px; }
}

@media (max-width: 374px) {
    footer h5 { font-size: 11px; }
}

/* ============================================================
   20. TO-TOP BUTTON
============================================================ */
@media (max-width: 767px) {
    .to-top { right: 18px; bottom: 22px; }
}

@media (max-width: 480px) {
    .to-top {
        width: 40px !important;
        height: 40px !important;
        right: 14px !important;
        bottom: 18px !important;
    }
}

/* ============================================================
   21. YANGILIKLAR / ELONLAR DETAIL SAHIFALAR
============================================================ */
@media (max-width: 991px) {
    .article-wrapper  { padding: 28px 24px; }
    .content-card     { padding: 28px 24px; }
    .article-title    { font-size: 21px !important; }
    .page-header h1   { font-size: 21px !important; }
}

@media (max-width: 767px) {
    .article-wrapper  { padding: 22px 18px; }
    .content-card     { padding: 22px 18px; }
    .article-title    { font-size: 18px !important; }
    .meta-bar         { gap: 10px; flex-wrap: wrap; }
    .page-header      { padding: 28px 0 22px; }
    .page-header h1   { font-size: 18px !important; }
}

@media (max-width: 480px) {
    .article-wrapper   { padding: 16px 13px; }
    .content-card      { padding: 16px 13px; }
    .article-title     { font-size: 16px !important; }
    .article-body,
    .article-content   { font-size: 14px !important; line-height: 1.75; }
    .page-header       { padding: 24px 0 18px; }
    .page-header h1    { font-size: 16px !important; }
}

@media (max-width: 374px) {
    .article-title      { font-size: 14.5px !important; }
    .article-body,
    .article-content    { font-size: 13.5px !important; }
    .page-header h1     { font-size: 14.5px !important; }
}

/* Sidebar — 992px dan kichik, pastga tushadi */
@media (max-width: 991px) {
    .sidebar-card-img   { width: 76px; min-width: 76px; height: 68px; }
    .side-card-img      { width: 68px; height: 58px; }
}

@media (max-width: 480px) {
    .sidebar-card-img   { width: 62px; min-width: 62px; height: 54px; }
    .side-card-img      { width: 58px; height: 50px; }
    .sidebar-card-title { font-size: 12.5px !important; }
    .sidebar-title      { font-size: 14px !important; }
}

/* ============================================================
   22. PAGINATION
============================================================ */
@media (max-width: 480px) {
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ============================================================
   23. HOVER — TOUCH QURILMALAR
   (mobil qurilmalarda hover effektlarni o'chirish)
============================================================ */
@media (hover: none) {
    .news-card:hover,
    .tizim-card:hover,
    .xavola-logo-card:hover,
    .welcome-feature:hover  {
        transform: none !important;
        box-shadow: none !important;
    }
    .fakultet-card:hover img    { transform: none !important; }
    .news-card-body .btn-news:hover { transform: none !important; }
    .nav-button:hover { transform: translateY(-50%) !important; }
    .tizim-nav:hover  { transform: translateY(-50%) !important; }
    .btn-rektor:hover { transform: none !important; }
    .all-link:hover   { transform: none !important; }
}

/* ============================================================
   24. LANDSCAPE TELEFON (balandligi kam, kengligi ko'p)
============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .coverflow-wrapper { height: 100vw; min-height: auto; }
    .section           { min-height: auto; padding: 60px 0; }
    .info h2           { font-size: 15px; }
    .coverflow-item    { width: 40vw; height: 27vw; }
    .coverflow         { height: 27vw; }
    .nav-button        { top: 52%; }
    .dots-container    { bottom: 8px; }
}

/* ============================================================
   25. KATTA EKRANLAR (1400px+) — kengaytirish
============================================================ */
@media (min-width: 1400px) {
    .container { max-width: 1340px; }
    .info h2   { font-size: 30px; }
    .coverflow-item { width: 620px; height: 400px; }
    .coverflow      { height: 400px; }
}

@media (min-width: 1600px) {
    .container      { max-width: 1500px; }
    .coverflow-item { width: 680px; height: 440px; }
    .coverflow      { height: 440px; }
}

/* ============================================================
   26. PRINT MEDIA
============================================================ */
@media print {
    .top-bar,
    .navbar,
    .holiday-marquee,
    #season-canvas,
    .to-top,
    .tizimlar-section,
    .nav-button,
    .dots-container { display: none !important; }

    body { background: #fff; color: #000; font-size: 12pt; }
    footer { background: #fff !important; color: #000; }
    a { color: #000; }
}


/* ================================================================
   ████████╗██╗   ██╗███╗   ██╗    ██████╗ ███████╗     ██╗ ██╗
      ██╔══╝██║   ██║████╗  ██║    ██╔══██╗██╔════╝     ██║ ██║
      ██║   ██║   ██║██╔██╗ ██║    ██████╔╝█████╗       ██║ ██║
      ██║   ██║   ██║██║╚██╗██║    ██╔══██╗██╔══╝       ╚═╝ ╚═╝
      ██║   ╚██████╔╝██║ ╚████║    ██║  ██║███████╗     ██╗ ██╗
      ╚═╝    ╚═════╝ ╚═╝  ╚═══╝    ╚═╝  ╚═╝╚══════╝     ╚═╝ ╚═╝
================================================================ */

/* CSS o'zgaruvchilar — kunduz */
:root {
    --dm-bg:       #ffffff;
    --dm-surface:  #f8f9fa;
    --dm-card:     #ffffff;
    --dm-border:   #e5efff;
    --dm-text:     #1a1a2e;
    --dm-muted:    #5f738c;
    --dm-blue:     #1566B7;
    --dm-blue-d:   #0d47a1;
    --dm-shadow:   rgba(21,102,183,0.15);
    --dm-toggle-icon: "☀️";
}

/* Tun — qo'lda .dark klassi body ga qo'shiladi */
body.dark {
    --dm-bg:       #0f1117;
    --dm-surface:  #141824;
    --dm-card:     #1a2035;
    --dm-border:   #243050;
    --dm-text:     #e2e8f8;
    --dm-muted:    #7a90b8;
    --dm-blue:     #4d9de0;
    --dm-blue-d:   #90caf9;
    --dm-shadow:   rgba(0,0,0,0.4);
    --dm-toggle-icon: "🌙";
    background: var(--dm-bg);
    color: var(--dm-text);
}

/* ---- TOP BAR ---- */
body.dark .top-bar {
    background: #080c16;
    border-bottom-color: rgba(255,255,255,0.05);
}

/* ---- NAVBAR ---- */
body.dark .navbar {
    background: #111827 !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
body.dark .dropdown-menu {
    background: #1a2035 !important;
    border-top-color: #4d9de0 !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5) !important;
}
body.dark .navbar .dropdown-menu h5 {
    color: #90caf9;
    border-bottom-color: #243050;
}
body.dark .navbar .dropdown-menu .dropdown-item { color: #c5d3ef; }
body.dark .navbar .dropdown-menu .dropdown-item:hover {
    background: #1e3050;
    color: #90caf9;
    padding-left: 20px;
}

/* ---- HERO / COVERFLOW ---- */
body.dark .section {
    background: linear-gradient(155deg, #0c1526 0%, #0f1a2c 55%, #0a1220 100%);
}
body.dark .section::before,
body.dark .section::after {
    background: radial-gradient(circle, rgba(77,157,224,0.08) 0%, transparent 70%);
}
body.dark .info h2      { color: #c5d8f5; }
body.dark .info-badge   { background: rgba(77,157,224,0.12); color: #90caf9; }
body.dark .nav-button   { background: rgba(26,32,53,0.9); color: #90caf9; }
body.dark .nav-button:hover { background: #1e88e5; color: #fff; }
body.dark .coverflow-item .cover { box-shadow: 0 8px 32px rgba(0,0,0,0.6); }
body.dark .coverflow-item .reflection::after {
    background: linear-gradient(to bottom, rgba(15,17,23,0.3) 0%, rgba(15,17,23,1) 100%);
}
body.dark .dot { background: rgba(144,202,249,0.15); }
body.dark .dot.active { background: #4d9de0; }

/* ---- SECTION HEADER ---- */
body.dark .section-header h3 { color: #90caf9; }
body.dark .section-header .header-line {
    background: linear-gradient(90deg, #4d9de0, transparent);
}
body.dark .header-underline { background: #FFD54F; }

/* ---- NEWS / ELON CARDS ---- */
body.dark .home-section         { background: var(--dm-bg) !important; }
body.dark #elonlar              { background: var(--dm-surface) !important; }
body.dark .news-card            { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .news-card:hover      { box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
body.dark .news-card-body h5    { color: #e2e8f8; }
body.dark .news-card-body p     { color: var(--dm-muted); }
body.dark .news-card-body .btn-news     { background: #1e6fb5; }
body.dark .news-card-body .btn-news:hover { background: #155ea0; }
body.dark .all-link             { color: #90caf9; border-color: #4d9de0; }
body.dark .all-link:hover       { background: #1e6fb5; color: #fff; border-color: #1e6fb5; }

/* ---- TIZIMLAR ---- */
body.dark .tizimlar-section {
    background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
}
body.dark .tizim-card           { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .tizim-card:hover     { box-shadow: 0 12px 32px rgba(0,0,0,0.45); }
body.dark .tizim-card h6        { color: #c5d3ef; }
body.dark .tizim-nav            { background: #1e6fb5; }
body.dark .tizim-nav:disabled   { background: #243050; color: #4a5a7a; }
body.dark .tizim-dot            { background: #243050; }
body.dark .tizim-dot.active     { background: #4d9de0; }

/* ---- FAKULTETLAR ---- */
body.dark #fakultetlar          { background: var(--dm-bg); }
body.dark .fakultet-card .overlay {
    background: linear-gradient(to top, rgba(5,8,18,0.92) 0%, transparent 60%);
}

/* ---- STATISTIKA ---- */
body.dark .stats-section {
    background: linear-gradient(135deg, #090e1d 0%, #0c1628 60%, #0f1e38 100%);
}

/* ---- REKTOR ---- */
body.dark .rektor-section {
    background: linear-gradient(135deg, #0f1a2c 0%, #0d1525 100%);
}
body.dark .rektor-card          { background: var(--dm-card); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
body.dark .rektor-card .rektor-left .badge-label {
    background: rgba(77,157,224,0.12);
    color: #90caf9;
}
body.dark .rektor-card .rektor-left h3 { color: #90caf9; }
body.dark .rektor-card .rektor-left p  { color: var(--dm-muted); }
body.dark .btn-rektor           { background: #1e6fb5; }
body.dark .btn-rektor:hover     { background: #155ea0; }

/* ---- BANNER ---- */
body.dark .info-banner {
    background: linear-gradient(135deg, #090e1d 0%, #0c1830 100%);
    border: 1px solid var(--dm-border);
}

/* ---- FOYDALI XAVOLALAR ---- */
body.dark .xavola-section       { background: var(--dm-surface); }
body.dark .xavola-scroll-outer::before {
    background: linear-gradient(to right, var(--dm-surface), transparent);
}
body.dark .xavola-scroll-outer::after {
    background: linear-gradient(to left, var(--dm-surface), transparent);
}
body.dark .xavola-logo-card     { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .xavola-logo-card:hover {
    border-color: #4d9de0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}
body.dark .xavola-logo-card span { color: #c5d3ef; }
body.dark .xavola-fallback      { background: linear-gradient(135deg, #1e6fb5, #155ea0); }

/* ---- WELCOME ---- */
body.dark .welcome-section      { background: var(--dm-bg); }
body.dark .welcome-section h2   { color: #90caf9; }
body.dark .welcome-section .subtitle { color: var(--dm-muted); }
body.dark .welcome-badge        { background: rgba(77,157,224,0.12); color: #90caf9; }
body.dark .welcome-feature      { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .welcome-feature:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.45); }
body.dark .welcome-feature h5   { color: #90caf9; }
body.dark .welcome-feature p    { color: var(--dm-muted); }

/* ---- FOOTER ---- */
body.dark footer { background: #080c16 !important; }
body.dark footer hr { border-color: rgba(255,255,255,0.07); }

/* ---- TO-TOP ---- */
/*body.dark .to-top { background: #1e3050; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }*/
.dark-toggle-topbar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.25s, transform 0.2s;
}
.dark-toggle-topbar:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.1);
}
body.dark .dark-toggle-topbar {
    background: rgba(77, 157, 224, 0.2);
    border-color: rgba(77, 157, 224, 0.4);
    color: #90caf9;
}

@media (max-width: 480px) {
    .dark-toggle-topbar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}
body.dark .to-top {
    background: #1e3050;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
body.dark .to-top:hover {
    background: #243a62;
}
/* ============================================================
   DARK MODE — PAGES (yangiliklar, elonlar, detail sahifalar)
============================================================ */

/* Page header — dark da to'qroq */
body.dark .page-header {
    background: linear-gradient(135deg, #060d1f 0%, #0c1830 100%);
}

/* Content card / article wrapper */
body.dark .content-card,
body.dark .article-wrapper {
    background: var(--dm-card);
    border-color: var(--dm-border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* Article text */
body.dark .article-body,
body.dark .article-content  { color: #cdd6f0; }
body.dark .article-title    { color: #90caf9; }
body.dark .article-divider,
body.dark .section-divider  { border-color: var(--dm-border); }

/* Meta bar */
body.dark .meta-bar         { border-bottom-color: var(--dm-border); }
body.dark .meta-item        { color: var(--dm-muted); }

/* Back button */
body.dark .back-btn {
    background: #1a2035;
    color: #90caf9;
    border-color: var(--dm-border);
}
body.dark .back-btn:hover {
    background: #1e6fb5;
    color: #fff;
    border-color: #1e6fb5;
}

/* News card (yangiliklar.html) */
body.dark .news-card        { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .news-card:hover  { box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
body.dark .news-card-title  { color: #e2e8f8; }
body.dark .news-card-date   { color: #4d9de0; }
body.dark .batafsil-btn     { background: #1e6fb5; }
body.dark .batafsil-btn:hover { background: #155ea0; }

/* Elon card */
body.dark .elon-card        { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .elon-card:hover  { box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
body.dark .elon-card-title  { color: #e2e8f8; }
body.dark .elon-card-date   { color: #4d9de0; }

/* Sidebar */
body.dark .sidebar-title    { color: #90caf9; border-bottom-color: #4d9de0; }
body.dark .sidebar-card     { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .sidebar-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
body.dark .sidebar-card-title { color: #e2e8f8; }
body.dark .sidebar-card-meta  { color: var(--dm-muted); }

/* Side card (yangilik detail) */
body.dark .side-card        { background: var(--dm-card); border-color: var(--dm-border); }
body.dark .side-card:hover  { background: #1a2035; border-color: #4d9de0; }
body.dark .side-card-title  { color: #e2e8f8; }
body.dark .side-card-date,
body.dark .side-card-views  { color: var(--dm-muted); }

/* Pagination */
body.dark .pagination .page-link {
    background: var(--dm-card);
    border-color: var(--dm-border);
    color: #90caf9;
}
body.dark .pagination .page-link:hover {
    background: #1e6fb5;
    color: #fff;
    border-color: #1e6fb5;
}
body.dark .pagination .page-item.active .page-link {
    background: #1e6fb5;
    border-color: #1e6fb5;
    color: #fff;
}
body.dark .pagination .page-item.disabled .page-link { opacity: 0.3; }

/* ============================================================
   Sensorli ekranlar (telefon, planshet): bosiladigan joylar kamida ~32-44 px bo'lsin
============================================================ */
@media (pointer: coarse) {
    .top-bar-langs a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 40px; padding: 2px 10px; }
    .top-bar-socials a { width: 34px; height: 34px; }
    .dark-toggle-topbar { min-width: 34px; min-height: 34px; }
    .state-symbol-btn { min-height: 34px; }
    .breadcrumb-item a, [class*="contact-row"] a, [class*="contact-val"] { display: inline-block; padding: 8px 2px; }
    .page-link, .pagination .page-link { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
}

/* Telefon/planshet: fasl belgisi sarlavhani siqmasin va menyu tugmasi ikkinchi qatorga tushib qolmasin */
@media (max-width: 991px) {
    .navbar-brand .season-badge { display: none !important; }
    .navbar > .container { flex-wrap: nowrap; }
    .navbar-brand { min-width: 0; flex: 1 1 auto; }
    .navbar-toggler { flex: none; margin-left: 8px; }
}

/* 4 ta til (UZ QQ RU EN): tor telefonda tun/kunduz tugmasi yangi qatorga tushmasin */
@media (max-width: 430px) {
    .top-bar-langs { gap: 0; }
    .top-bar-langs a { min-width: 29px; padding: 2px 4px; }
}
