:root {
  --mobile-breakpoint: 580px;
  --tablet-breakpoint: 880px;
  --desktop-breakpoint: 1200px;
}

@media (max-width: 1400px) {
  .container {
    width: min(92%, 1100px);
  }
}

@media (max-width: 1200px) {
  .container {
    width: min(92%, 1024px);
  }
}

/* Desktop range 1000-1500px - ensure consistent reduced hero height */
@media (max-width: 1500px) and (min-width: 1000px) {
  .hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  }
  
  .home2-hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  }
  
  .hero-content {
    padding: 0.75rem 0;
  }
}


/* iPad Pro 12.9" (1024 x 1366) - Portrait */
@media (max-width: 1024px) and (min-width: 993px) and (max-height: 1366px) {
  .hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }

  .home2-hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }

  .hero-content {
    padding: 0.75rem 0;
  }
}

/* Tablet range 680-999px - consistent hero sizing */
@media (max-width: 999px) and (min-width: 681px) {
  .hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }

  .home2-hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }
}

@media (max-width: 1200px) {
  .search-panel form {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-panel label {
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
  }

  .search-panel select,
  .search-panel input {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
  }

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

@media (max-width: 992px) {
  .grid.three-col,
  .blog-grid,
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }
  
  .cta-bar {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

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

  .hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }

  .home2-hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1rem, 2vw, 1.5rem) 0;
  }
}

@media (max-width: 880px) {
  .section {
    padding: clamp(2.5rem, 7vw, 4rem) 0;
  }

  .section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .section-description {
    font-size: 0.95rem;
  }

  .cta-banner {
    padding: clamp(2.5rem, 7vw, 4rem);
  }

  .footer-newsletter form {
    flex-direction: column;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 680px) {
  h1 {
    font-size: clamp(2.1rem, 8vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.75rem, 6vw, 2.1rem);
  }

  h3 {
    font-size: clamp(1.35rem, 4.5vw, 1.6rem);
  }

  .container {
    width: min(92%, 640px);
  }

  .hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  }
  
  .hero-content {
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    align-items: center;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .hero-title {
    gap: clamp(0.125rem, 0.75vw, 0.375rem);
    align-items: center;
    text-align: center;
  }
  
  .hero-title h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: clamp(0.125rem, 0.5vw, 0.375rem);
    text-align: center;
  }
  
  .hero-title p {
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    text-align: center;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    margin: clamp(0.125rem, 0.25vw, 0.25rem) 0;
    justify-content: center;
  }

  .stat-label {
    white-space: normal;
    font-size: clamp(0.7rem, 2vw, 0.85rem);
  }

  .stat-value {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .search-panel {
    padding: clamp(0.5rem, 2vw, 0.75rem);
    margin-top: clamp(0.125rem, 0.25vw, 0.25rem);
    margin-left: auto;
    margin-right: auto;
  }
  
  .search-panel form {
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
  }
  
  .search-panel label {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
  }

  .search-panel select,
  .search-panel input {
    font-size: clamp(0.85rem, 2vw, 1rem);
    padding: clamp(0.65rem, 1.5vw, 0.75rem) clamp(0.75rem, 1.5vw, 0.9rem);
    min-height: 44px;
  }

  .search-panel .search-btn {
    width: 100%;
    max-width: 300px;
    margin: 1rem auto 0;
  }

  @media (max-width: 520px) {
    .search-panel form {
      grid-template-columns: 1fr;
    }

    .search-panel label {
      font-size: 0.85rem;
    }

    .search-panel select,
    .search-panel input {
      font-size: 0.9rem;
      padding: 0.7rem 0.85rem;
    }
  }
  
  .home2-hero {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: clamp(1.5rem, 4vw, 2.5rem) 0;
    gap: clamp(0.5rem, 1.5vw, 1rem);
  }
  
  .home2-hero-content {
    gap: clamp(0.125rem, 0.75vw, 0.375rem);
  }
  
  .home2-hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: clamp(0.125rem, 0.5vw, 0.375rem);
  }
  
  .home2-hero p {
    font-size: clamp(0.75rem, 3vw, 0.9rem);
  }
  
  .home2-hero-media {
    gap: clamp(0.375rem, 1.5vw, 0.625rem);
  }
  
  .home2-hero-card {
    padding: clamp(0.625rem, 2vw, 1rem);
    gap: clamp(0.375rem, 1vw, 0.625rem);
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tabs {
    gap: 0.5rem;
  }

  .tab {
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
  }

  .post-content {
    font-size: 0.95rem;
  }

  .comment {
    font-size: 0.95rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 0.95rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .stat-block {
    padding: 1.35rem;
  }

  .cta-bar {
    text-align: center;
    justify-content: center;
    margin-top: clamp(1.5rem, 3vw, 2rem);
    width: 100%;
  }
  
  .grid.three-col {
    gap: clamp(1rem, 2vw, 1.5rem);
  }
  
  .card {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header .container {
    padding: 0.9rem 0;
  }

  .brand {
    font-size: 1rem;
    white-space: nowrap;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .timeline {
    padding-left: 1.4rem;
  }

  .timeline-item {
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }

  .timeline-item::before {
    left: -1.05rem;
  }

  .auth-tab {
    font-size: 0.8125rem;
    padding: 0.875rem 0.75rem;
  }

  .auth-tabs {
    gap: 0.25rem;
  }

  .auth-page .form-group label {
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .auth-logo h2 {
    font-size: 1.25rem;
  }

  .auth-logo-link {
    gap: 0.75rem;
  }

  .auth-logo img {
    width: 48px;
    height: 48px;
  }

  .hero {
    padding: clamp(1rem, 3vw, 2rem) 0;
  }

  .home2-hero {
    padding: clamp(1rem, 3vw, 2rem) 0;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .stat {
    flex: 0 1 auto;
    min-width: 0;
  }

  .stat-label {
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
  }
}

