/* ==========================================================================
   JYOTI CLINIC - 5-STAR LUXURY LIGHT THEME DESIGN SYSTEM
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Default 5-Star Medical Light Theme Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-inverse: #ffffff;

  --primary-cyan: #0284c7;
  --primary-cyan-glow: rgba(2, 132, 199, 0.2);
  --primary-blue: #0369a1;
  --accent-gold: #d97706;
  --accent-gold-glow: rgba(217, 119, 6, 0.2);
  --accent-emerald: #059669;

  --border-color: rgba(2, 132, 199, 0.12);
  --border-highlight: rgba(2, 132, 199, 0.35);

  --shadow-sm: 0 4px 14px rgba(2, 132, 199, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(2, 132, 199, 0.12);
  --shadow-cyan: 0 10px 30px rgba(2, 132, 199, 0.2);
}

[data-theme="dark"] {
  --bg-primary: #040d1a;
  --bg-secondary: #0b192c;
  --bg-card: rgba(15, 28, 50, 0.88);
  --bg-card-hover: rgba(22, 42, 75, 0.95);
  --bg-glass: rgba(8, 18, 36, 0.92);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #040d1a;

  --primary-cyan: #00e5ff;
  --primary-cyan-glow: rgba(0, 229, 255, 0.35);
  --primary-blue: #0284c7;
  --accent-gold: #fbbf24;
  --accent-gold-glow: rgba(251, 191, 36, 0.3);
  --accent-emerald: #10b981;

  --border-color: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(0, 229, 255, 0.45);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-cyan: 0 0 25px rgba(0, 229, 255, 0.25);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  font-size: 17px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.25;
}

/* Larger, airier layout defaults to make the site feel bigger and longer */
h1 { font-size: 3.5rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

.section { padding: 4.5rem 0; }

/* Expand container for wider layouts on desktop */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Make hero taller and more dramatic */
.large-hero { min-height: 100vh; }

a {
  color: inherit;
  text-decoration: none;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Luxury Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-4px);
}

.glass-nav {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.3);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

.btn-gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.45);
}

/* Badges */
.badge-5star {
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: #d97706;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-cyan {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--primary-cyan);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Text Gradients */
.text-gradient-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Top Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  padding: 8px 0;
  color: #cbd5e1;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-cyan);
  background: rgba(2, 132, 199, 0.08);
}

.nav-link.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 28px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
}

[data-theme="dark"] .modal-card {
  background: #0b182b;
  color: #f8fafc;
}

/* FAQ Accordion Styling */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-cyan);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 24px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-answer {
  display: none;
  padding: 0 24px 20px 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-cyan);
}

/* Single Floating Action Button (Only Book Appt) */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan);
}

/* Mobile-friendly improvements */
img, video, picture {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure CTAs are easy to tap on small screens and wrap text when needed */
.btn-primary, .btn-secondary, .btn-gold {
  white-space: normal;
}

/* Reduce heavy shadows and hover transforms on mobile for performance */
@media (max-width: 640px) {
  .glass-card, .modal-card, .btn-primary, .btn-secondary, .btn-gold {
    box-shadow: none !important;
    transform: none !important;
  }

  /* Make primary CTAs full width for easier tapping */
  .btn-primary, .btn-gold {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    font-size: 1rem;
  }

  .btn-secondary {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Slightly reduce base font size on very small screens to avoid overflow */
  html { font-size: 15px; }
}

/* Reviews, team, gallery styles */
.reviews-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}
.rating { display:flex; gap:6px; align-items:center; }
.star { color: #f59e0b; font-size: 1.15rem; }
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.review-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case-card { border-radius: 14px; overflow: hidden; border:1px solid var(--border-color); }
.case-card img { width: 100%; height: auto; display:block; }

.gallery-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-grid img { width:100%; height:150px; object-fit:cover; border-radius:10px; }

.team-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.team-card { text-align:center; padding:14px; border-radius:12px; background:var(--bg-card); border:1px solid var(--border-color); }
.team-card img { width:84px; height:84px; object-fit:cover; border-radius:50%; margin:0 auto 8px auto; }

@media (max-width: 768px) {
  .case-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .team-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 480px) {
  .gallery-grid img { height:120px; }
  .team-card img { width:72px; height:72px; }
  .team-grid { grid-template-columns: 1fr; }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .top-bar-full-details {
    display: none !important;
  }
  .top-bar-mobile-summary {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.75rem;
  }
  
  .desktop-nav-cta {
    display: none !important;
  }
  .desktop-nav-links {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }

  .container {
    padding: 0 14px;
  }

  /* Scale headings on small screens to retain hierarchy without overflow */
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.5rem !important; }

  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  h2 {
    font-size: 1.5rem !important;
  }
  
  .glass-card {
    padding: 18px !important;
    border-radius: 20px;
  }

  .floating-actions {
    bottom: 14px;
    right: 14px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff;
    color: #000000;
    padding: 24px;
  }
}
