/**
 * DR. RAGHAVENDER KOSGI — OFFICIAL PRACTICE WEBSITE
 * Responsive Stylesheet
 * Strict mobile-first and viewport-specific adaptations
 * Tested for: 320px, 360px, 375px, 390px, 414px, 576px, 768px, 1024px, 1280px, 1440px, 1920px
 */

/* ==========================================================================
   Mobile-First Base Rules
   ========================================================================== */

/* Touch Target Minimums */
button,
.btn,
.btn-medical,
.nav-link,
.dropdown-item,
.accordion-button,
a.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Container safety to eliminate horizontal scroll */
.container,
.container-fluid {
  width: 100%;
  padding-right: 16px;
  padding-left: 16px;
  margin-right: auto;
  margin-left: auto;
  max-width: 1240px;
}

/* ==========================================================================
   Breakpoint: Extra Small Devices (Up to 575px)
   Including 320px, 360px, 375px, 390px, 414px
   ========================================================================== */
@media (max-width: 575.98px) {
  /* Prevent word break issues on compact viewports */
  h1 {
    font-size: 1.85rem !important;
    line-height: 1.25;
    word-break: break-word;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  .section-py {
    padding: 44px 0;
  }

  .section-py-lg {
    padding: 56px 0;
  }

  /* Top Bar Mobile Treatment */
  .top-bar {
    font-size: 0.75rem;
    padding: 6px 0;
  }

  .top-bar .d-none-xs {
    display: none !important;
  }

  .top-bar .top-bar-item {
    justify-content: center;
    width: 100%;
  }

  /* Hero adjustments */
  .hero-section {
    padding: 36px 0 46px;
  }

  .hero-highlights {
    gap: 8px;
  }

  .hero-highlight-pill {
    width: 100%;
    font-size: 0.8rem;
  }

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

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

  .hero-portrait-card {
    padding: 8px;
    max-width: 320px;
    margin: 20px auto 0;
  }

  .hero-portrait-img {
    height: 320px;
  }

  .hero-experience-badge {
    position: static;
    transform: none;
    margin-top: 14px;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  /* Credentials bar */
  .credentials-bar {
    padding: 20px 0;
  }

  .credential-item {
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
    padding: 12px 6px;
  }

  .credential-item:last-child {
    border-bottom: none;
  }

  /* Specialty Cards */
  .specialty-card {
    padding: 20px 16px;
  }

  /* Content Cards */
  .content-card {
    padding: 20px 16px;
  }

  /* Clinic Location Cards */
  .clinic-location-card {
    padding: 20px 16px;
  }

  .clinic-actions .btn-medical {
    width: 100%;
  }

  /* Footer on mobile */
  .main-footer {
    padding-top: 44px;
  }

  .footer-heading {
    margin-top: 24px;
  }

  .floating-contact-pill {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Breakpoint: Small to Medium Devices (576px to 767px)
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section {
    padding: 48px 0;
  }

  .hero-portrait-img {
    height: 360px;
  }

  .section-py {
    padding: 54px 0;
  }

  .credential-item {
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
  }

  .credential-item:nth-child(even) {
    border-bottom: none;
  }
}

/* ==========================================================================
   Breakpoint: Tablets / Medium Viewports (768px to 991px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar-nav .nav-link {
    padding: 14px 8px !important;
    font-size: 0.88rem;
  }

  .hero-portrait-img {
    height: 400px;
  }

  .credential-item {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   Breakpoint: Desktops & Large Screens (992px and above)
   ========================================================================== */
@media (min-width: 992px) {
  /* Show dropdown on hover for desktop UX while maintaining click support */
  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
    animation: fadeInMenu 0.2s ease forwards;
  }

  @keyframes fadeInMenu {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ==========================================================================
   Accessibility & Reduced Motion Preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
  .top-bar,
  .main-header,
  .floating-contact-pill,
  .back-to-top,
  .navbar-toggler,
  .btn-medical,
  .footer-bottom {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

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

  .content-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

