/* Responsive Media Queries */

/* Mobile Nav Menu - Hidden on desktop */
.mobile-nav-menu {
  display: none;
}

/* Tablet Landscape - 1024px */
@media (max-width: 1024px) {
  .district-detail-layout,
  .mineral-detail-layout {
    grid-template-columns: 1fr;
  }
  
  .search-results-layout {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sections {
    grid-template-columns: 1fr;
  }
  
  .sidebar-panel {
    width: 280px;
  }
}

/* Tablet Portrait - 768px */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }
  
  .navbar {
    flex-direction: row;
    height: 64px;
    padding: 0 16px;
    gap: 8px;
  }
  
  .nav-brand {
    flex-shrink: 0;
  }
  
  .nav-title {
    font-size: 18px;
  }
  
  .nav-subtitle {
    font-size: 9px;
  }
  
  .nav-desktop {
    display: none;
  }
  
  .nav-search {
    width: 100%;
    max-width: 200px;
  }
  
  .nav-search input:focus {
    width: 100%;
  }
  
  .search-autocomplete-dropdown {
    width: 100%;
    right: auto;
    left: 0;
  }
  
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
  }
  
  .mobile-menu-btn:hover {
    background: var(--surface-hover);
  }
  
  .mobile-nav-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 99;
    padding: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  
  .mobile-nav-menu.active {
    display: block;
  }
  
  .mobile-nav-menu .nav-item {
    display: block;
    margin-bottom: 8px;
  }
  
  .mobile-nav-menu .nav-item:last-child {
    margin-bottom: 0;
  }
  
  .mobile-nav-menu .nav-item a {
    display: block;
    padding: 12px 16px;
    background: var(--surface-hover);
    border-radius: 6px;
  }
  
  .explorer-view {
    flex-direction: column-reverse;
  }
  
  .sidebar-panel {
    width: 100%;
    height: 280px;
    border-right: none;
    border-top: 1px solid var(--border-color);
  }
  
  .section-title, h1 {
    font-size: 36px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  #view-content {
    padding: 16px;
  }
}

/* Mobile - 480px */
@media (max-width: 480px) {
  body {
    overflow: auto;
  }
  
  .navbar {
    padding: 0 12px;
  }
  
  .nav-title {
    font-size: 16px;
  }
  
  .nav-subtitle {
    display: none;
  }
  
  .nav-search {
    max-width: 160px;
  }
  
  .search-autocomplete-dropdown {
    max-height: 300px;
  }
  
  .sidebar-panel {
    height: 240px;
  }
  
  .sidebar-header {
    padding: 14px;
  }
  
  .sidebar-title {
    font-size: 14px;
  }
  
  .sidebar-body {
    padding: 14px;
    gap: 14px;
  }
  
  .section-title, h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 18px;
  }
  
  #view-content {
    padding: 12px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .mineral-card, .district-card {
    padding: 16px;
  }
  
  .mineral-name, .district-name {
    font-size: 16px;
  }
  
  .mineral-desc, .district-desc {
    font-size: 13px;
  }
  
  .quick-stat-val {
    font-size: 16px;
  }
  
  .quick-stat-lbl {
    font-size: 9px;
  }
  
  .detail-map-container, .occurrence-map-box {
    height: 200px;
  }
  
  .mineral-detail-layout, .district-detail-layout {
    gap: 16px;
  }
  
  /* Profile section mobile */
  .glass-panel[style*="display:flex"] {
    flex-direction: column !important;
    text-align: center;
  }
  
  .glass-panel[style*="display:flex"] div:first-child {
    margin-bottom: 16px;
  }
}

/* Small Mobile - 360px */
@media (max-width: 360px) {
  .navbar {
    height: 56px;
  }
  
  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .mobile-nav-menu {
    top: 56px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  
  .section-title, h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .stat-card {
    padding: 14px;
    gap: 12px;
  }
  
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .mineral-card, .district-card {
    padding: 14px;
  }
  
  .mineral-name, .district-name {
    font-size: 15px;
  }
  
  .mineral-desc, .district-desc {
    font-size: 12px;
  }
  
  .sidebar-panel {
    height: 200px;
  }
  
  .tool-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .tool-btn i {
    font-size: 13px;
  }
}
