/**
 * Responsive Styles: Breakpoints for Mobile, Tablet, Laptop, and Desktop
 */

/* ==========================================================================
   Laptop & Medium Desktops (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-search-form {
    grid-template-columns: 1fr 1fr;
  }

  .hero-search-btn {
    grid-column: span 2;
  }

  .hero-search-form--simple,
  .hero-search-form:has(> .search-input-field:only-of-type) {
    grid-template-columns: 1fr auto;
  }

  .hero-search-form--simple .hero-search-btn,
  .hero-search-form:has(> .search-input-field:only-of-type) .hero-search-btn {
    grid-column: auto;
  }

  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .news-hero-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Tablets & Medium Screens (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
  }

  /* Header adjustments: Hide desktop nav & Show mobile toggle from 991px */
  .main-nav {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: inline-flex !important;
  }

  .site-logo img {
    height: 70px;
  }
}

/* ==========================================================================
   Tablets & Phablets (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 66px;
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.45rem;
  }

  /* Topbar Hide non-essential */
  .topbar-ticker-text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-date {
    display: none;
  }

  /* Header adjustments */
  .main-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  /* Hero adjustments */
  .hero-section {
    padding: var(--space-xl) 0;
  }

  .hero-search-form,
  .hero-search-form--simple {
    grid-template-columns: 1fr;
  }

  .hero-search-btn,
  .hero-search-form--simple .hero-search-btn {
    grid-column: auto;
    width: 100%;
  }

  .hero-quick-tags {
    justify-content: flex-start;
  }

  /* Jobs & Cards */
  .jobs-grid {
    grid-template-columns: 1fr;
  }

  .job-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .job-list-item-action {
    width: 100%;
    justify-content: flex-end;
  }

  .categories-grid {
    gap: var(--space-sm);
  }

  .category-card {
    flex: 0 0 155px;
    width: 155px;
    min-width: 155px;
  }

  .employer-card {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
  }

  .city-pill {
    flex: 0 0 175px;
    width: 175px;
    min-width: 175px;
  }

  .newsletter-card {
    grid-template-columns: 1fr;
    padding: var(--space-xl);
    gap: var(--space-lg);
  }

  .newsletter-input-group {
    flex-direction: column;
  }

  .newsletter-input-group .btn {
    width: 100%;
  }

  /* Filters on listing pages */
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filters-search-only {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-search-only .filters-actions {
    width: 100%;
  }

  .filters-search-only .filters-actions .btn {
    flex: 1;
  }

  /* Job detail hero */
  .job-header-details {
    flex-direction: column;
  }

  .job-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .job-header-actions .btn {
    flex: 1;
  }

  /* AdSense Slots */
  .ad-slot--leaderboard {
    min-height: 80px;
    max-width: 100%;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    max-width: 100%;
  }
}

/* ==========================================================================
   Small Mobile Phones (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --header-height: 60px;
    --font-size-3xl: 1.5rem;
    --font-size-xl: 1.25rem;
  }

  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .topbar-content {
    justify-content: center;
  }

  .topbar-left {
    display: none;
  }

  .country-btn span.country-name {
    display: none;
  }

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

  .stat-card {
    padding: var(--space-md);
  }

  .categories-grid {
    gap: 10px;
    padding-bottom: 10px;
  }

  .category-card {
    flex: 0 0 142px;
    width: 142px;
    min-width: 142px;
    padding: var(--space-md) var(--space-xs);
  }

  .category-icon {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }

  .employers-grid {
    gap: 10px;
    padding-bottom: 10px;
  }

  .employer-card {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    padding: 10px 12px;
  }

  .employer-avatar {
    width: 42px;
    height: 42px;
  }

  .city-pill {
    flex: 0 0 165px;
    width: 165px;
    min-width: 165px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xs);
  }

  .footer-legal-links {
    justify-content: center;
  }

  .news-card-mini {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-mini-thumb {
    width: 100%;
    height: 140px;
  }
}

/* Print Stylesheet */
@media print {
  .site-topbar,
  .site-header,
  .mobile-drawer,
  .drawer-backdrop,
  .ad-slot-wrapper,
  .newsletter-card,
  .back-to-top,
  .site-footer,
  .filters-bar,
  .job-bookmark-btn {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
}
