/* ==========================================================================
   Jivandhara Hospital CSS Stylesheet
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties / Design Tokens */
:root {
  /* Color Palette */
  --primary-hsl: 218, 57%, 23%;
  --primary: hsl(var(--primary-hsl)); /* Deep Trust Blue #1a365d */
  --primary-light: hsl(218, 50%, 30%);
  --primary-dark: hsl(218, 60%, 15%);
  
  --accent-hsl: 199, 89%, 48%;
  --accent: hsl(var(--accent-hsl)); /* Teal Accent #0ea5e9 */
  --accent-light: hsl(199, 90%, 95%);
  --accent-dark: hsl(199, 90%, 38%);
  
  --success-hsl: 142, 70%, 45%;
  --success: hsl(var(--success-hsl)); /* Vibrant Teal-Green #10b981 */
  --success-light: hsl(142, 60%, 95%);
  
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  
  /* Layout & Spacing */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease-out;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(26, 54, 93, 0.08), 0 4px 6px -2px rgba(26, 54, 93, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(26, 54, 93, 0.12), 0 10px 10px -5px rgba(26, 54, 93, 0.06);
  --shadow-hover: 0 25px 50px -12px rgba(26, 54, 93, 0.2);
  
  /* Scroll Margin for Sticky Nav */
  scroll-padding-top: 80px;
}

/* Reset and Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-white);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 6rem 5rem;
}

.section-bg {
  background-color: var(--bg-light);
}

.section-title-wrapper {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.badge {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  min-height: 48px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-light);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-emergency {
  background-color: #ef4444;
  color: var(--bg-white);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-emergency:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Sticky Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  color: var(--bg-white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 550;
  font-size: 0.95rem;
  color: var(--text-main);
  position: relative;
  padding-block: 0.5rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
}

.nav-cta-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  position: absolute;
  left: 0;
  transition: var(--transition-smooth);
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* Hero Section */
.hero {
  padding-block: 5rem;
  background: radial-gradient(circle at 80% 20%, var(--accent-light) 0%, var(--bg-white) 70%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  max-width: 620px;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 1 / 1;
  transition: var(--transition-smooth);
}

.hero-image-wrapper:hover .hero-image {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.hero-badge {
  position: absolute;
  bottom: 2rem;
  left: -2rem;
  background-color: var(--bg-white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 4s ease-in-out infinite;
}

.hero-badge-icon {
  background-color: var(--success-light);
  color: var(--success);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.hero-badge-text h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-badge-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* About & Infrastructure Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-card:hover::before {
  transform: scaleY(1);
}

.feature-icon-box {
  width: 60px;
  height: 60px;
  background-color: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-box {
  background-color: var(--accent);
  color: var(--bg-white);
}

.feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Departments Section */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.dept-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.dept-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.dept-header {
  padding: 2rem 2rem 1.5rem;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.dept-card:hover .dept-header {
  background-color: var(--accent-light);
}

.dept-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dept-icon {
  font-size: 2.25rem;
}

.dept-partnership {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.dept-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.dept-body {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dept-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.dept-services {
  list-style: none;
  margin-bottom: 2rem;
  margin-top: auto;
}

.dept-services li {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dept-services li::before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
}

.dept-cta {
  width: 100%;
  margin-top: auto;
}

/* Appointment Form Section */
.appointment-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.appointment-info {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.appointment-info-content h2 {
  color: var(--bg-white);
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.appointment-info-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
}

.appointment-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.appointment-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.appointment-detail-icon {
  background-color: rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.appointment-detail-text h4 {
  color: var(--bg-white);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.appointment-detail-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.appointment-form-wrapper {
  padding: 3.5rem;
}

.appointment-form-wrapper h3 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.form-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

@media (pointer: coarse) {
  .form-control {
    min-height: 52px;
  }
}

.form-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Photo Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 54, 93, 0.9) 0%, rgba(26, 54, 93, 0.2) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: var(--transition-smooth);
}

.gallery-overlay-icon {
  background-color: var(--accent);
  color: var(--bg-white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.gallery-overlay h4 {
  color: var(--bg-white);
  font-size: 1.15rem;
  font-weight: 700;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  transition-delay: 0.05s;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  transition-delay: 0.1s;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay-icon,
.gallery-item:hover .gallery-overlay h4,
.gallery-item:hover .gallery-overlay p {
  transform: translateY(0);
}

/* Patient Reviews Section */
.reviews-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #fef3c7;
  color: #d97706;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.review-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: var(--transition-smooth);
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.review-quote {
  font-size: 2.5rem;
  color: var(--accent-light);
  line-height: 1;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: Georgia, serif;
}

.review-stars {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
}

.review-avatar {
  width: 44px;
  height: 44px;
  background-color: var(--accent);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.2);
}

.review-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.review-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer Section */
.footer {
  background-color: var(--primary);
  color: var(--bg-white);
  padding-block: 5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h3 {
  color: var(--bg-white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

.footer-about .logo {
  color: var(--bg-white);
  margin-bottom: 1rem;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.footer-contact-icon {
  color: var(--accent);
  font-size: 1.15rem;
  margin-top: 0.2rem;
}

.footer-contact-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-contact-text strong {
  color: var(--bg-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-legal-links a:hover {
  color: var(--accent);
}

/* Custom Modal Dialog Box Styling (HTML5 <dialog>) */
.dialog-modal {
  margin: auto;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 520px;
  padding: 3rem 2.5rem;
  background-color: var(--bg-white);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Backdrop */
.dialog-modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

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

.modal-content {
  text-align: center;
}

.modal-success-icon {
  width: 72px;
  height: 72px;
  background-color: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
}

.modal-content h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.modal-content p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.modal-details {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.modal-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

.modal-details-grid strong {
  color: var(--primary);
}

.modal-details-grid span {
  color: var(--text-main);
}

.modal-close-btn {
  width: 100%;
}

/* Visually Hidden Class for Accessibility */
.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Keyboard Focus States for Accessibility */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Responsive Styles */

/* Medium Devices (Tablets, 1024px and down) */
@media (max-width: 1024px) {
  :root {
    scroll-padding-top: 70px;
  }
  
  .header {
    height: auto;
  }
  
  .nav-container {
    height: 70px;
  }
  
  .hero-grid {
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .appointment-container {
    grid-template-columns: 1fr;
  }
  
  .appointment-info {
    padding: 3rem;
  }
  
  .appointment-info-content p {
    margin-bottom: 1.5rem;
  }
  
  .appointment-form-wrapper {
    padding: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  
  .footer-col-map {
    grid-column: span 2;
  }
}

/* Small Devices (Mobile, 768px and down) */
@media (max-width: 768px) {
  .section {
    padding-block: 4rem 3rem;
  }
  
  .section-title {
    font-size: 1.85rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: var(--transition-smooth);
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-cta {
    display: none; /* Show inside menu on small screen or handle differently */
  }
  
  .nav-cta-mobile {
    display: block;
    width: 100%;
    padding-inline: 1.5rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    order: 1;
  }
  
  .hero-image-wrapper {
    max-width: 480px;
    margin-inline: auto;
    order: 2;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-badge {
    left: 1rem;
    bottom: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .departments-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-inline: auto;
  }
  
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-col-map {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

/* Extra Small Devices (Portrait Mobile, 480px and down) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .appointment-info,
  .appointment-form-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .form-group-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .hero-badge {
    display: none;
  }
  
  .dialog-modal {
    padding: 2rem 1.5rem;
  }
}
