        :root {
            --nav-color: #ffffff;
            --nav-hover-color: var(--uzmmsi-gold);
            --nav-scrolled-color: var(--uzmmsi-heading);
            --nav-scrolled-hover: var(--uzmmsi-navy);
            --nav-font: "Manrope", sans-serif;
            --logo-font: "Manrope", sans-serif;
        }

        /* --- HEADER STYLES --- */
        /* Yuqorida menyu rasm ustida shaffof: qorong'i tutashuv oq yozuvni
           o'qiladigan qiladi, pastga tomon rasmning o'zi ko'rinadi.
           Scroll qilinganda .sticked oq fonni qaytaradi. */
        .header {
            transition: all 0.5s;
            z-index: 997;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
        }

        .header .branding {
            padding: 20px 0;
            transition: all 0.5s;
        }

        .header.sticked {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
        }

        .header.sticked .branding {
            padding: 12px 0;
        }

        /* --- TOPBAR STYLES --- */
        .topbar {
            background-color: var(--uzmmsi-ink);
            color: rgba(255, 255, 255, 0.88);
            font-size: 0.8125rem;
            padding: 8px 0;
            transition: all 0.3s;
            box-shadow: inset 0 -2px 0 var(--uzmmsi-gold);
        }

        .header.sticked .topbar {
            background-color: var(--uzmmsi-ink);
        }


        .topbar a {
            color: rgba(255, 255, 255, 0.88);
            text-decoration: none;
            transition: 0.3s;
        }

        .topbar a:hover {
            color: var(--uzmmsi-gold);
            opacity: 1;
        }

        /* Chap tomon siqilishi mumkin (kontakt matnlari kerak bo'lsa kesiladi),
           o'ng tomon esa siqilmaydi — tugmalar va ikonkalar buzilmasligi uchun.
           Ilgari ikkalasi ham flex-shrink:0 edi va planshetda (768-991px) o'ng
           blok konteynerdan tashqariga chiqib ketardi. */
        .topbar-left, .topbar-right {
            display: flex;
            align-items: center;
            flex-wrap: nowrap;
            min-width: 0;
        }

        .topbar-left {
            flex: 1 1 auto;
            overflow: hidden;
        }

        .topbar-right {
            flex: 0 0 auto;
        }

        .topbar-item {
            display: flex;
            align-items: center;
            margin-right: 20px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .topbar-item:last-child {
            margin-right: 0;
        }

        .topbar-item i {
            margin-right: 6px;
            font-size: 0.875rem;
        }

        .topbar-socials a {
            width: 26px;
            height: 26px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.12);
            border-radius: 50%;
            margin-left: 8px;
            padding: 0;
        }
        
        .topbar-socials a i {
            margin-right: 0;
        }

        .topbar-socials a:hover {
            background: var(--uzmmsi-gold);
            color: var(--uzmmsi-ink);
        }

        /* --- Logo --- */
        .header .logo h1,
        .header .logo .sitename {
            display: block;
            font-size: clamp(1.25rem, 4vw, 1.75rem);
            margin: 0;
            font-weight: 700;
            font-family: var(--logo-font);
            color: var(--nav-color);
            letter-spacing: 1px;
            white-space: nowrap;
            transition: 0.3s;
        }

        .header.sticked .logo h1,
        .header.sticked .logo .sitename {
            color: var(--nav-scrolled-color);
        }
        
        .logo img {
            max-height: 50px;
            margin-right: 10px;
        }
        
        @media (max-width: 575px) {
            .logo img { max-height: 40px; margin-right: 8px; }
        }

        /* Navbar emblemi: main.css dagi ".header .logo img { max-height: 32px }"
           aniqroq bo'lgani uchun yuqoridagi qoida ishlamay, belgi 32px qolardi
           (asl rasm 256px — kattalashtirish sifatni buzmaydi). */
        .header .logo img {
            max-height: 54px;
            margin-right: 10px;
        }

        .header.sticked .logo img {
            max-height: 46px;
        }

        @media (max-width: 575px) {
            .header .logo img { max-height: 44px; margin-right: 8px; }
            .header.sticked .logo img { max-height: 40px; }
        }

        /* --- Desktop Navigation --- */
        .navmenu {
            margin-left: auto;
            margin-right: 20px;
        }

        .navmenu ul {
            margin: 0;
            padding: 0;
            display: flex;
            list-style: none;
            align-items: center;
        }

        .navmenu li {
            position: relative;
        }

        .navmenu a, .navmenu a:focus {
            color: var(--nav-color);
            padding: 10px 15px;
            font-family: var(--nav-font);
            font-size: 0.9375rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: space-between;
            white-space: nowrap;
            transition: 0.3s;
            text-decoration: none;
            position: relative;
        }

        .navmenu > ul > li > a::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 5px;
            width: 0;
            height: 2px;
            background: var(--nav-hover-color);
            transition: all 0.3s ease-in-out;
            transform: translateX(-50%);
        }

        /* 1200–1399px: 8 band + kattaroq logotip (ayniqsa ruscha nomlar) sig'ishi uchun */
        @media (min-width: 1200px) and (max-width: 1399.98px) {
            #navmenu > ul > li > a {
                padding-left: 10px;
                padding-right: 10px;
            }
        }

        /* Logotip va menyu hech qachon yopishmasin */
        .header .logo {
            margin-right: 1rem;
        }

        .navmenu > ul > li > a:hover::after,
        .navmenu > ul > li > a.active::after {
            width: 70%;
        }

        .navmenu a:hover, .navmenu .active, .navmenu .active:focus {
            color: var(--nav-hover-color);
        }

        /* Desktop Dropdown Icon — matnga yaqin, ixcham strelka */
        .navmenu .toggle-dropdown {
            font-size: 0.7rem;
            line-height: 1;
            margin-left: 0.4rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.25s ease;
            cursor: pointer;
        }

        .navmenu .dropdown:hover > a .toggle-dropdown {
            transform: rotate(180deg);
        }

        /* Kompyuterda menyu faqat matn: 6 ta qisqa band uchun ikonka vizual
           shovqin. Ikonkalar mobil menyuda (.mobile-nav-wrapper) qoladi. */
        #navmenu .nav-icon {
            display: none;
        }

        /* --- Desktop dropdown / mega-menyu ---
           Mobil menyu xuddi shu MenuWidget HTML'idan chiziladi, shuning uchun
           hamma qoida #navmenu ga bog'langan; mobil akkordeon (.mobile-nav-wrapper)
           o'zgarmaydi. main.css dagi shablon qoidalari (.navmenu .dropdown ul ...)
           ID tanlovchisi orqali ustiga yoziladi. */
        @media (min-width: 1200px) {
            /* Oddiy (5 tagacha bandli) dropdown — bandning ostida, ixcham */
            #navmenu > ul > li > .dropdown-menu {
                display: block;
                position: absolute;
                top: 100%;
                left: 0;
                right: auto;
                min-width: 260px;
                margin: 0;
                padding: 0.5rem;
                background: var(--uzmmsi-surface);
                border: 0;
                /* Sticky (oq) headerdan ajratib turadigan ingichka neytral chiziq */
                border-top: 1px solid var(--uzmmsi-line);
                border-radius: 0 0 12px 12px;
                box-shadow: 0 24px 48px -16px rgba(18, 26, 61, 0.35);
                opacity: 0;
                visibility: hidden;
                /* Yopiq panel (va uning ichidagi ro'yxatlar) sichqonchani ushlamaydi:
                   aks holda ko'rinmas panel banner ustida turib o'z bo'limini ochib yuboradi */
                pointer-events: none;
                transform: translateY(8px);
                /* Yopilishda kichik kechikish: sichqoncha bir zum chetga chiqsa panel o'chib qolmaydi */
                transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
            }

            /* Ko'p bandli (MenuWidget: 6+ band) bo'limlar — header kengligidagi mega-panel.
               Ichki guruhlar (3-daraja) flyout emas, sarlavhali ustun bo'lib ochiq turadi. */
            #navmenu > ul > li.dropdown:has(> .multi-column, > .multi-column-3) {
                position: static;
            }

            #navmenu > ul > li > .dropdown-menu:is(.multi-column, .multi-column-3) {
                left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
                right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
                columns: 4 210px;
                column-gap: 2rem;
                padding: 1.75rem 2rem 1.5rem;
            }

            /* Bo'lim nomidan panelgacha bo'shliq ustidan "ko'prik" — faqat shu bandning
               ostida (panel kengligida bo'lsa qo'shni bandlarni yopib qo'yadi) */
            #navmenu > ul > li.dropdown > a::before {
                content: "";
                position: absolute;
                left: 0;
                right: 0;
                top: 100%;
                height: 16px;
            }

            #navmenu > ul > li.dropdown:hover > .dropdown-menu,
            #navmenu > ul > li.dropdown:focus-within > .dropdown-menu {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
                transform: none;
                transition-delay: 0s;
            }

            /* Panel ochiq turganda bo'lim nomi ajralib turadi */
            #navmenu > ul > li.dropdown:hover > a,
            #navmenu > ul > li.dropdown:focus-within > a {
                color: var(--nav-hover-color);
            }

            #navmenu > ul > li.dropdown:hover > a::after,
            #navmenu > ul > li.dropdown:focus-within > a::after {
                width: 70%;
            }

            #navmenu .dropdown-menu li {
                min-width: 0;
                break-inside: avoid;
            }

            #navmenu .dropdown-menu a {
                justify-content: flex-start;
                padding: 0.5rem 0.75rem;
                border-radius: 8px;
                color: var(--uzmmsi-heading);
                font-size: 0.9375rem;
                font-weight: 500;
                line-height: 1.35;
                white-space: normal;
                transition: background-color 0.15s ease, color 0.15s ease;
            }

            #navmenu .dropdown-menu a:hover,
            #navmenu .dropdown-menu a:focus-visible,
            #navmenu .dropdown-menu a.active {
                background: var(--uzmmsi-accent-soft);
                color: var(--uzmmsi-accent);
            }

            #navmenu .dropdown-menu a::after {
                display: none;
            }

            /* Guruh (masalan "Tuzilma"): kichik bosh harfli sarlavha + ostida ro'yxat */
            #navmenu .dropdown-menu > li.dropdown {
                margin: 0.5rem 0 0.75rem;
            }

            #navmenu .dropdown-menu > li.dropdown > a {
                padding-top: 0.375rem;
                padding-bottom: 0.375rem;
                color: var(--uzmmsi-text-muted);
                font-size: 0.75rem;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }

            /* Sarlavha fon bilan bo'yalmaydi — faqat rang (fon bandlar uchun) */
            #navmenu .dropdown-menu > li.dropdown > a:hover,
            #navmenu .dropdown-menu > li.dropdown > a:focus-visible,
            #navmenu .dropdown-menu > li.dropdown > a.active {
                background: transparent;
                color: var(--uzmmsi-accent);
            }

            #navmenu .dropdown-menu > li.dropdown > a .toggle-dropdown {
                display: none;
            }

            #navmenu .dropdown-menu .dropdown-menu {
                display: block;
                position: static;
                min-width: 0;
                margin: 0.125rem 0 0 0.75rem;
                padding: 0 0 0 0.5rem;
                background: transparent;
                border: 0;
                border-left: 1px solid var(--uzmmsi-line);
                border-radius: 0;
                box-shadow: none;
                opacity: 1;
                /* "visible" emas: yopiq panel ichida ko'rinmas holda sichqonchani ushlab qolardi */
                visibility: inherit;
                pointer-events: inherit;
                transform: none;
                transition: none;
                columns: auto;
            }

            #navmenu .dropdown-menu .dropdown-menu a {
                padding-top: 0.375rem;
                padding-bottom: 0.375rem;
                color: var(--uzmmsi-text);
                font-size: 0.875rem;
                font-weight: 400;
            }
        }
        
        .navmenu .toggle-dropdown::before {
            vertical-align: middle;
        }

        /* Sticked Header Colors */
        .header.sticked .navmenu a { color: var(--nav-scrolled-color); }
        .header.sticked .navmenu a:hover, .header.sticked .navmenu .active { color: var(--nav-scrolled-hover); }
        .header.sticked .navmenu > ul > li > a::after { background: var(--nav-scrolled-hover); }

        /* --- Language Switcher --- */
        .language-switcher-mobile .dropdown-toggle {
            border: 1px solid var(--uzmmsi-line);
            border-radius: 20px;
            padding: 5px 12px;
            font-size: 0.875rem;
            background: transparent;
            color: var(--uzmmsi-heading);
            transition: all 0.3s;
        }

        .header.sticked .language-switcher-mobile .dropdown-toggle {
            border-color: #e0e0e0;
            background: white;
            color: #333;
        }

        /* Topbar Language Switcher */
        .topbar .language-switcher-header .dropdown-toggle {
            border: none;
            padding: 0;
            font-size: 0.8125rem;
            background: transparent;
            color: rgba(255, 255, 255, 0.9);
            transition: all 0.3s;
        }

        .topbar .language-switcher-header .dropdown-toggle:hover {
            color: var(--uzmmsi-gold);
        }

        .topbar .language-switcher-header .dropdown-menu a {
            color: #333 !important;
        }
        
        .topbar .language-switcher-header .dropdown-menu a:hover {
            color: var(--uzmmsi-navy) !important;
            background-color: var(--uzmmsi-navy-soft);
        }

        /* --- Mobile Nav Toggle Button (In Header) --- */
        .mobile-nav-toggle-btn {
            color: var(--nav-color);
            font-size: 1.75rem;
            cursor: pointer;
            line-height: 0;
            transition: 0.5s;
            margin-left: 0;
            margin-right: 8px;
            padding: 6px 10px;
            border-radius: 6px;
            z-index: 999;
        }
        
        .mobile-nav-toggle-btn:hover {
            background-color: var(--uzmmsi-navy-soft);
        }

        .header.sticked .mobile-nav-toggle-btn {
            color: var(--nav-scrolled-color);
        }
        
        .header.sticked .mobile-nav-toggle-btn:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* Desktop menyu faqat 1200px dan boshlab ko'rsatiladi.
           Markup da `d-none d-lg-flex` bor — u Bootstrap ning lg (992px)
           nuqtasida menyuni yoqadi, lekin menyu bandlari keng (~870px) va
           logotip bilan birga 992px ga sig'may, o'ngga chiqib ketardi.
           `.navmenu` va `.d-lg-flex` bir xil xususiyatga (0,1,0) ega,
           Bootstrap esa keyin yuklangani uchun g'olib chiqardi — shuning
           uchun bu yerda `!important` kerak. */
        /* Burger tugmasi desktop menyu yo'q bo'lgan hamma joyda ko'rinadi.
           Ikkalasi bir xil chegarani (1200px) ishlatadi — aks holda
           992-1199px oralig'ida umuman navigatsiya qolmaydi. */
        .mobile-nav-toggle-wrap {
            display: none;
        }

        @media (max-width: 1199.98px) {
            .mobile-nav-toggle-wrap {
                display: flex;
            }
            .mobile-nav-toggle-btn {
                display: block;
            }
            /* Hide desktop nav */
            .navmenu {
                display: none !important;
            }
        }

        /* --- MOBILE OFFCANVAS MENU (New) --- */
        .mobile-nav-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease-in-out;
            backdrop-filter: blur(4px);
        }

        .mobile-nav-wrapper {
            position: fixed;
            top: 0;
            right: -320px; /* Start off-screen */
            width: 320px;
            height: 100vh;
            background: #fff;
            z-index: 9999; /* Highest Z-Index */
            transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
            box-shadow: -5px 0 20px rgba(0,0,0,0.1);
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        /* Active State */
        body.mobile-nav-active {
            overflow: hidden; /* Prevent scrolling */
        }

        body.mobile-nav-active .mobile-nav-overlay {
            opacity: 1;
            visibility: visible;
        }

        body.mobile-nav-active .mobile-nav-wrapper {
            right: 0;
        }

        /* Mobile Menu Header */
        .mobile-nav-header {
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
        }

        .mobile-nav-header .logo-text {
            font-family: var(--logo-font);
            font-weight: 700;
            font-size: 1.5rem;
            color: #333;
        }

        .mobile-nav-close {
            font-size: 1.5rem;
            color: #666;
            cursor: pointer;
            transition: 0.3s;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }

        .mobile-nav-close:hover {
            color: #dc3545;
            background: #fff0f0;
        }

        /* Mobile Menu Items */
        .mobile-nav-wrapper ul {
            list-style: none;
            padding: 0;
            margin: 0;
            width: 100%;
        }

        .mobile-nav-wrapper li {
            width: 100%;
            border-bottom: 1px solid #f5f5f5;
        }

        /* Ikonka | matn | (strelka o'ngda) — matn har doim chapda. */
        .mobile-nav-wrapper a {
            display: flex;
            justify-content: flex-start;
            gap: 0.85rem;
            align-items: center;
            padding: 15px 20px;
            color: #333;
            font-family: var(--nav-font);
            font-size: 1rem;
            text-decoration: none;
            transition: 0.3s;
        }

        .mobile-nav-wrapper a:hover, .mobile-nav-wrapper .active > a {
            color: var(--nav-hover-color);
            background: #f9f9f9;
        }

        /* Joriy sahifa va u turgan bo'lim (layout.js belgilaydi) */
        .mobile-nav-wrapper a.active,
        .mobile-nav-wrapper .dropdown ul li a.active {
            color: var(--uzmmsi-accent);
            font-weight: 600;
        }

        /* 3-daraja (masalan Tuzilma → Kafedralar) 2-darajadan ichkariroq */
        .mobile-nav-wrapper .dropdown ul ul li a {
            padding-left: calc(20px + 1.25rem + 0.85rem + 1rem);
            font-size: 0.8125rem;
        }

        .mobile-nav-wrapper .nav-icon {
            flex: 0 0 1.25rem;
            text-align: center;
            font-size: 1.05rem;
            color: var(--uzmmsi-accent);
        }

        .mobile-nav-wrapper .toggle-dropdown {
            margin-left: auto;
            flex-shrink: 0;
            font-size: 0.875rem;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f0f0f0;
            border-radius: 50%;
        }

        /* Dropdown in Mobile - Smooth Accordion Animation */
        .mobile-nav-wrapper .dropdown ul {
            max-height: 0;
            overflow: hidden;
            background: #f8f9fa;
            padding-left: 0;
            position: static !important; /* Force static to push contents below down */
            width: 100% !important;
            opacity: 0;
            visibility: hidden;
            border: none;
            box-shadow: none;
            margin: 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            display: block !important; /* Always block, use max-height for toggling */
        }
        
        /* Ichki bandlar ota band matni bilan bir chiziqda (20px + ikonka + oraliq). */
        .mobile-nav-wrapper .dropdown ul li a {
            padding-left: calc(20px + 1.25rem + 0.85rem);
            font-size: 0.875rem;
            color: #555;
            border-bottom: 1px solid #eee;
        }

        .mobile-nav-wrapper .dropdown.active > ul,
        .mobile-nav-wrapper .dropdown.dropdown-active > ul {
            max-height: 1500px; /* Large enough to fit any sub-menu */
            opacity: 1;
            visibility: visible;
            padding-top: 5px;
            padding-bottom: 5px;
        }

        /* Chevron Animation */
        .mobile-nav-wrapper .toggle-dropdown {
            transition: all 0.3s ease;
        }

        .mobile-nav-wrapper .dropdown.active > a .toggle-dropdown,
        .mobile-nav-wrapper .dropdown.dropdown-active > a .toggle-dropdown {
            transform: rotate(180deg);
            background: var(--nav-hover-color) !important;
            color: #fff !important;
        }

        /* --- Footer Styles (Minimal changes) --- */
        /* Girih har sahifaning yakuniy "ramkasi": statistika bilan bir xil xiralik. */
        .footer { background: var(--uzmmsi-ink) var(--uzmmsi-girih) center / 80px 80px; color: #fff; font-size: 0.875rem; position: relative; border-top: 2px solid var(--uzmmsi-gold); }
        /*.footer-wave { position: absolute; top: -50px; left: 0; width: 100%; height: 50px; background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23212529" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat center/cover; z-index: 1; }*/
        
        .footer a { color: rgba(255,255,255,0.8); text-decoration: none; transition: 0.3s; }
        .footer a:hover { color: var(--uzmmsi-gold); }

        .footer .logo .sitename,
        .footer .copyright strong {
            color: var(--uzmmsi-gold) !important;
        }

        .footer .text-success {
            color: var(--uzmmsi-gold) !important;
        }
        
        /* Faqat vertikal padding: .container ning yon padding'i qolishi kerak,
           aks holda .row ning manfiy gutter'i ekrandan 12px chiqib ketadi. */
        .footer-top { padding-top: 60px; padding-bottom: 30px; }
        
        .footer h4 { 
            color: var(--uzmmsi-gold);
            font-size: 1rem;
            font-weight: bold; 
            padding-bottom: 12px; 
            margin-bottom: 15px; 
            position: relative; 
        }
        
        .footer h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 20px; height: 2px; background: var(--uzmmsi-gold); }
        
        /* Footer Links Specific Fix */
        .footer .footer-links ul li a,
        .footer .footer-links a { 
            color: rgba(255, 255, 255, 0.85) !important; 
            transition: 0.3s;
            display: inline-block;
        }
        
        .footer .footer-links ul li a:hover,
        .footer .footer-links a:hover { 
            color: var(--uzmmsi-gold) !important;
            padding-left: 5px;
        }
        
        .footer .social-links a { display: flex !important; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; margin-right: 10px; color: rgba(255,255,255,0.8) !important; padding: 0 !important; }
        .footer .social-links a:hover { background: var(--uzmmsi-gold) !important; border-color: var(--uzmmsi-gold) !important; color: var(--uzmmsi-ink) !important; padding: 0 !important; }
        
        .copyright { padding: 25px 0; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }

        /* Responsive Footer */
        @media (max-width: 768px) {
            .footer .footer-about, 
            .footer .footer-links, 
            .footer .footer-contact {
                text-align: center;
                margin-bottom: 2rem;
            }
            
            .footer .social-links {
                justify-content: center;
                margin-top: 1.5rem;
            }
            
            .footer h4 {
                margin-top: 0.5rem;
            }
            
            /* Center the underline for headings */
            .footer h4::after {
                left: 50%;
                transform: translateX(-50%);
            }
            
            .footer .logo {
                justify-content: center;
            }
            
            .footer .footer-links ul li {
                justify-content: center;
            }
        }
        /* Prevent horizontal overflow globally */
        html, body {
            overflow-x: hidden;
            width: 100%;
            position: relative;
        }

        .topbar {
            overflow-x: clip; /* clips horizontal but allows absolute children to overflow vertically */
        }

        /* ─────────────────────────────────────────────────────────────
           TOPBAR — responsive

           Muammo: 768-991px (planshet) oralig'ida Bootstrap ning
           `d-md-flex` klassi telefon va e-mail ni qaytadan ko'rsatadi
           (+248px), o'ng tomonda esa "Imkoniyatlar" + til + 4 ta ijtimoiy
           ikonka (456px) turadi. Ikkala blok ham flex-shrink:0 bo'lgani
           uchun o'ng tomon konteynerdan o'ngga chiqib ketardi.

           Yechim: joy tor bo'lgan oraliqda eng kam ahamiyatli elementlarni
           bosqichma-bosqich yashirish — shunda hamma narsa haqiqatan
           sig'adi, kesilmaydi.
           ───────────────────────────────────────────────────────────── */

        /* Planshet (768-991px) — ijtimoiy tarmoqlar footer da ham bor,
           shuning uchun topbar dan olib turamiz. */
        @media (min-width: 768px) and (max-width: 991.98px) {
            .topbar-item {
                margin-right: 12px;
            }
            .topbar-socials {
                display: none !important;
            }
        }

        /* Tor planshet (768-860px) — e-mail ni ham olib turamiz,
           telefon raqami muhimroq. */
        @media (min-width: 768px) and (max-width: 860px) {
            .topbar-item-email {
                display: none !important;
            }
        }

        /* Manzil: Bootstrap `d-lg-flex` uni 992px da yoqadi, lekin matn uzun —
           u faqat 1400px+ (konteyner 1320px) da haqiqatan sig'adi. 1200-1399px
           (1280/1366 noutbuklar, konteyner 1140px) da so'z o'rtasida kesilib,
           "Imkoniyatlar" tugmasi ostiga kirardi. Manzil footer va Aloqa'da bor. */
        @media (max-width: 1399.98px) {
            .topbar-item-address {
                display: none !important;
            }
        }

        @media (max-width: 767.98px) {
            .topbar {
                padding: 4px 0;
            }
            .topbar-item {
                margin-right: 8px;
            }
            .topbar-socials a {
                margin-left: 4px;
                width: 22px;
                height: 22px;
            }
        }

        @media (max-width: 480px) {
            .topbar-item {
                margin-right: 6px;
                font-size: 0.6875rem;
            }
            .topbar .language-switcher-header .dropdown-toggle {
                font-size: 0.6875rem;
            }
            /* Kichik ekranlarda social ikonkalarning gap ini kamaytirish */
            .topbar-socials a {
                margin-left: 3px;
                width: 20px;
                height: 20px;
                font-size: 0.625rem;
            }
        }

        @media (max-width: 360px) {
            /* Juda kichik ekranlarda social ikonkalarni yashirish */
            .topbar-socials {
                display: none !important;
            }
        }

        /* ===== GLOBAL SECTION SPACING ===== */
        .section {
            padding-top: 80px;
            padding-bottom: 80px;
        }

        @media (max-width: 991px) {
            .section {
                padding-top: 60px;
                padding-bottom: 60px;
            }
        }

        @media (max-width: 576px) {
            .section {
                padding-top: 48px;
                padding-bottom: 48px;
            }
        }
        /* =================================== */

        /* ===== GLOBAL SECTION TITLE ===== */
        .section-title {
            text-align: center;
            margin-bottom: 3rem;
        }

        .section-title h2 {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            font-size: clamp(1.4rem, 3vw, 2.2rem);
            font-weight: 700;
            color: var(--uzmmsi-heading);
            white-space: normal;
            word-break: break-word;
        }

        .section-title h2::before,
        .section-title h2::after {
            content: '';
            flex: 0 0 40px;
            height: 3px;
            background: var(--uzmmsi-gold);
            border-radius: 2px;
            align-self: center;
        }

        @media (max-width: 576px) {
            .section-title h2 {
                font-size: clamp(1.1rem, 5vw, 1.4rem);
                gap: 0.5rem;
            }
            .section-title h2::before,
            .section-title h2::after {
                flex: 0 0 24px;
            }
        }
        /* ================================ */

/* ==========================================================================
   MOBILE APP-LIKE STICKY BOTTOM BAR
   The markup lives in layouts/main.php, so these styles must load on every
   page. They previously sat in home.css, which is registered only by
   site/index.php — on every other page the bar rendered as an unstyled
   list at the bottom of the document.
   ========================================================================== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-bottom-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 600;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-bottom-item a i {
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-bottom-item a.active,
.mobile-bottom-item a:hover {
    color: var(--uzmmsi-navy);
}

.mobile-bottom-item a:focus-visible {
    outline: 2px solid var(--uzmmsi-navy);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .mobile-bottom-bar {
        display: block;
    }

    body {
        padding-bottom: 65px; /* room for the fixed bar */
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-item a {
        transition: none !important;
    }
}

