/*
 * TKMD Dermatology — Main CSS
 * Design tokens (CSS custom properties) + base reset + typography
 * Version: 1.0.0
 * Import order: main.css → components.css
 */

/* ══════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
══════════════════════════════════════════════════════════════════ */
:root {
  /* Brand colors */
  --gold:        #C8940E;
  --gold-light:  #FDF2D8;
  --gold-dark:   #9B6E08;
  --dark:        #111827;
  --dark-2:      #1F2A3C;
  --dark-3:      #2D3A50;
  --footer-bg:   #0B0F18;
  --white:       #FFFFFF;
  --bg:          #F9F9F7;
  --bg-2:        #F2F2EE;
  --text:        #111827;
  --text-muted:  #6B7280;
  --border:      #E5E7EB;

  /* Semantic colors */
  --success:  #16a34a;
  --warning:  #d97706;
  --danger:   #dc2626;
  --info:     #2563eb;

  /* Radius scale */
  --r-pill:  50px;
  --r-xl:    24px;
  --r-lg:    16px;
  --r-md:    10px;
  --r-sm:    6px;
  --r-xs:    4px;

  /* Spacing scale */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   32px;
  --sp-2xl:  48px;
  --sp-3xl:  64px;
  --sp-4xl:  80px;

  /* Typography */
  --font-body:    'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.18);
  --shadow-gold: 0 4px 20px rgba(200,148,14,0.30);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Layout */
  --container-max: 1280px;
  --container-pad: 32px;
  --header-height: 68px;
  --alert-bar-height: 38px;
}

/* ══════════════════════════════════════════════════════════════════
   2. RESET & BASE
══════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -999;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 12px 20px;
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  outline: none;
}

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

/* Links */
a {
  color: var(--gold-dark);
  text-decoration: underline;
  transition: color var(--transition);
}
a:hover { color: var(--gold); }

/* Lists */
ul, ol { list-style: none; }

/* Form elements */
button, input, select, textarea {
  font-family: var(--font-body);
  font-size: inherit;
}
button { cursor: pointer; }
input, select, textarea {
  border: none;
  outline: none;
  background: transparent;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-xl) 0;
}

/* Tables */
table { border-collapse: collapse; width: 100%; }

/* ══════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY SCALE
══════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  line-height: 1.1;
  color: var(--text);
  font-weight: 700;
}

h1 { font-size: clamp(28px, 4vw, 52px); letter-spacing: -1.5px; }
h2 { font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.5px; }
h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 15px; font-weight: 600; }
h6 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

p { margin-bottom: var(--sp-md); color: var(--text-muted); line-height: 1.75; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; color: var(--text); }
em { font-style: italic; }

/* Section label (eyebrow text) */
.s-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.s-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Section title */
.s-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 14px;
}
.s-title em {
  font-style: normal;
  color: var(--gold);
}

/* Section body */
.s-body {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 540px;
}

/* ══════════════════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
══════════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Section wrapper */
.section {
  padding: var(--sp-4xl) 0;
}
.section-bg  { background: var(--bg); }
.section-dark { background: var(--dark); }
.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Section header row */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
  flex-wrap: wrap;
}

/* Visually hidden (screen reader only) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════════
   5. ANIMATION KEYFRAMES
══════════════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

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

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

/* ══════════════════════════════════════════════════════════════════
   6. WORDPRESS ALIGNMENT CLASSES (Gutenberg compatibility)
══════════════════════════════════════════════════════════════════ */
.alignleft  { float: left; margin-right: var(--sp-lg); margin-bottom: var(--sp-md); }
.alignright { float: right; margin-left: var(--sp-lg); margin-bottom: var(--sp-md); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: var(--sp-md); }
.alignwide  { margin-left: calc(-1 * var(--container-pad)); margin-right: calc(-1 * var(--container-pad)); }
.alignfull  { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ══════════════════════════════════════════════════════════════════
   7. BREADCRUMB
══════════════════════════════════════════════════════════════════ */
.breadcrumb {
  padding: 12px 0;
  margin-bottom: 24px;
}
.bc-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.bc-item {
  font-size: 12px;
  color: var(--text-muted);
}
.bc-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.bc-item a:hover { color: var(--gold); }
.bc-current { color: var(--text); font-weight: 500; }
.bc-sep {
  margin: 0 8px;
  color: var(--border);
  font-size: 10px;
}

/* ══════════════════════════════════════════════════════════════════
   8. RESPONSIVE BREAKPOINTS (shared across all files)
══════════════════════════════════════════════════════════════════ */
/* Tablet ≤1024px */
@media (max-width: 1024px) {
  :root {
    --container-pad: 24px;
    --sp-4xl: 64px;
    --sp-3xl: 48px;
  }
  .section { padding: 64px 0; }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
  :root {
    --container-pad: 16px;
    --sp-4xl: 48px;
    --sp-3xl: 36px;
    --header-height: 60px;
  }
  .section { padding: 48px 0; }
  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
  }
  .s-title { font-size: clamp(22px, 6vw, 30px); }
  .gallery { grid-template-columns: 1fr 1fr; }
}

/* Small mobile ≤480px */
@media (max-width: 480px) {
  :root { --container-pad: 14px; }
  .gallery { grid-template-columns: 1fr; }
}
