/* ============================================
   Responsive Breakpoints — CSoft Healthcare (responsive.css)
   ============================================
   Loaded after style.css. Overrides layout at three widths:

   @1024px — Tablet landscape: 2-col grids, stacked hero, compact nav
   @768px  — Tablet portrait: single-col cards, smaller type, tighter sections
   @480px  — Mobile: hamburger nav visible, full-width buttons, blog banner tweaks

   Breakpoint strategy: desktop-first (max-width queries).
   Pair with main.js mobile-nav toggle (.hamburger / .mobile-nav.active).
   ============================================ */

/* Tablet Landscape — 1024px and below */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.4rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .hero {
    padding: 80px 0 48px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-visual {
    order: -1;
    justify-content: center;
  }

  .hero-slideshow {
    max-width: 480px;
    margin: 0 auto;
  }

  .hero-slides {
    aspect-ratio: 16 / 10;
  }

  .platform-overview {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

  .product-hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-hero-buttons,
  .hero-buttons {
    gap: 14px;
  }

  .interop-visual {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .solution-detail {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .solution-detail.reverse {
    direction: ltr;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  .hero {
    padding: 72px 0 40px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat strong {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .nav-links,
  .nav-actions .btn:not(.btn-whatsapp) {
    display: none;
  }

  .nav-dropdown,
  .dropdown-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-inner {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .mobile-nav {
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .nav-actions .btn-whatsapp {
    display: inline-flex;
    min-height: 44px;
  }

  .header-search.active .header-search-input {
    width: min(180px, 38vw);
  }

  .site-search-form {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    right: max(20px, env(safe-area-inset-right, 0px));
  }

  .card-grid,
  .problem-grid,
  .solutions-grid,
  .blog-grid,
  .ai-features,
  .benefits-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-banner h1 {
    font-size: 2.2rem;
  }

  .product-hero-text h1 {
    font-size: 2.2rem;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .product-hero-visual {
    min-height: 260px;
    padding: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .interop-standards {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile — 480px and below */
@media (max-width: 480px) {
  .logo-name {
    font-size: 1.15rem;
  }

  .site-header .logo-tagline {
    font-size: 0.7rem;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
  }
  :root {
    --section-padding: 56px 0;
    --container-padding: 0 16px;
  }

  .hero {
    padding: 64px 0 36px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-buttons,
  .product-hero-buttons {
    flex-direction: column;
  }

  /* Homepage hero — keep CTA pair side by side on mobile */
  .hero .hero-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

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

  .product-hero-buttons .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .hero .hero-buttons .btn {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 14px;
    font-size: 0.82rem;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .card-grid,
  .problem-grid,
  .solutions-grid,
  .blog-grid,
  .ai-features,
  .benefits-grid,
  .why-grid,
  .leadership-grid,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 28px;
  }

  .page-banner {
    padding: 120px 0 48px;
  }

  .page-banner h1 {
    font-size: 1.8rem;
  }

  .product-hero {
    padding: 120px 0 56px;
  }

  .product-hero-text h1 {
    font-size: 1.8rem;
  }

  .product-hero-visual {
    min-height: 220px;
    padding: 22px;
  }

  .product-hero-visual svg {
    max-width: 100%;
  }

  .header-search.active {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    z-index: 1002;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
  }

  .header-search.active .header-search-input {
    width: min(240px, calc(100vw - 96px));
  }

  .cta-section {
    padding: 56px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  .contact-form-card,
  .contact-info-card {
    padding: 24px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .trust-bar-inner {
    flex-direction: column;
    gap: 20px;
  }

  .interop-standards {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .blog-article-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .blog-article-cta .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .blog-article-featured {
    max-height: 280px;
  }

  .page-banner--blog-article {
    padding-top: 100px;
  }

  .blog-article-banner-fluid img {
    height: 120px;
  }

  .blog-article-page .page-banner--blog-article + .section {
    padding-top: 32px;
  }
}
