/**
 * ====================================================================
 * mobile-public.css — 81-IDUM Public Sahifalar Mobil UI
 * Admin panel bundan mustasno.
 * Breakpoints: 991px | 767px | 580px | 420px
 * ====================================================================
 */

/* ====================================================================
   1. GLOBAL BAZAVIY TUZATMALAR
   ==================================================================== */
@media (max-width: 991.98px) {
  html {
  }

  body {
    min-width: 0;
    padding-left: env(safe-area-inset-left, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .site-shell {
    min-width: 0;
    max-width: 100%;
  }

  .site-shell img,
  .site-shell video:not(.bg-video),
  .site-shell iframe,
  .site-shell svg,
  .site-shell canvas {
    max-width: 100%;
    height: auto;
  }

  .container {
    padding-inline: 16px;
  }

  /* Uzoq URL/matnlar kenglikni buzmasin */
  .site-shell .post-content {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ====================================================================
   2. HEADER & NAVIGATSIYA
   ==================================================================== */
@media (max-width: 991.98px) {
  .header-main {
    padding: 10px 14px;
    gap: 12px;
    top: 12px;
    width: calc(100% - 20px);
  }

  .logo img {
    width: 44px;
    height: 44px;
  }

  /* Mobil menyu tugmasi — kattaroq bosish zonasi */
  .menu-toggle {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    box-sizing: border-box;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 580px) {
  .header-main {
    top: 10px;
    padding: 8px 12px;
    gap: 8px;
    border-radius: 14px;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

  /* Nav linklarni mobilda kattaroq qil */
  #site-nav ul {
    gap: 16px;
  }

  #site-nav .nav-link {
    font-size: 15px;
    padding: 10px 6px;
  }
}

/* ====================================================================
   3. HERO SEKTSIYASI (Bosh sahifa)
   ==================================================================== */
@media (max-width: 991.98px) {
  .hero {
    min-height: 100svh !important;
    min-height: 100dvh !important;
    display: grid !important;
    place-content: center !important;
    padding: 80px 0 40px !important;
  }

  .card-home,
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .hero-side-card {
    display: none !important;
  }

  .hero-glass-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .hero-panel-head {
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .hero-panel-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }

  .hero-panel-title {
    font-size: 15px;
  }

  .hero-panel-sub {
    font-size: 12px;
  }

  .hero-panel-stats {
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .hero-mini-stat .stat-val {
    font-size: 18px;
  }

  .hero-mini-stat .stat-lbl {
    font-size: 11px;
  }

  .hero-social-strip {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .hero-social-links a {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 10px;
  }

  .hero-actions {
    gap: 12px;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 12px 22px;
    font-size: 14px;
  }

  .home-content,
  .hero-content {
    width: 100%;
  }

  .hero-description,
  .home-content p,
  .hero-content p {
    font-size: clamp(14px, 3.2vw, 17px);
    max-width: 100%;
    line-height: 1.6;
  }

  .hero-badge {
    font-size: 12px;
    padding: 6px 14px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: clamp(28px, 8vw, 42px);
    margin-bottom: 14px;
    display: block !important;
  }

  .hero-title.hero-title-3d {
    display: block !important;
    gap: 8px;
    padding: 0 0 0 14px;
    border-left: 3px solid rgba(96, 165, 250, 0.5);
  }

  .hero-title.hero-title-3d .hero-title-top {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .hero-title.hero-title-3d .hero-title-main {
    display: block;
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .home-btn {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    width: 100%;
    padding: 0;
  }

  .home-btn a {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s ease;
  }

  .home-btn a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }
}

@media (max-width: 580px) {
  .hero {
    padding: 60px 0 30px !important;
  }

  .card-home,
  .hero-grid {
    gap: 14px;
  }

  .hero-title {
    font-size: clamp(22px, 9vw, 32px);
    line-height: 1.15;
    margin-bottom: 10px;
  }

  .hero-title.hero-title-3d {
    padding: 0 0 0 12px;
  }

  .hero-title.hero-title-3d .hero-title-main {
    font-size: 1.8rem;
  }

  .hero-description,
  .home-content p,
  .hero-content p {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .hero-badge {
    font-size: 10.5px;
    padding: 5px 11px;
    margin-bottom: 12px;
  }

  .hero-actions {
    gap: 8px;
    flex-direction: column;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 11px 18px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }
}

/* ====================================================================
   4. GLASS SECTION & ABOUT KARTALAR
   ==================================================================== */
@media (max-width: 991.98px) {
  .glass-section {
    margin-top: 60px;
    padding: 40px 22px;
    border-radius: 20px;
  }

  .section-head {
    margin-top: 36px;
    margin-bottom: 18px;
    text-align: center;
  }

  .about-modern {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Ko'proq joy va o'qilishi yaxshi bo'lsin */
  .about-card,
  .about-highlight {
    padding: 22px;
    border-radius: 16px;
  }

  .about-card p,
  .about-highlight p {
    margin-bottom: 14px;
  }
}

@media (max-width: 767px) {
  .glass-section {
    padding: 32px 18px;
    border-radius: 18px;
    margin-top: 40px;
  }

  .glass-section::before {
    left: 18px;
    width: 50px;
  }

  section {
    padding: 60px 0;
  }
}

@media (max-width: 580px) {
  .glass-section {
    padding: 26px 14px;
    border-radius: 16px;
  }

  .glass-section::before {
    left: 14px;
  }

  section {
    padding: 50px 0;
  }
}

/* ====================================================================
   5. YANGILIKLAR (NEWS) KARTALAR
   ==================================================================== */
@media (max-width: 991.98px) {
  .news-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
  }

  .news-card h3 {
    font-size: 17px;
    margin: 12px 0 6px;
  }

  /* Tugmalar — touch uchun kattaroq */
  .news-card .btn {
    min-height: 40px;
  }
}

@media (max-width: 767px) {
  .news-container {
    gap: 14px;
  }

  .icon-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 14px;
  }

  .icon-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
  }

  .icon-link .meta {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .icon-link-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    width: auto;
  }

  .icon-link-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    padding: 7px 12px;
    min-height: 34px;
    border-radius: 999px;
  }
}

@media (max-width: 580px) {
  .news-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-card {
    border-radius: 14px;
  }

  .news-card h3 {
    font-size: 16px;
  }

  .news-card p {
    font-size: 14px;
  }

  /* Moslik uchun: karta ichidagi padding tegizish */
  .news-card h3,
  .news-card p,
  .icon-links {
    padding-inline: 14px;
  }
}

/* ====================================================================
   6. POST (MAQOLA) FILTER — post.blade.php
   ==================================================================== */
@media (max-width: 991.98px) {
  .post-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .post-filter {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
  }

  .post-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  /* Home news head — mobil uchun bir xil */
  .home-news-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ====================================================================
   7. USTOZLAR BO'LIMI
   ==================================================================== */
@media (max-width: 991.98px) {
  .teachers {
    margin-top: 40px;
  }

  .teacher {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .teacher h2 {
    font-size: clamp(24px, 5vw, 36px);
  }

  .teacher p {
    margin: 14px 0 18px;
  }

  .teacher-img {
    padding: 14px;
  }

  .teacher-img img {
    height: 380px;
    border-radius: 12px;
  }

  .teacher-img-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .teacher-img-actions .btn,
  .teacher-img-actions .btn1 {
    flex: 1;
    justify-content: center;
    text-align: center;
    min-height: 42px;
  }
}

@media (max-width: 580px) {
  .teacher-img {
    padding: 12px;
  }

  .teacher-img img {
    height: 340px;
  }

  .teacher-img h3 {
    font-size: 18px;
  }

  .teacher-img p {
    font-size: 14px;
  }
}

/* ====================================================================
   8. FOOTER
   ==================================================================== */
@media (max-width: 991.98px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
    padding-top: 36px;
    padding-bottom: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 580px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 28px;
    padding-bottom: 20px;
    text-align: center;
  }

  .footer-brand {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-title {
    text-align: center;
    position: relative;
  }

  .footer-title::after {
    left: 50% !important;
    transform: translateX(-50%);
  }

  .footer-contact-list li {
    justify-content: center;
  }

  .footer-bottom {
    font-size: 12px;
    padding: 12px;
    text-align: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }
}

/* ====================================================================
   9. KONTAKT SAHIFASI
   ==================================================================== */
@media (max-width: 991.98px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-hero-content {
    padding: 130px 0 60px;
  }

  .contact-form-wrap {
    padding: 22px;
    border-radius: 18px;
  }
}

@media (max-width: 580px) {
  .contact-hero-content {
    padding: 110px 0 50px;
  }

  .contact-form-wrap {
    padding: 18px;
    border-radius: 16px;
  }

  .contact-card {
    border-radius: 14px;
    padding: 16px;
    gap: 12px;
  }

  .contact-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 18px;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px 13px;
    border-radius: 10px;
    font-size: 16px; /* iOS zoom oldini olish */
  }

  .contact-form .btn {
    min-height: 46px;
    font-size: 15px;
  }
}

/* ====================================================================
   10. ABOUT (BIZ HAQIMIZDA) SAHIFASI
   ==================================================================== */
@media (max-width: 991.98px) {
  .about-hero-content {
    padding: 130px 0 65px;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .milestone-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 580px) {
  .about-hero-content {
    padding: 110px 0 50px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-info-card {
    padding: 18px;
    border-radius: 16px;
  }

  .milestone-card {
    padding: 16px;
    border-radius: 14px;
  }

  .about-stats-section {
    padding: 50px 0;
  }

  .about-stat-item strong {
    font-size: clamp(30px, 8vw, 44px);
  }
}

/* ====================================================================
   11. KURSLAR SAHIFASI
   ==================================================================== */
@media (max-width: 991.98px) {
  .courses-hero-content {
    padding: 130px 0 64px;
  }

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

  .courses-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 580px) {
  .courses-hero-content {
    padding: 108px 0 50px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-card {
    border-radius: 16px;
    max-width: 100%;
    overflow: hidden;
  }

  .course-card-media {
    height: 160px;
  }

  .course-body {
    padding: 14px 16px;
  }

  .course-body h3 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .course-card-summary {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .course-card-toolbar {
    gap: 6px;
  }

  .course-info-trigger {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 34px;
    flex: 1 1 100px;
  }

  .course-info-trigger i {
    display: none;
  }

  .course-card-toolbar .share-btn {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 34px;
    flex: 1 1 80px;
  }

  .course-card-toolbar .share-btn i {
    display: none;
  }

  .bookmark-btn {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 34px;
  }

  .bookmark-btn i {
    display: none;
  }

  .course-card-manage-row {
    flex-direction: column;
    gap: 8px;
  }

  .course-card-manage-row .btn {
    font-size: 12px;
    padding: 7px 14px;
  }

  .filter-bar {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .course-details-content {
    padding: 20px 16px;
  }

  .courses-stats-section {
    padding: 50px 0;
  }
}

/* ====================================================================
   12. USTOZ PROFIL SAHIFASI (teacher.blade.php)
   ==================================================================== */
@media (max-width: 991.98px) {
  .teacher-show-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .teacher-achievements-title {
    font-size: 18px;
  }

  .teacher-achievements-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 580px) {
  .teacher-show-hero {
    padding: 110px 0 50px !important;
  }

  .teacher-show-card {
    padding: 18px !important;
    border-radius: 16px !important;
  }
}

/* ====================================================================
   13. POST KO'RISH SAHIFASI (post.blade.php)
   ==================================================================== */
@media (max-width: 991.98px) {
  .post-content {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .news-hero {
    padding-top: 96px;
    padding-bottom: 32px;
  }

  .news-hero-content {
    margin-top: 36px;
  }

  .news-hero-content h1 {
    font-size: clamp(24px, 5vw, 40px);
  }

  .news-hero-content p {
    font-size: 16px;
  }

  /* Related posts grid */
  .news-container.prime-stagger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .news-hero {
    padding-top: 90px;
    padding-bottom: 24px;
  }

  .news-hero-content h1 {
    font-size: clamp(22px, 6vw, 32px);
    margin-bottom: 8px;
  }

  .news-hero-content p {
    font-size: 15px;
  }

  .news-container.prime-stagger {
    grid-template-columns: 1fr;
  }

  /* Maqola matni o'qilishi yaxshi bo'lsin */
  .post-content p {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  .post-content h2 {
    font-size: 20px !important;
  }

  .post-content h3 {
    font-size: 17px !important;
  }

  .post-content img {
    width: 100% !important;
    height: auto !important;
    border-radius: 12px;
  }

  .post-content iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
  }
}

/* ====================================================================
   14. TUGMALAR — UMUMIY TOUCH OPTIMALLASHTIRISH
   ==================================================================== */
@media (max-width: 767px) {
  /* Barcha asosiy tugmalar 44px min balandlik */
  .btn,
  .btn-outline,
  .btn-prime,
  .btn1,
  .menu-toggle,
  .scroll-top,
  .social-link {
    min-height: 44px;
  }

  /* Like tugmasi — kichik va ixcham */
  .like-btn {
    padding: 6px 10px;
    min-height: 32px;
    font-size: 12px;
    border-radius: 999px;
    gap: 5px;
  }

  .like-btn i {
    font-size: 14px;
  }

  /* Share va boshqa kichik tugmalar */
  .btn-sm {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
  }

  /* News card dagi tugmalar */
  .news-card .btn-prime {
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 16px;
    min-height: 40px;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Ulashish tugmasi — ixcham outline chip */
  .news-card .icon-link-actions .share-btn,
  .news-card .icon-link-actions .btn-outline {
    width: auto !important;
    min-height: 34px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Light mode uchun Ulashish tugmasi */
  :root:not([data-theme='dark']) .news-card .icon-link-actions .share-btn,
  :root:not([data-theme='dark']) .news-card .icon-link-actions .btn-outline {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.28) !important;
  }

  :root:not([data-theme='dark']) .news-card .icon-link-actions .share-btn:hover,
  :root:not([data-theme='dark']) .news-card .icon-link-actions .btn-outline:hover {
    background: rgba(37, 99, 235, 0.16) !important;
    border-color: rgba(37, 99, 235, 0.45) !important;
  }

  /* Dark mode uchun Ulashish tugmasi */
  :root[data-theme='dark'] .news-card .icon-link-actions .share-btn,
  :root[data-theme='dark'] .news-card .icon-link-actions .btn-outline {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
  }

  /* Ustozlar kartasidagi Ulashish va Ustoz haqida tugmalari */
  .teacher-img-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 14px !important;
  }

  .teacher-img-actions .btn1,
  .teacher-img-actions .share-btn {
    flex: 1 1 0 !important;
    text-align: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .teacher-img-actions .btn1 {
    background: #fff !important;
    color: var(--primary, #1565c0) !important;
    border: none !important;
  }

  .teacher-img-actions .share-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
  }

  /* Dark mode — ustoz kartasi tugmalari */
  :root[data-theme='dark'] .teacher-img-actions .btn1 {
    background: rgba(125, 180, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(125, 180, 255, 0.3) !important;
  }

  :root[data-theme='dark'] .teacher-img-actions .btn1:hover {
    background: rgba(125, 180, 255, 0.18) !important;
    border-color: rgba(125, 180, 255, 0.5) !important;
  }

  :root[data-theme='dark'] .teacher-img-actions .share-btn {
    background: rgba(125, 180, 255, 0.08) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(125, 180, 255, 0.25) !important;
  }

  :root[data-theme='dark'] .teacher-img-actions .share-btn:hover {
    background: rgba(125, 180, 255, 0.16) !important;
    border-color: rgba(125, 180, 255, 0.45) !important;
  }
}

/* ====================================================================
   15. FORMALAR — iOS ZOOM OLDINI OLISH
   ==================================================================== */
@media (max-width: 540px) {
  .site-shell input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='hidden']):not([type='submit']):not([type='button']),
  .site-shell select,
  .site-shell textarea {
    font-size: max(16px, 1em);
  }
}

/* ====================================================================
   16. CHAT WIDGET — MOBIL
   ==================================================================== */
@media (max-width: 480px) {
  .chat-widget {
    right: var(--dock-edge, 8px);
    left: auto !important;
    bottom: var(--dock-bottom, 6px);
  }

  .chat-panel:not(.is-fullscreen) {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: calc(var(--dock-chat-bubble, 52px) + var(--dock-bottom, 6px) + 8px) !important;
    width: auto !important;
    height: min(68vh, 520px) !important;
    border-radius: 16px;
  }

  .chat-panel:not(.is-fullscreen) .chat-panel-header {
    padding: 12px 14px;
  }

  .chat-panel:not(.is-fullscreen) .chat-panel-intro {
    padding: 10px 12px 8px;
  }

  .chat-panel:not(.is-fullscreen) .chat-messages {
    padding: 10px;
  }

  .chat-panel:not(.is-fullscreen) .chat-input-wrap {
    padding: 8px 10px;
    gap: 6px;
  }

  .chat-sticker-row {
    gap: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chat-sticker-row::-webkit-scrollbar {
    display: none;
  }

  .chat-sticker-btn {
    width: 32px;
    height: 28px;
    flex: 0 0 auto;
  }

  .chat-msg {
    max-width: 94%;
  }
}

/* ====================================================================
   17. RASM LIGHTBOX — MOBIL
   ==================================================================== */
@media (max-width: 580px) {
  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox-stage {
    max-width: 100%;
    gap: 10px;
  }

  .image-lightbox-img {
    max-height: calc(100vh - 110px);
    border-radius: 16px;
  }

  .image-lightbox-close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .image-lightbox-caption {
    border-radius: 16px;
    font-size: 13px;
  }
}

/* ====================================================================
   18. SAHIFA YUQORIGA QAYTISH TUGMASI
   ==================================================================== */
@media (max-width: 580px) {
  .scroll-top {
    right: var(--dock-edge, 8px);
    bottom: calc(var(--dock-bottom, 6px) + var(--dock-audio-lift) + 8px);
    width: 40px;
    height: 40px;
  }
}

/* ====================================================================
   19. TOAST BILDIRISHNOMA — MOBIL
   ==================================================================== */
@media (max-width: 580px) {
  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: 14px !important;
    top: auto !important;
  }

  .toast {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }
}

/* ====================================================================
   20. MULOQOT MODALI (comment-modal)
   ==================================================================== */
@media (max-width: 767px) {
  .comment-modal-dialog {
    grid-template-columns: 1fr !important;
    height: min(90vh, 640px) !important;
    border-radius: 16px;
  }

  .comment-modal-dialog > *:first-child {
    display: none !important; /* Rasm qismi — mobilda yashirin */
  }
}

/* ====================================================================
   21. PROFIL NATIJALARI — MOBIL
   ==================================================================== */
@media (max-width: 767px) {
  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .result-hero {
    padding: 100px 0 50px !important;
  }
}

/* ====================================================================
   23. KICHIK EKRANLAR UCHUN UMUMIY TYPOGRAPHY
   ==================================================================== */
@media (max-width: 580px) {
  .section-head h2,
  .teacher h2 {
    font-size: clamp(22px, 6vw, 32px);
  }

  .section-head p {
    font-size: 14.5px;
  }

  /* Barcha hero sarlavhalar */
  .about-hero-content h1,
  .contact-hero-content h1,
  .courses-hero-content h1 {
    font-size: clamp(26px, 7vw, 38px);
    line-height: 1.12;
  }

  .about-hero-content p,
  .contact-hero-content p,
  .courses-hero-content p {
    font-size: 14.5px;
  }
}

/* ====================================================================
   24. PAGINATION — MOBIL
   ==================================================================== */
@media (max-width: 580px) {
  .pagination {
    gap: 5px;
    justify-content: center;
  }

  .page-link {
    min-width: 2.2rem;
    height: 2.2rem;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  nav.d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ====================================================================
   25. KURS TAFSILOTLARI MODALI — MOBIL
   ==================================================================== */
@media (max-width: 767px) {
  .course-details-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .course-details-dialog {
    width: calc(100% - 16px);
    margin: 4vh auto 0;
    border-radius: 16px;
  }

  .course-details-content {
    padding: 20px 16px;
  }
}

/* ====================================================================
   26. USTOZLAR RO'YXATI SAHIFASI (teacher.blade.php — grid)
   ==================================================================== */
@media (max-width: 991.98px) {
  .teachers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px;
  }
}

@media (max-width: 580px) {
  .teachers-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .teacher-card {
    border-radius: 16px !important;
  }
}

/* ====================================================================
   27. MOBIL UCHUN YAXSHI SPACING
   ==================================================================== */
@media (max-width: 420px) {
  .container {
    padding-inline: 12px;
  }

  .hero-grid {
    gap: 12px;
  }

  .hero-title.hero-title-3d .hero-title-main {
    font-size: 1.6rem;
  }

  .hero-description,
  .home-content p,
  .hero-content p {
    font-size: 13px;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    padding: 10px 16px;
    font-size: 12.5px;
  }

  .glass-section {
    padding: 22px 12px;
    border-radius: 14px;
  }

  .glass-section::before {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
  }

  .news-card h3,
  .news-card p,
  .icon-links {
    padding-inline: 12px;
  }

  .news-card h3 {
    font-size: 15px;
    margin: 10px 0 5px;
  }

  .about-card,
  .about-highlight {
    padding: 18px;
    border-radius: 14px;
  }

  section {
    padding: 42px 0;
  }

  .hero-title {
    font-size: clamp(26px, 9vw, 36px);
  }

  .footer-container {
    padding-top: 24px;
  }
}

/* ====================================================================
   28. LANDSCAPE MOBILE — KICHIK BALANDLIK
   ==================================================================== */
@media (max-height: 500px) and (max-width: 900px) {
  .hero,
  .card-home {
    min-height: 100svh;
    padding-top: 80px;
  }

  .hero-title {
    font-size: clamp(22px, 4vw, 32px);
    margin-bottom: 10px;
  }

  .home-content p {
    font-size: 14px;
  }

  .about-hero-content,
  .contact-hero-content,
  .courses-hero-content {
    padding-top: 90px !important;
    padding-bottom: 40px !important;
  }
}

/* ====================================================================
   29. SAFE AREA (iPhone notch / Dynamic Island)
   ==================================================================== */
@supports (padding: env(safe-area-inset-left)) {
  @media (max-width: 991.98px) {
    .header-main {
      padding-left: calc(14px + env(safe-area-inset-left));
      padding-right: calc(14px + env(safe-area-inset-right));
    }

    .container {
      padding-left: calc(16px + env(safe-area-inset-left));
      padding-right: calc(16px + env(safe-area-inset-right));
    }

    footer.footer .container {
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
  }
}

/* ====================================================================
   30. PRINTERGA YASHIRISH VA ANIMATION KAMAYTIRISH
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
  .prime-reveal,
  .prime-stagger > *,
  .reveal,
  .letter {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@media print {
  .chat-widget,
  .scroll-top,
  .mobile-theme-toggle-wrap,
  .menu-toggle,
  .header-main,
  footer.footer {
    display: none !important;
  }
}
