/**
 * Tuğra Elektronik - Responsive Style Breakpoints
 * Premium Smart Home & Building Automation
 */

/* 1440px max-width boundary is handled by .container */

@media (max-width: 1280px) {
  :root {
    --space-160: 120px;
    --space-120: 96px;
    --space-96: 80px;
    --space-80: 56px;
  }
  
  .container {
    padding-left: var(--space-48);
    padding-right: var(--space-48);
  }
}

@media (max-width: 1024px) {
  body {
    font-size: 17px;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mega-menu {
    display: none !important; /* Mega menu disabled on tablet/mobile in favor of simple hamburger options */
  }
}

@media (max-width: 992px) {
  .nav-menu, .header-actions .btn {
    display: none !important;
  }
  
  .hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 28px !important;
    height: 20px !important;
    min-width: 28px !important;
    min-height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1002 !important;
  }

  .hamburger span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    background-color: var(--color-dark) !important;
    border-radius: 2px !important;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-asymmetric-left, .grid-asymmetric-right {
    grid-template-columns: 1fr;
  }
  
  .timeline-line, .timeline-progress {
    display: none;
  }
  
  .timeline-items {
    flex-direction: column;
    gap: var(--space-32);
  }
  
  .timeline-item {
    width: 100%;
    flex-direction: row;
    text-align: left;
    gap: var(--space-24);
  }
  
  .timeline-node {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --space-160: 80px;
    --space-120: 64px;
    --space-96: 48px;
    --space-80: 32px;
  }
  
  .container {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .flex-column-mobile {
    flex-direction: column;
    width: 100%;
  }

  
  .stat-card {
    padding: var(--space-24) var(--space-16);
  }
  
  .stat-number {
    font-size: 48px;
  }
  
  .modal {
    padding: var(--space-16);
  }
  
  .modal-body {
    padding: var(--space-24);
  }
}

@media (max-width: 576px) {
  body {
    font-size: 16px;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .container {
    padding-left: var(--space-20);
    padding-right: var(--space-20);
  }
  
  h1 {
    font-size: 38px;
  }
}

/* Dashboard Portal Responsive */
@media (max-width: 992px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-24);
  }

  .content-area {
    padding: 16px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .support-layout, .sales-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: 16px !important;
  }

  .form-panel, .history-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 18px 14px !important;
    overflow: hidden !important;
  }

  .table-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .data-table {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Universal safety against form elements overflowing cards on mobile */
  .form-control, input, select, textarea, button, .multi-select-container, .search-input {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Accessibility: Touch targets & WCAG AA contrast helpers */
@media (max-width: 768px) {
  .btn, button:not(.hamburger), input[type="button"], input[type="submit"], .chip, .social-link, .mobile-menu .nav-link, .lang-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .filter-chips, .social-links, .lang-switch {
    gap: 8px !important;
  }
}




/* Uzun logo yazısı */
@media (max-width: 576px) {
  .logo { font-size: 16px; letter-spacing: 0.05em; }
  .loader-logo-text { font-size: 20px; letter-spacing: 0.06em; }
}

/* Tuğra: uzun logo ile menü sığsın */
@media (min-width: 992px) and (max-width: 1399px) {
  .nav-menu { gap: 18px; }
  .nav-menu a { font-size: 14px; }
}