/* Scroll-to-top must clear the fixed bottom bar.
   Its own rule (main.css) pins it to bottom:15px with z-index 99999, so on
   phones it landed on top of the last nav item ("Aloqa") and swallowed the
   tap. Lift it above the bar and keep it under the bar in stacking order. */
@media (max-width: 767.98px) {
    .scroll-top {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        z-index: 1030; /* below .mobile-bottom-bar (1040) */
    }
}

/* ─────────────────────────────────────────────────────────────
   PAGINATION — responsive
   news / events / announcement / gallery / specialty sahifalarida umumiy.

   Muammo: 138 yangilik = 12 sahifa; telefonda tugmalar qatori ekranga
   sig'may gorizontal scroll hosil qilardi.

   Yechim ikki qismdan iborat:
     1) CSS — o'rash (flex-wrap), barmoqqa qulay o'lcham, kichik padding
     2) Telefonda tugma o'lchami kichrayadi (38px, 360px dan kichikda 34px)
        va PHP tomonda LinkPager::$maxButtonCount 5 ga tushiriladi
        (frontend/views/.../index.php). Raqamlar YASHIRILMAYDI —
        foydalanuvchi qo'shni sahifalarga bir bosishda o'tishi kerak.
   ───────────────────────────────────────────────────────────── */
