/* ==========================================================================
   HALİÇ PROFESSIONAL PORTAL - RESPONSIVE STYLESHEET
   Mobile, Tablet, Large Desktop Breakpoints & Off-Canvas Navigation
   ========================================================================== */

/* Tablet & Compact Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .viewer-content-layout {
    flex-direction: column;
  }

  .viewer-sidebar-pane {
    width: 100%;
    height: 220px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Medium Tablets & Below (max-width: 992px) */
@media (max-width: 992px) {
  /* Auth Screen Adjustments */
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-hero {
    flex: none;
    min-height: 380px;
    padding: 36px 32px;
  }

  .auth-hero-title {
    font-size: 2rem;
  }

  .auth-hero-features {
    display: none;
  }

  .auth-panel {
    flex: none;
    padding: 44px 32px;
  }

  /* App Layout Adjustments */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    z-index: 1050;
    width: 280px !important;
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-menu-trigger {
    display: flex;
  }

  .topbar-search-trigger {
    min-width: 200px;
  }

  .search-kbd-shortcut {
    display: none;
  }

  .app-topbar {
    padding: 0 20px;
  }

  .app-content {
    padding: 24px 20px;
  }

  /* Mobile Backdrop for Sidebar */
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }
}

/* Mobile Screens (max-width: 768px) */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .toolbar-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }

  .filter-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar-controls {
    justify-content: space-between;
  }

  .search-input-wrap input {
    width: 100%;
  }

  .search-input-wrap {
    flex: 1;
  }

  .page-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .topbar-search-trigger span:first-of-type {
    display: none;
  }

  .topbar-search-trigger {
    min-width: auto;
    padding: 8px 12px;
  }

  .topbar-user-name {
    display: none;
  }

  /* Responsive Table: Horizontal Scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .arch-table {
    min-width: 640px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-header {
    padding: 12px 16px;
  }

  /* Detail Page Tabs */
  .detail-tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Small Mobiles (max-width: 480px) */
@media (max-width: 480px) {
  .auth-hero {
    min-height: 280px;
    padding: 24px 20px;
  }

  .auth-panel {
    padding: 32px 20px;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .breadcrumbs {
    display: none;
  }
}
