/* ============================================================
   CLINICPEER — GLOBAL STYLES & DESIGN TOKENS
   ============================================================ */

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

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --primary:        #0077B6;
  --primary-dark:   #005F92;
  --primary-light:  #00A8E8;
  --secondary:      #00B4D8;
  --accent:         #90E0EF;
  --accent-soft:    #CAF0F8;
  --success:        #2D9D78;
  --warning:        #F7A400;
  --danger:         #E63946;
  --dark:           #0D1B2A;
  --dark-2:         #1A2E44;
  --gray-900:       #1E293B;
  --gray-800:       #334155;
  --gray-700:       #475569;
  --gray-600:       #64748B;
  --gray-500:       #94A3B8;
  --gray-400:       #CBD5E1;
  --gray-300:       #E2E8F0;
  --gray-200:       #F1F5F9;
  --gray-100:       #F8FAFC;
  --white:          #FFFFFF;
  --bg:             #F0F4F8;

  /* Typography */
  --font-main:      'Inter', system-ui, sans-serif;
  --font-display:   'Playfair Display', serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;
  --radius-xl:  2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,119,182,.12);
  --shadow-lg:  0 12px 40px rgba(0,119,182,.18);
  --shadow-xl:  0 24px 64px rgba(0,119,182,.22);
  --shadow-dark: 0 8px 32px rgba(13,27,42,.25);

  /* Transitions */
  --ease:       cubic-bezier(.4,0,.2,1);
  --trans-fast: 150ms var(--ease);
  --trans-base: 300ms var(--ease);
  --trans-slow: 500ms var(--ease);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
  --grad-hero:    linear-gradient(135deg, rgba(0,55,100,0.92) 0%, rgba(0,119,182,0.80) 50%, rgba(0,180,216,0.70) 100%);
  --grad-card:    linear-gradient(145deg, rgba(255,255,255,0.95), rgba(240,244,248,0.85));
  --grad-dark:    linear-gradient(135deg, #0D1B2A 0%, #1A2E44 100%);

  /* Navbar height */
  --navbar-h: 80px;
}

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

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

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { color: var(--gray-700); }

.display-font { font-family: var(--font-display); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-sm {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

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

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

/* ── Flex & Grid Utilities ─────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-sm       { gap: var(--space-sm); }
.gap-md       { gap: var(--space-md); }
.gap-lg       { gap: var(--space-lg); }
.gap-xl       { gap: var(--space-xl); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

/* ── Text Utilities ────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-primary { color: var(--primary); }
.text-white   { color: var(--white); }
.text-muted   { color: var(--gray-500); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-lg      { font-size: 1.125rem; }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }

/* ── Section Header ────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: var(--space-3xl); }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.section-title {
  font-family: var(--font-display);
  color: var(--dark);
  margin-bottom: var(--space-md);
}

.section-title span { color: var(--primary); }

.section-subtitle {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--trans-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--trans-fast);
}

.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--grad-primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0,119,182,.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(0,119,182,.5); transform: translateY(-2px); }

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-ghost {
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); border-color: var(--white); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

.btn-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-base);
}

.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.card-glass {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
}

/* ── Badges & Tags ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary  { background: #EFF8FF; color: var(--primary); }
.badge-success  { background: #ECFDF5; color: var(--success); }
.badge-warning  { background: #FFFBEB; color: var(--warning); }
.badge-danger   { background: #FEF2F2; color: var(--danger); }
.badge-gray     { background: var(--gray-200); color: var(--gray-700); }

/* ── Stars Rating ──────────────────────────────────────────── */
.stars { color: #FBBF24; letter-spacing: 2px; font-size: 0.9rem; }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-300);
  margin: var(--space-xl) 0;
}

/* ── Avatar ────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Form Controls ─────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--gray-900);
  background: var(--white);
  transition: all var(--trans-fast);
  outline: none;
}

.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,0.12); }
.form-control::placeholder { color: var(--gray-400); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Misc Utilities ────────────────────────────────────────── */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }
.rounded-full { border-radius: var(--radius-full); }
.cursor-pointer { cursor: pointer; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: var(--accent); color: var(--dark); }

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

@media (max-width: 768px) {
  :root { --navbar-h: 70px; }
  .container { padding: 0 var(--space-lg); }
  .section { padding: var(--space-3xl) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .flex-between { flex-wrap: wrap; gap: var(--space-md); }
  h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  h2 { font-size: clamp(1.4rem, 6vw, 2rem); }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  .btn-lg { padding: 0.875rem 1.75rem; font-size: 0.95rem; }
}