.pagination {
    flex-wrap: wrap;            /* sig'masa keyingi qatorga o'tsin */
    gap: 0.25rem;
    margin-bottom: 0;
    padding-left: 0;
}

.pagination .page-item {
    margin: 0;                  /* gap ishlatilgani uchun */
}

/* Desktop o'lchami — sahifa viewlaridan (news/events/...) bu yerga
   ko'chirildi, chunki u yerdagi inline CSS layout.css dan keyin
   yuklanib responsive qoidalarni bekor qilardi. */
.pagination .page-link {
    padding: 0.6rem 1rem;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Planshet */
@media (max-width: 991.98px) {
    .pagination .page-link {
        padding: 0.5rem 0.85rem;
        margin: 0;
        font-size: 0.95rem;
    }
}

/* Telefon — tugmalar kichrayadi, HAMMASI ko'rinadi.
   Raqamlarni yashirmaymiz: foydalanuvchi qo'shni sahifalarga
   bir bosishda o'ta olishi kerak. Sig'masa flex-wrap ikkinchi
   qatorga tushiradi. */
@media (max-width: 575.98px) {
    .pagination {
        gap: 0.3rem;
        justify-content: center;
    }

    .pagination .page-link {
        min-width: 36px;
        min-height: 36px;
        padding: 0.35rem 0.4rem;
        margin: 0;
        font-size: 0.85rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Joriy sahifa ajralib tursin */
    .pagination .page-item.active .page-link {
        font-weight: 700;
    }
}

/* Juda kichik ekran (320-360px) */
@media (max-width: 360px) {
    .pagination {
        gap: 0.2rem;
    }

    .pagination .page-link {
        min-width: 34px;
        min-height: 34px;
        padding: 0.35rem 0.3rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   PAGE BANNER — ichki sahifalar sarlavhasi (frontend/widgets/PageBanner)
   Rasmsiz: bosh sahifadagi fallback hero bilan bir oila — to'q lapis,
   girih, rozetka ichidagi ikonka. Rasmli: lapis overlay, naqshsiz.
   ========================================================================== */
.page-banner-section {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: clamp(140px, 15vw, 180px) 0 clamp(56px, 8vw, 88px);
}

.page-banner--plain {
    background-color: var(--uzmmsi-ink-deep);
    background-image:
        radial-gradient(ellipse 55% 90% at 82% 45%, rgba(42, 68, 148, 0.55), transparent 70%),
        var(--uzmmsi-girih);
    background-size: auto, 80px 80px;
}

.page-banner--image {
    background-color: var(--uzmmsi-ink-deep);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.page-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to right,
        rgba(18, 26, 61, 0.88) 0%,
        rgba(18, 26, 61, 0.66) 60%,
        rgba(18, 26, 61, 0.36) 100%
    );
}

.page-banner-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 3;
}

.page-banner-wave svg {
    display: block;
    width: 100%;
}

.page-banner-content {
    position: relative;
    z-index: 4;
}

.page-banner-title {
    font-family: var(--uzmmsi-display);
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}

.page-banner-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.55;
    color: rgba(236, 240, 252, 0.86);
    max-width: 60ch;
    margin-bottom: 0;
}

.page-banner--image .page-banner-title,
.page-banner--image .page-banner-subtitle {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* Breadcrumbs */
.breadcrumb-wrapper {
    margin-top: 1.5rem;
}

/* Mobilda .breadcrumb-wrapper flex: <nav> flex-element bo'lib min-width:auto
   tufayli kontent kengligigacha cho'zilardi va ro'yxatning max-width:100% i
   ekranga emas, shu cho'zilgan <nav> ga nisbatan hisoblanardi. */
.breadcrumb-wrapper > nav {
    min-width: 0;
    max-width: 100%;
}

.breadcrumb-list {
    display: inline-flex;
    max-width: 100%;
    margin-bottom: 0;
    padding: 0.55rem 1.15rem;
    list-style: none;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(195, 170, 55, 0.28);
    border-radius: 50px;
}

.breadcrumb-list::-webkit-scrollbar {
    display: none;
}

.breadcrumb-list .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-list .breadcrumb-item:not(:last-child) {
    max-width: 160px;
}

.breadcrumb-list .breadcrumb-item:last-child {
    max-width: 450px;
}

.breadcrumb-list .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    flex-shrink: 0;
    padding: 0 0.7rem;
    font-size: 1.2rem;
    line-height: 1;
    color: rgba(195, 170, 55, 0.7);
}

.breadcrumb-list .breadcrumb-item a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.breadcrumb-list .breadcrumb-item a:hover,
.breadcrumb-list .breadcrumb-item a:focus-visible {
    color: var(--uzmmsi-gold);
}

.breadcrumb-list .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.72);
}

