html, body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {

  html {
    scroll-behavior: smooth;
  }

  /* ====================
     Navbar
  ==================== */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 60px;
    width: 100%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 1002;
  }

  .logo img {
    height: 40px;
    max-height: 40px;
  }

  .desktop-menu,
  .desktop-only,
  .contact-btn {
    display: none !important;
  }

  /* ====================
     Hero Section
  ==================== */
  .hero {
    padding: 6rem 1rem 4rem;
    text-align: center;
  }

  .hero h1,
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero p,
  .hero-text p {
    font-size: 1rem;
    padding-left: 0.75rem;
    border-left-width: 3px;
  }

  .hero-flex {
    flex-direction: column;
    text-align: center;
  }

  .hero-text,
  .hero-image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .hero-image img {
    max-width: 300px;
    width: 100%;
  }

  /* ====================
     Section Titles & Subtitles
  ==================== */
  .section-title,
  .section-heading {
    font-size: 1.75rem;
    text-align: center;
  }

  .section-subtitle {
    font-size: 1rem;
    text-align: center;
    padding: 0 1rem;
  }

  /* ====================
     Card & Feature Sections
  ==================== */
  .card {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .card p {
    font-size: 0.95rem;
  }

  .card .icon {
    font-size: 2.5rem;
    padding: 0.8rem;
  }

  .features,
  .skills-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  /* ====================
     CTA Section
  ==================== */
  .cta {
    padding: 3rem 1rem;
    text-align: center;
  }

  .cta h2 {
    font-size: 1.6rem;
  }

  .cta p,
  .cta .btn,
  .cta .btn-outline {
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }

  /* ====================
     Specialist Section
  ==================== */
  .specialist-wrapper,
  .specialist-content,
  .specialist-details {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    align-items: center;
  }

  .specialist-image img {
    max-width: 300px;
    margin: 0 auto;
  }

  .specialist-details h3 {
    font-size: 1.5rem;
  }

  .specialist-details p,
  .expertise-item {
    font-size: 1rem;
  }

  .specialist-content .info-block {
    padding: 1rem;
    text-align: left;
  }

  .specialist-content h4 {
    font-size: 1.1rem;
  }

  .specialist-content ul {
    font-size: 0.95rem;
  }

  /* ====================
     Service Sections
  ==================== */
  .service-wrapper {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .service-text,
  .service-image {
    flex: 1 1 100%;
  }

  .service-image img {
    max-width: 100%;
    border-radius: 0.75rem;
  }

  .service-btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }

  .service-specialties-grid,
  .conditions-grid,
  .experience-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* ====================
     ENT Scroll Section
  ==================== */
  .ent-scroll-container {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .ent-box {
    flex: 0 0 240px;
    padding: 1rem;
  }

  .ent-box img {
    height: 140px;
  }

  .ent-box h4 {
    font-size: 1rem;
  }

  .ent-box ul {
    font-size: 0.9rem;
  }

  /* ====================
     Scroll Tips
  ==================== */
  .scroll-content {
    gap: 1rem;
  }

  .tip-card {
    min-width: 180px;
    padding: 0.75rem;
  }

  /* ====================
     Google Reviews
  ==================== */
  .review-cards {
    flex-direction: column;
    align-items: center;
  }

  .review-card {
    max-width: 90%;
  }

  /* ====================
     Case Studies
  ==================== */
  .case-card {
    padding: 1.5rem;
  }

  .case-card h3 {
    font-size: 1.1rem;
  }

  .case-card ul li {
    font-size: 0.95rem;
  }
/*contact*/
  .contact-wrapper {
    grid-template-columns: 1fr !important;
  }

  .map-container iframe {
    height: 250px !important;
  }
  /* ====================
     Clinical Experience
  ==================== */
  .experience-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .experience-card img {
    margin-bottom: 0.5rem;
  }

  /* ====================
     Footer Section
  ==================== */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .subscribe-form {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .subscribe-form input,
  .subscribe-form button {
    width: 100%;
    max-width: 400px;
  }

  .social-icons {
    justify-content: center;
  }

  .brand-name {
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: bold;
    white-space: nowrap;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* ====================
     Global Layout & Spacing
  ==================== */
  section {
    padding: 2rem 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .why-choose h2 {
    font-size: 1.8rem;
  }

  /*gallery*/
  .gallery-section {
  padding: 6rem 1.5rem;
  background-color: #f9fafb;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .caption {
  opacity: 1;
}

}
