/* =====================================================================
   MODOL CONNECT — responsive rules (desktop → laptop → tablet → mobile)
   ===================================================================== */

@media (max-width: 1240px) {
  .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid { gap: 32px; }
  .filter-bar { grid-template-columns: 1.4fr 1fr 1fr auto; }
  .filter-bar .filter-price { display: none; }
}

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; }
  .hero__float--tl, .hero__float--br { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 74px auto 0 0; width: 268px; z-index: 90; transform: translateX(-102%);
    transition: transform .25s ease; height: auto; box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; }
  .app-main { padding: 22px 18px 48px; }
  .chat-shell { grid-template-columns: 300px minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { padding: 40px 24px; }
}

@media (max-width: 900px) {
  .hero { padding: 48px 0 44px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { display: none; }
  .steps, .trust-grid, .testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-section { padding: 44px 0; }
  .cta-band { padding: 32px; }
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .chat-body { max-height: 52vh; }
  .profile-sidebar { position: static; }
}

@media (max-width: 720px) {
  .mc-container { padding-inline: 16px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .model-card__actions .btn-mc { flex: 1; }
  .model-card__actions { width: 100%; }
  .section-head { margin-bottom: 20px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .filter-price { display: block; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .profile-hero__cover { height: 170px; }
  .profile-hero__card { padding: 0 16px 22px; margin-top: -46px; gap: 14px; }
  .profile-hero__avatar { width: 104px; height: 104px; border-radius: 18px; }
  .table-mc { font-size: 13px; }
  .table-mc th, .table-mc td { padding: 10px 12px; }
  .site-footer { padding: 40px 0 22px; }
  .card-mc__body { padding: 18px; }
  .page-head h1 { font-size: 22px; }
  .msg { max-width: 88%; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (max-width: 480px) {
  .model-grid { grid-template-columns: 1fr; }
  .steps, .trust-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
  .hero h1 { font-size: 30px; }
  .searchbar { padding-left: 16px; }
  .searchbar .btn-mc { padding: 10px 16px; }
  .header-actions .lang-switch { display: none; }
  .auth-card { padding: 28px 18px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* touch friendly minimums */
@media (hover: none) {
  .btn-mc, .btn-outline, .icon-btn, .chip { min-height: 42px; }
  .sidebar a { padding-block: 12px; }
}

/* ---------------------------- mobile drawer ---------------------------- */
.mobile-drawer {
  position: fixed; inset: 74px 0 0 0; background: rgba(17, 24, 39, .38); z-index: 95; display: none;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer__panel {
  background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: 88vh; overflow-y: auto;
}
.mobile-drawer__panel a { padding: 13px 14px; border-radius: 11px; font-weight: 500; color: var(--text); }
.mobile-drawer__panel a:hover { background: var(--pink-soft); color: var(--pink-dark); }
.mobile-drawer__panel .btn-mc { margin-top: 10px; }

@media (min-width: 1081px) {
  .mobile-drawer, .mobile-drawer.is-open { display: none !important; }
  .sidebar { transform: none !important; }
}

@media print {
  .site-header, .site-footer, .sidebar, .chat-composer, .btn-mc, .btn-outline { display: none !important; }
  body { background: #fff; }
}