/* Joriy sahifa (oxirgi band) — masalan uzun yangilik sarlavhasi — bir qatorda
   "…" bilan qisqaradi: to'liq nomi shu zahoti H1 da turibdi. Ota bandlar
   (navigatsiya) kesilmaydi. text-overflow faqat blok elementda ishlaydi —
   inline-flex bandda matn "…" siz kesilib qolardi. */
.breadcrumb-list .breadcrumb-item.active:last-child {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Emblem: logotip markazidagi belgi (mask, oltin) */
.page-banner-emblem-col {
    display: flex;
    justify-content: flex-end;
}

.page-banner-emblem {
    width: clamp(110px, 12vw, 160px);
    aspect-ratio: 4 / 5;
    margin-right: clamp(0px, 3vw, 48px);
    background-color: var(--uzmmsi-gold);
    opacity: 0.6;
    -webkit-mask: var(--uzmmsi-emblem) center / contain no-repeat;
    mask: var(--uzmmsi-emblem) center / contain no-repeat;
}

@media (max-width: 767.98px) {
    .page-banner-section {
        text-align: center;
    }

    .page-banner-subtitle {
        margin-inline: auto;
    }

    .page-banner-emblem-col {
        display: none;
    }

    .breadcrumb-wrapper {
        display: flex;
        justify-content: center;
    }

    .breadcrumb-list {
        justify-content: center;
    }
}

/* Planshet va telefon: bandlar kesilmaydi ("Ta'lim da…") va bir qatorga
   siqilmaydi — sig'masa keyingi qatorga o'tadi. Avval ro'yxat (flex element,
   min-width:auto) o'z kontenticha keng bo'lib, telefonda markazdan ikki
   tomonga ekrandan chiqardi. */
@media (max-width: 991.98px) {
    .breadcrumb-list {
        min-width: 0;
        flex-wrap: wrap;
        row-gap: 0.15rem;
        white-space: normal;
        overflow: visible;
        border-radius: 14px;
        padding: 0.5rem 0.9rem;
    }

    .breadcrumb-list .breadcrumb-item,
    .breadcrumb-list .breadcrumb-item:not(:last-child),
    .breadcrumb-list .breadcrumb-item:last-child {
        max-width: 100%;
        overflow: visible;
        white-space: nowrap;
    }

    .breadcrumb-list .breadcrumb-item a {
        overflow: visible;
    }

    /* Sig'masa joriy band keyingi qatorga tushib, konteyner kengligida qisqaradi */
    .breadcrumb-list .breadcrumb-item.active:last-child {
        max-width: 100%;
    }

    .breadcrumb-list .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.45rem;
    }
}

