/* =====================================================================
   CARDIO NEURO CARE CLINIC — MASTER DESIGN SYSTEM
   Premium • Warm • Trust-Driven Specialist Aesthetic
   "Sapphire & Copper" Theme
   ===================================================================== */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Sapphire & Copper Palette */
  --color-primary: #1B2A4A;              /* Deep Sapphire (Institutional Trust) */
  --color-primary-accent: #C17F59;       /* Burnished Copper (Warmth & Care) */
  --color-primary-hover: #253A5E;
  --color-primary-light: rgba(193, 127, 89, 0.1); 
  --color-primary-gradient: linear-gradient(135deg, #1B2A4A, #253A5E);
  --color-accent-gradient: linear-gradient(135deg, #C17F59, #D4956A);

  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 253, 248, 0.85);
  --glass-border: rgba(193, 127, 89, 0.15);
  --glass-blur: 16px;
  --glass-shadow: 0 8px 32px 0 rgba(27, 42, 74, 0.07);

  /* Accent Colors */
  --color-accent-green: #C17F59;
  --color-accent-green-hover: #A86B48;
  --color-accent-green-light: #FFF5ED;

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-bg: #FFFDF8;
  --color-bg-alt: #F7F3EE;
  --color-bg-soft: #FBF9F6;
  --color-text-primary: #1B2A4A;
  --color-text-secondary: #5A6A7E;
  --color-text-light: #8B95A5;
  --color-divider: #E8E2D9;
  --color-dark: #1B2A4A;
  --color-dark-lighter: #253A5E;

  /* Typography */
  --font-family: 'Inter', system-ui, sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.75rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 2.5rem;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --space-5xl: 48px;
  --space-6xl: 60px;
  --space-7xl: 80px;

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(27, 42, 74, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 8px 30px rgba(27, 42, 74, 0.1);
  --shadow-xl: 0 12px 40px rgba(27, 42, 74, 0.12);
  --shadow-card-hover: 0 12px 32px rgba(193, 127, 89, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --container-max: 1200px;
  --navbar-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.text-sm {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.text-xs {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

/* --- Section Styles --- */
.section {
  padding: var(--space-6xl) 0;
}

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

/* --- Global Page Hero (Unified Banner System) --- */
.page-hero {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
  padding: calc(var(--navbar-height) + 80px) 0 var(--space-7xl);
  text-align: center;
  color: var(--color-white);
}

.page-hero .mesh-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, #1B2A4A 0%, transparent 50%),
              radial-gradient(circle at 30% 70%, #4A2C1B 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, #1B2A4A 0%, transparent 100%);
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-md);
}

.page-hero .breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  opacity: 0.8;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-5xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.section-header p {
  font-size: var(--font-size-lg);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .section-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: var(--space-xs) var(--space-lg);
  border-radius: 50px;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Button System --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: all var(--transition-normal);
  white-space: nowrap;
  line-height: 1.5;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(11, 94, 215, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(11, 94, 215, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

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

.btn-whatsapp {
  background: var(--color-accent-green);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.btn-whatsapp:hover {
  background: var(--color-accent-green-hover);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-lg);
}

.btn-ghost:hover {
  background: var(--color-primary-light);
}

.btn-sm {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-lg) var(--space-3xl);
  font-size: var(--font-size-lg);
}

/* --- Card Base --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.speciality-card {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  transition: all var(--transition-normal);
}

.speciality-card .speciality-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto var(--space-lg);
  transition: all var(--transition-normal);
  color: var(--color-primary-accent);
}

.speciality-card h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

.speciality-card:hover {
  background: var(--color-primary) !important;
  border-color: transparent !important;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(18, 20, 29, 0.4) !important;
}

.speciality-card:hover h3,
.speciality-card:hover p,
.speciality-card:hover .doctor-count,
.speciality-card:hover .btn-ghost {
  color: var(--color-white) !important;
}

.speciality-card:hover .speciality-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--color-white) !important;
}

.speciality-card:hover .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* --- Grid Utilities --- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

/* --- Badge / Tag --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 50px;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.badge-green {
  background: var(--color-accent-green-light);
  color: var(--color-accent-green);
}

.badge-blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* --- Rating Stars --- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating-stars {
  color: #F59E0B;
  font-size: var(--font-size-sm);
  letter-spacing: 1px;
}

.rating-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-2xl); }

  .section { padding: var(--space-5xl) 0; }
}

@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-xl); }

  body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
  }

  .container {
    padding: 0 var(--space-lg);
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .section { padding: var(--space-4xl) 0; }
  .section-header { margin-bottom: var(--space-3xl); }

  /* Hero/Banner Fix for Floating Navbar Overlap */
  .hero, 
  .page-hero {
    padding-top: 110px !important;
    min-height: auto !important;
  }

  /* Iframe Responsiveness (Issue #4) */
  iframe {
    height: 500px !important;
    border-radius: var(--radius-lg);
    width: 100% !important;
  }

  /* Spacing at bottom of doctor pages to clear CTA bar */
  .doctor-detail-section {
    padding-bottom: 140px !important;
  }

  .btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--font-size-base);
  }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
