/**
 * Zenith GST Calculator - Responsive Media Queries
 * Mobile-first & multi-breakpoint optimization: 320px, 360px, 375px, 414px, 768px, 1024px, 1440px, 1920px
 */

/* Medium Screens & Tablets (max-width: 992px) */
@media screen and (max-width: 992px) {
  .calc-card-wrapper {
    grid-template-columns: 1fr;
  }

  .calc-inputs-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile Devices & Small Tablets (max-width: 768px) */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 62px;
  }

  /* Hamburger Navigation */
  .nav-toggle-btn {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    gap: 0.25rem;
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    z-index: 99;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Hero Section */
  .hero-section {
    padding: 1.75rem 0 1rem 0;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  /* Calculator Layout on Mobile */
  .calculator-section {
    padding: 0.5rem 0 2rem 0;
  }

  .calc-inputs-panel {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }

  .calc-results-panel {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }

  .rate-chips-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .rate-chip {
    height: 46px;
    font-size: 0.9rem;
  }

  .final-amount-value {
    font-size: 1.75rem;
  }

  .calc-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-height: 48px;
  }

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

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Small Mobile Screens (max-width: 480px) */
@media screen and (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

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

  .rate-chips-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tax-type-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .segmented-label {
    padding: 0.6rem 0.35rem;
    font-size: 0.88rem;
  }

  .form-control-amount {
    font-size: 1.25rem;
    height: 50px;
  }

  .presets-wrapper {
    gap: 0.35rem;
  }

  .preset-btn {
    font-size: 0.76rem;
    padding: 0.3rem 0.5rem;
  }

  .final-amount-value {
    font-size: 1.6rem;
  }

  .table-wrapper {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: var(--radius-md);
  }

  .rate-table th, 
  .rate-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }
}

/* Extra Small Screens: 320px - 360px */
@media screen and (max-width: 360px) {
  .rate-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand-icon,
  .brand-logo {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .final-amount-value {
    font-size: 1.4rem;
  }

  .custom-rate-inner {
    max-width: 100%;
  }
}

/* Large Screens: 1440px - 1920px */
@media screen and (min-width: 1440px) {
  .calc-container {
    max-width: 1100px;
  }

  .container {
    max-width: 1200px;
  }
}