/* ==========================================================================
   ERROR PAGE (site/error) — logotip belgisi ostida holat kodi
   ========================================================================== */
.error-page {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.error-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-emblem::before {
    content: '';
    width: clamp(120px, 14vw, 170px);
    aspect-ratio: 4 / 5;
    background-color: var(--uzmmsi-gold-deep);
    opacity: 0.85;
    -webkit-mask: var(--uzmmsi-emblem) center / contain no-repeat;
    mask: var(--uzmmsi-emblem) center / contain no-repeat;
}

.error-emblem-code {
    font-family: var(--uzmmsi-display);
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    color: var(--uzmmsi-heading);
    font-variant-numeric: lining-nums;
}

.error-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.6;
    color: var(--uzmmsi-text);
    max-width: 52ch;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.btn-error-primary,
.btn-error-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-error-primary {
    background: var(--uzmmsi-accent);
    color: #ffffff;
    border: 1.5px solid var(--uzmmsi-accent);
}

.btn-error-primary:hover,
.btn-error-primary:focus-visible {
    background: var(--uzmmsi-accent-deep);
    border-color: var(--uzmmsi-accent-deep);
    color: #ffffff;
}

.btn-error-secondary {
    background: transparent;
    color: var(--uzmmsi-accent);
    border: 1.5px solid var(--uzmmsi-accent);
}

.btn-error-secondary:hover,
.btn-error-secondary:focus-visible {
    background: var(--uzmmsi-accent-soft);
    color: var(--uzmmsi-accent-deep);
}

.error-suggestions {
    padding-top: 1.75rem;
    border-top: 1px solid var(--uzmmsi-line);
}

.error-suggestions h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--uzmmsi-heading);
    margin-bottom: 0.85rem;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.error-suggestions a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--uzmmsi-text);
    text-decoration: none;
}

.error-suggestions a i {
    color: var(--uzmmsi-gold-deep);
    transition: transform 0.2s ease;
}

.error-suggestions a:hover,
.error-suggestions a:focus-visible {
    color: var(--uzmmsi-accent);
}

.error-suggestions a:hover i {
    transform: translateX(3px);
}

@media (max-width: 991.98px) {
    .error-page .col-lg-7 {
        text-align: center;
    }

    .error-lead {
        margin-inline: auto;
    }

    .error-actions {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .btn-error-primary,
    .btn-error-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   EMPTY STATE (frontend/widgets/EmptyState) — ro'yxat bo'sh bo'lganda.
   Logotip belgisi; ochiq fonda gold-deep, to'q fonda oltin.
   ========================================================================== */
.empty-state-block {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1rem;
}

.empty-state-emblem {
    width: 64px;
    aspect-ratio: 4 / 5;
    margin: 0 auto 1.25rem;
    background-color: var(--uzmmsi-gold-deep);
    opacity: 0.8;
    -webkit-mask: var(--uzmmsi-emblem) center / contain no-repeat;
    mask: var(--uzmmsi-emblem) center / contain no-repeat;
}

.empty-state-title {
    font-family: var(--uzmmsi-display);
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-weight: 700;
    color: var(--uzmmsi-heading);
    margin-bottom: 0.4rem;
}

.empty-state-text {
    color: var(--uzmmsi-text-muted);
    max-width: 48ch;
    margin: 0 auto;
}

.empty-state-action {
    margin-top: 1.25rem;
}

/* To'q fon ustida (masalan galereya "muzey zali") */
.home-band--dark .empty-state-title {
    color: #ffffff;
}

.home-band--dark .empty-state-text {
    color: rgba(236, 240, 252, 0.75);
}

.home-band--dark .empty-state-emblem {
    background-color: var(--uzmmsi-gold);
}

/* ==========================================================================
   EVENT CARD — chapda sana ustuni, o'ngda ma'lumot
   (views/events/_event_item.php: /events ro'yxati va bosh sahifa Afishasi)
   ========================================================================== */
.event-item {
    position: relative;
    display: flex;
    background: var(--uzmmsi-surface);
    border: 1px solid var(--uzmmsi-line);
    border-radius: var(--mrdi-radius-md, 14px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(18, 26, 61, 0.05);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.event-item:hover,
.event-item:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(18, 26, 61, 0.1);
    border-color: rgba(195, 170, 55, 0.55);
}

.event-item:focus-within {
    outline: 2px solid var(--uzmmsi-accent);
    outline-offset: 3px;
}

.event-date {
    flex: 0 0 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.25rem 0.5rem;
    background: var(--uzmmsi-accent);
    color: #ffffff;
    line-height: 1;
    text-align: center;
}

.event-date .day {
    font-family: var(--uzmmsi-display);
    font-size: 2.6rem;
    font-weight: 700;
    font-variant-numeric: lining-nums;
}

.event-date .month {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.event-date .year {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.event-item.is-past .event-date {
    background: var(--uzmmsi-text-muted);
}

.event-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.35rem 1.5rem;
}

.event-status {
    align-self: flex-start;
    padding: 0.15rem 0.65rem;
    border: 1px solid var(--uzmmsi-line);
    border-radius: 999px;
    background: var(--uzmmsi-canvas);
    color: var(--uzmmsi-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.event-title {
    font-family: var(--uzmmsi-display);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* Butun kartochka bosiladi; semantik havola faqat sarlavhada. */
.event-title a {
    color: var(--uzmmsi-heading);
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.event-title a:focus-visible {
    outline: none;
}

.event-item:hover .event-title a {
    color: var(--uzmmsi-accent);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
}

.event-meta p {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.86rem;
    color: var(--uzmmsi-text-muted);
}

.event-meta i {
    color: var(--uzmmsi-gold-deep);
}

.event-description {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--uzmmsi-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tashqi havola sarlavhaning cho'zilgan havolasi ustida turadi. */
.btn-event {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    background: var(--uzmmsi-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-event:hover,
.btn-event:focus-visible {
    background: var(--uzmmsi-accent-deep);
    color: #ffffff;
}

.btn-event i {
    transition: transform 0.2s ease;
}

.btn-event:hover i {
    transform: translateX(3px);
}

/* Bosh sahifa varianti: ixchamroq, tavsif 2 qator. */
.event-item--compact .event-date {
    flex-basis: 86px;
}

.event-item--compact .event-date .day {
    font-size: 2.3rem;
}

.event-item--compact .event-content {
    padding: 1.15rem 1.25rem;
    gap: 0.45rem;
}

.event-item--compact .event-title {
    font-size: 1.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-item--compact .event-description {
    -webkit-line-clamp: 2;
    font-size: 0.88rem;
}

@media (max-width: 575.98px) {
    .event-date,
    .event-item--compact .event-date {
        flex-basis: 74px;
        padding: 1rem 0.35rem;
    }

    .event-date .day,
    .event-item--compact .event-date .day {
        font-size: 2rem;
    }

    .event-content,
    .event-item--compact .event-content {
        padding: 1rem 1.1rem;
    }

    .event-title,
    .event-item--compact .event-title {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   MEDIA CARDS — audio pleer va video kartochka
   (views/media/_audio_player.php, _video_card.php: bosh sahifa + /media)
   Pleer har doim to'q "sahna". Video kartochka: yorug' sahifada oq,
   to'q bo'limda (.home-band--dark) lapis — hech qayerda shaffof emas.
   ========================================================================== */
/* --- Audio player card --- */
.media-player {
    background: var(--uzmmsi-ink);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--uzmmsi-gold);
    padding: 1.5rem;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(18, 26, 61, 0.18);
    height: 100%;
}

.media-player-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.media-player-disc {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: var(--uzmmsi-gold);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1.5px rgba(195, 170, 55, 0.55);
}

.media-player.playing .media-player-disc {
    animation: media-spin 6s linear infinite;
}

@keyframes media-spin {
    to { transform: rotate(360deg); }
}

.media-player-titles {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.media-player-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--uzmmsi-gold);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.media-player-now {
    font-family: var(--uzmmsi-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-player-artist {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-audio-el {
    width: 100%;
    margin-bottom: 1rem;
    accent-color: var(--uzmmsi-gold);
}

.media-tracklist {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.media-track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.media-track:hover {
    background: rgba(255, 255, 255, 0.06);
}

.media-track.active {
    background: rgba(195, 170, 55, 0.12);
    border-color: rgba(195, 170, 55, 0.45);
}

.media-track-num {
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    width: 26px;
    flex-shrink: 0;
}

.media-track.active .media-track-num {
    color: var(--uzmmsi-gold);
}

.media-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.media-track-info strong {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-track-info small {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-track-dur {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}

.media-track-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.media-track.active .media-track-icon {
    background: var(--uzmmsi-gold);
    color: #1c1917;
}

.media-tracklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- Video kartochka --- */
.media-video-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--uzmmsi-surface);
    border: 1px solid var(--uzmmsi-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(18, 26, 61, 0.06);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.media-video-card:hover,
.media-video-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(18, 26, 61, 0.16);
    border-color: rgba(195, 170, 55, 0.6);
}

.media-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--uzmmsi-ink-deep);
    text-decoration: none;
}

.media-video-thumb:focus-visible {
    outline: 3px solid var(--uzmmsi-gold);
    outline-offset: -3px;
}

.media-video-thumb img,
.media-video-thumb video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Belgilar o'qilishi uchun muqova chetlari biroz qoraytiriladi. */
.media-video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(18, 26, 61, 0.45), transparent 32%),
        linear-gradient(to top, rgba(18, 26, 61, 0.55), transparent 38%);
    pointer-events: none;
}

/* Muqovasiz video: lapis + girih (markazda ijro tugmasi) */
.media-video-placeholder {
    position: absolute;
    inset: 0;
    background-color: var(--uzmmsi-ink-deep);
    background-image:
        radial-gradient(ellipse 60% 70% at 50% 50%, rgba(42, 68, 148, 0.6), transparent 75%),
        var(--uzmmsi-girih);
    background-size: auto, 80px 80px;
}

.media-video-thumb video {
    position: absolute;
    inset: 0;
}

.media-video-source {
    position: absolute;
    z-index: 1;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(18, 26, 61, 0.82);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
}

.media-video-source .bi-youtube {
    color: #ff3b3b;
}

.media-video-play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--uzmmsi-gold);
    color: var(--uzmmsi-ink-deep);
    font-size: 1.9rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(195, 170, 55, 0.25);
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.media-video-play i {
    margin-left: 3px;
}

.media-video-card:hover .media-video-play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 9px rgba(195, 170, 55, 0.3);
}

.media-video-dur {
    position: absolute;
    z-index: 1;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.media-video-body {
    flex: 1;
    padding: 1rem 1.15rem 1.15rem;
}

.media-video-title {
    font-family: var(--uzmmsi-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--uzmmsi-heading);
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-video-artist {
    font-size: 0.85rem;
    color: var(--uzmmsi-text-muted);
    margin: 0;
}

/* To'q bo'lim ichida: lapis kartochka, fondan aniq ajralib turadi. */
.home-band--dark .media-video-card {
    background: var(--uzmmsi-ink);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.home-band--dark .media-video-card:hover,
.home-band--dark .media-video-card:focus-within {
    border-color: rgba(195, 170, 55, 0.7);
}

.home-band--dark .media-video-title {
    color: #ffffff;
}

.home-band--dark .media-video-artist {
    color: rgba(236, 240, 252, 0.72);
}

/* To'q bo'limdagi "Barchasini ko'rish" tugmasi */
.home-band--dark .btn-media-all {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.home-band--dark .btn-media-all:hover,
.home-band--dark .btn-media-all:focus-visible {
    background: var(--uzmmsi-gold);
    border-color: var(--uzmmsi-gold);
    color: var(--uzmmsi-ink-deep);
}

@media (max-width: 575.98px) {
    .media-player {
        padding: 1.1rem;
    }

    .media-player-now {
        font-size: 1.1rem;
    }
}

/* --- /media sahifasi --- */
.media-page {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}

.media-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    margin-bottom: 2.5rem;
    background: var(--uzmmsi-surface);
    border: 1px solid var(--uzmmsi-line);
    border-radius: 999px;
}

.media-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    color: var(--uzmmsi-text);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.media-filter-item:hover,
.media-filter-item:focus-visible {
    background: var(--uzmmsi-accent-soft);
    color: var(--uzmmsi-accent-deep);
}

.media-filter-item.active {
    background: var(--uzmmsi-accent);
    color: #ffffff;
}

.media-filter-count {
    min-width: 1.6rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(18, 26, 61, 0.08);
    font-size: 0.75rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.media-filter-item.active .media-filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.media-page-block + .media-page-block {
    margin-top: 3.5rem;
}

.media-page-heading {
    font-family: var(--uzmmsi-display);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 700;
    color: var(--uzmmsi-heading);
    margin-bottom: 1.5rem;
}
