/*
Theme Name: Medicamento
Theme URI: https://medicamen.to
Author: Medicamen.to
Author URI: https://medicamen.to
Description: Tema profissional de blog de saúde e medicamentos com identidade visual alinhada à Cimed. Wiki de medicamentos para consultas rápidas, com design moderno e experiência de usuário de alto nível.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medicamento
Tags: blog, health, medicine, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready, two-columns
*/

/* =====================================================
   CSS CUSTOM PROPERTIES — IDENTIDADE CIMED
   ===================================================== */
:root {
  /* ---- Cimed Brand Palette ---- */
  --cimed-orange:        #F05A28;
  --cimed-orange-dark:   #C03E18;
  --cimed-orange-light:  #FF7A4D;
  --cimed-orange-pale:   #FFF3EF;
  --cimed-orange-10:     rgba(240,90,40,.10);
  --cimed-navy:          #1B3464;
  --cimed-navy-dark:     #0F1E3D;
  --cimed-navy-light:    #274D96;
  --cimed-navy-10:       rgba(27,52,100,.10);

  /* ---- UI Semantic Colours ---- */
  --color-primary:          var(--cimed-orange);
  --color-primary-dark:     var(--cimed-orange-dark);
  --color-primary-light:    var(--cimed-orange-light);
  --color-secondary:        var(--cimed-navy);
  --color-secondary-dark:   var(--cimed-navy-dark);
  --color-secondary-light:  var(--cimed-navy-light);

  /* ---- Health / ANVISA Prescription Classes ---- */
  --badge-otc:            #00A878;
  --badge-otc-bg:         #E8F8F3;
  --badge-yellow:         #E8A400;
  --badge-yellow-bg:      #FEF7E0;
  --badge-red:            #D63031;
  --badge-red-bg:         #FDEAEA;
  --badge-black:          #2C2C2C;
  --badge-black-bg:       #F0F0F0;
  --badge-hospital:       #1B3464;
  --badge-hospital-bg:    #EEF2FF;

  /* ---- Surface Colours ---- */
  --bg-white:     #FFFFFF;
  --bg-light:     #F7F9FC;
  --bg-warm:      #FFF8F5;
  --bg-dark:      var(--cimed-navy-dark);
  --surface-1:    #FFFFFF;
  --surface-2:    #F7F9FC;
  --surface-3:    #EEF2F7;

  /* ---- Text Colours ---- */
  --text-primary:   #12233A;
  --text-secondary: #4A5568;
  --text-muted:     #718096;
  --text-inverse:   #FFFFFF;
  --text-link:      var(--cimed-orange);
  --text-link-hover:var(--cimed-orange-dark);

  /* ---- Border ---- */
  --border-light:   #E8ECF0;
  --border-medium:  #CDD5E0;
  --border-strong:  #9AA5B4;

  /* ---- Typography ---- */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter',             -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono',    'Courier New', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide:   0.025em;
  --tracking-widest: 0.1em;

  /* ---- Spacing ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Border Radius ---- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.12);
  --shadow-orange: 0 4px 20px rgba(240,90,40,.30);
  --shadow-card:   0 2px 8px rgba(18,35,58,.08), 0 0 1px rgba(18,35,58,.06);

  /* ---- Transitions ---- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-bounce: 300ms cubic-bezier(.34,1.56,.64,1);

  /* ---- Layout ---- */
  --container-max:     1200px;
  --container-narrow:  780px;
  --sidebar-width:     320px;
  --header-height:     68px;

  /* ---- Z-indexes ---- */
  --z-base:    0;
  --z-raised:  10;
  --z-sticky:  100;
  --z-header:  1000;
  --z-modal:   2000;
  --z-toast:   3000;

  /* ---- Reading progress ---- */
  --progress-value: 0%;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-link-hover); }
a:focus-visible {
  outline: 2px solid var(--cimed-orange);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol { list-style: none; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  font-weight: 700;
}

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow {
  max-width: var(--container-narrow);
}

.layout-main {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 1024px) {
  .layout-main { grid-template-columns: 1fr; }
  .site-sidebar { display: none; }
}

/* Accessibility */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute;
}
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cimed-navy);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* =====================================================
   READING PROGRESS BAR
   ===================================================== */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: var(--progress-value, 0%);
  background: linear-gradient(90deg, var(--cimed-orange), var(--cimed-orange-light));
  z-index: calc(var(--z-header) + 1);
  transition: width 100ms linear;
}

/* =====================================================
   HEADER
   ===================================================== */
#masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}
#masthead.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-6);
}

/* Logo */
.site-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--cimed-orange), var(--cimed-orange-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.05em;
  box-shadow: var(--shadow-orange);
  flex-shrink: 0;
}
.site-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--text-primary);
}
.site-title span { color: var(--cimed-orange); }
.site-description {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: 2px;
}
.custom-logo { max-height: 44px; width: auto; }

/* Primary Navigation */
.nav-primary { flex: 1; display: flex; justify-content: center; }
.nav-menu-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.nav-menu-list > li > a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.nav-menu-list > li > a:hover,
.nav-menu-list > li.current-menu-item > a,
.nav-menu-list > li.current-page-ancestor > a {
  color: var(--cimed-orange);
  background: var(--cimed-orange-pale);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.btn-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-width: 200px;
}
.btn-search:hover {
  border-color: var(--cimed-orange);
  color: var(--text-secondary);
  background: var(--bg-white);
}
.btn-search svg { width: 16px; height: 16px; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--cimed-orange);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.btn-cta:hover {
  background: var(--cimed-orange-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-orange);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-2);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.menu-toggle:hover { background: var(--surface-3); }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1024px) {
  .nav-primary { display: none; }
  .btn-search { min-width: auto; }
  .btn-search span { display: none; }
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .btn-cta span { display: none; }
  .site-description { display: none; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header) - 1);
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}
.mobile-nav.open { display: block; }
.mobile-nav__panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(360px, 90vw);
  background: var(--bg-white);
  padding: var(--space-6);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--transition-base);
}
.mobile-nav.open .mobile-nav__panel { transform: translateX(0); }
.mobile-nav__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.mobile-nav__close:hover { background: var(--surface-3); }
.mobile-nav__list { margin-top: var(--space-10); }
.mobile-nav__list a {
  display: block;
  padding: var(--space-4);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}
.mobile-nav__list a:hover {
  color: var(--cimed-orange);
  padding-left: var(--space-6);
}

/* =====================================================
   SECONDARY NAV (Category pillbar)
   ===================================================== */
.category-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
  white-space: nowrap;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.category-pill:hover, .category-pill.active {
  color: var(--cimed-orange);
  background: var(--cimed-orange-pale);
  border-color: var(--cimed-orange-10);
}

/* =====================================================
   HERO SECTION (Home)
   ===================================================== */
.home-hero {
  background: linear-gradient(135deg, var(--cimed-navy-dark) 0%, var(--cimed-navy) 60%, var(--cimed-navy-light) 100%);
  padding: var(--space-12) 0;
  overflow: hidden;
  position: relative;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(240,90,40,.15)'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}
.home-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--cimed-orange-10);
  border: 1px solid rgba(240,90,40,.3);
  border-radius: var(--radius-full);
  color: var(--cimed-orange-light);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.home-hero__badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cimed-orange);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.4); }
}
.home-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}
.home-hero__title em {
  font-style: normal;
  color: var(--cimed-orange-light);
}
.home-hero__desc {
  color: rgba(255,255,255,.75);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}
.home-hero__search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-full);
  padding: var(--space-2);
  gap: var(--space-2);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
}
.home-hero__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  color: var(--text-primary);
}
.home-hero__search input::placeholder { color: var(--text-muted); }
.home-hero__search button {
  padding: var(--space-3) var(--space-6);
  background: var(--cimed-orange);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.home-hero__search button:hover {
  background: var(--cimed-orange-dark);
  transform: scale(1.02);
}
.home-hero__image {
  display: flex;
  justify-content: flex-end;
}
.home-hero__image img {
  max-height: 340px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  object-fit: cover;
}
@media (max-width: 768px) {
  .home-hero__inner { grid-template-columns: 1fr; }
  .home-hero__image { display: none; }
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--border-light);
}
.section-header h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  position: relative;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -calc(var(--space-4) + 2px);
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--cimed-orange);
  border-radius: var(--radius-full);
  transform: translateY(calc(var(--space-4) + 2px));
}
.section-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--cimed-orange);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--transition-fast);
}
.section-link:hover { gap: var(--space-2); }

/* =====================================================
   POST CARDS
   ===================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .posts-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.post-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}
.post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.post-card:hover .post-card__image img { transform: scale(1.05); }
.post-card__category {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--cimed-orange);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.post-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}
.post-card__meta svg { width: 12px; height: 12px; }
.post-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__title:hover { color: var(--cimed-orange); }
.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
}
.post-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}
.post-card__author img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.post-card__read-more {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--cimed-orange);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}
.post-card__read-more:hover { gap: 8px; }

/* Featured post card (larger) */
.post-card--featured {
  grid-column: span 2;
  flex-direction: row;
}
.post-card--featured .post-card__image {
  width: 55%;
  aspect-ratio: unset;
  flex-shrink: 0;
}
.post-card--featured .post-card__title { font-size: var(--text-2xl); }
.post-card--featured .post-card__excerpt { -webkit-line-clamp: 4; }
@media (max-width: 1024px) {
  .post-card--featured { grid-column: span 1; flex-direction: column; }
  .post-card--featured .post-card__image { width: 100%; aspect-ratio: 16/9; }
}

/* Medication card (special) */
.medication-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}
.medication-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.medication-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cimed-orange), var(--cimed-orange-light));
}
.medication-card__image {
  background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.medication-card__image img {
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(var(--shadow-md));
}
.medication-card__body { padding: var(--space-5); flex: 1; }
.medication-card__name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.medication-card__ingredient {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.medication-card__badges { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* =====================================================
   BADGE / TAGS
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
}
.badge--otc      { background: var(--badge-otc-bg);      color: var(--badge-otc); }
.badge--yellow   { background: var(--badge-yellow-bg);   color: var(--badge-yellow); }
.badge--red      { background: var(--badge-red-bg);      color: var(--badge-red); }
.badge--black    { background: var(--badge-black-bg);    color: var(--badge-black); }
.badge--hospital { background: var(--badge-hospital-bg); color: var(--badge-hospital); }
.badge--category {
  background: var(--cimed-orange-pale);
  color: var(--cimed-orange-dark);
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-article { background: var(--bg-white); }

.single-hero {
  background: linear-gradient(180deg, var(--cimed-navy-dark) 0%, var(--cimed-navy) 100%);
  padding: var(--space-10) 0 0;
  overflow: hidden;
}
.single-hero__inner { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }
.single-hero__cats {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.single-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: var(--space-5);
}
.single-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: rgba(255,255,255,.7);
  font-size: var(--text-sm);
  font-weight: 500;
  flex-wrap: wrap;
  padding-bottom: var(--space-8);
}
.single-hero__meta-sep { color: rgba(255,255,255,.3); }
.single-hero__featured {
  margin-top: var(--space-6);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  max-height: 480px;
}
.single-hero__featured img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.single-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-10);
  align-items: start;
  padding: var(--space-10) 0 var(--space-16);
}
@media (max-width: 1024px) {
  .single-layout { grid-template-columns: 1fr; }
}

/* Article body */
.article-body {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  max-width: 720px;
}
.article-body > * + * { margin-top: var(--space-6); }
.article-body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--cimed-orange-pale);
}
.article-body h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  color: var(--text-primary);
}
.article-body h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-6);
  color: var(--text-primary);
}
.article-body p { margin-bottom: var(--space-5); }
.article-body a {
  color: var(--cimed-orange);
  text-decoration: underline;
  text-decoration-color: rgba(240,90,40,.4);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--cimed-orange); }
.article-body ul, .article-body ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}
.article-body li { margin-bottom: var(--space-2); }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body blockquote {
  padding: var(--space-6);
  border-left: 4px solid var(--cimed-orange);
  background: var(--cimed-orange-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
}
.article-body pre, .article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
}
.article-body code { padding: 2px 6px; }
.article-body pre {
  padding: var(--space-5);
  overflow-x: auto;
}
.article-body img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}
.article-body th {
  background: var(--cimed-navy);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
}
.article-body td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
}
.article-body tr:nth-child(even) td { background: var(--surface-2); }

/* Table of Contents */
.toc {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--cimed-orange);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
}
.toc h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--cimed-orange);
  margin-bottom: var(--space-3);
}
.toc ol { padding-left: var(--space-5); list-style: decimal; }
.toc li { margin-bottom: var(--space-1); }
.toc a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.toc a:hover { color: var(--cimed-orange); }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  margin: var(--space-10) 0;
}
.share-bar__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.share-btn:hover { transform: scale(1.05); }
.share-btn--whatsapp { background: #25D366; color: #fff; }
.share-btn--facebook { background: #1877F2; color: #fff; }
.share-btn--twitter  { background: #0F1419; color: #fff; }
.share-btn--copy     { background: var(--surface-3); color: var(--text-secondary); }

/* =====================================================
   SIDEBAR
   ===================================================== */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}
.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.sidebar-widget__title {
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-light);
  position: relative;
}
.sidebar-widget__title::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 30px; height: 2px;
  background: var(--cimed-orange);
}

/* Search widget */
.widget-search form {
  display: flex;
  gap: var(--space-2);
}
.widget-search input[type="search"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}
.widget-search input[type="search"]:focus {
  border-color: var(--cimed-orange);
}
.widget-search button {
  padding: var(--space-3) var(--space-5);
  background: var(--cimed-orange);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--transition-fast);
}
.widget-search button:hover { background: var(--cimed-orange-dark); }

.widget-categories ul { list-style: none; }
.widget-categories li {
  border-bottom: 1px solid var(--border-light);
}
.widget-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}
.widget-categories a:hover { color: var(--cimed-orange); }
.widget-categories .count {
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Recent posts widget */
.widget-recent-posts li {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}
.widget-recent-posts li:last-child { border-bottom: none; }
.widget-recent-posts__thumb {
  width: 64px; height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
}
.widget-recent-posts__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.widget-recent-posts__info { flex: 1; min-width: 0; }
.widget-recent-posts__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--leading-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-1);
}
.widget-recent-posts__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* =====================================================
   MEDICATION HERO (Single medicamento)
   ===================================================== */
.medication-hero {
  background: linear-gradient(135deg, var(--cimed-navy-dark) 0%, var(--cimed-navy) 70%);
  position: relative;
  overflow: hidden;
  padding: var(--space-12) 0 var(--space-16);
}
.medication-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--bg-light);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.medication-hero__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (max-width: 768px) {
  .medication-hero__inner { grid-template-columns: 1fr; text-align: center; }
}

/* Medication image floating card */
.medication-image-card {
  width: 260px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-xl);
  flex-shrink: 0;
}
.medication-image-card img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.3));
}
.medication-image-card__no-image {
  width: 160px; height: 160px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  text-align: center;
  gap: var(--space-2);
}

.medication-hero__content { color: #fff; }
.medication-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.5);
}
.medication-hero__breadcrumb a {
  color: rgba(255,255,255,.5);
  transition: color var(--transition-fast);
}
.medication-hero__breadcrumb a:hover { color: #fff; }
.medication-hero__breadcrumb span { color: rgba(255,255,255,.3); }
.medication-hero__badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.prescription-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.prescription-badge--otc {
  background: var(--badge-otc);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0,168,120,.2);
}
.prescription-badge--yellow {
  background: var(--badge-yellow);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(232,164,0,.2);
}
.prescription-badge--red {
  background: var(--badge-red);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(214,48,49,.2);
}
.prescription-badge--black {
  background: var(--badge-black);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(44,44,44,.2);
}
.prescription-badge--hospital {
  background: var(--cimed-navy-light);
  color: #fff;
}
.prescription-badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
}

.medication-hero__name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}
.medication-hero__ingredient {
  font-size: var(--text-xl);
  color: rgba(255,255,255,.75);
  font-weight: 400;
  margin-bottom: var(--space-5);
}
.medication-hero__quick-facts {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.quick-fact {
  display: flex;
  flex-direction: column;
}
.quick-fact__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 2px;
}
.quick-fact__value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,.9);
}

/* =====================================================
   MEDICATION TABS
   ===================================================== */
.medication-tabs-section {
  margin-bottom: var(--space-10);
}
.medication-tabs-nav {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-xl);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-light);
  flex-wrap: nowrap;
}
.medication-tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: none;
}
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn:hover { color: var(--cimed-orange); background: rgba(240,90,40,.05); }
.tab-btn.active {
  background: var(--bg-white);
  color: var(--cimed-orange);
  box-shadow: var(--shadow-sm);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 200ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.medication-info-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.medication-info-card__header {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--cimed-navy-dark), var(--cimed-navy));
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.medication-info-card__header svg { width: 22px; height: 22px; color: var(--cimed-orange-light); }
.medication-info-card__header h3 { font-size: var(--text-lg); font-weight: 700; }
.medication-info-card__body {
  padding: var(--space-6);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}
.medication-info-card__body h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.medication-info-card__body h4:first-child { margin-top: 0; }
.medication-info-card__body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.medication-info-card__body ul li {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--cimed-orange);
  font-size: var(--text-sm);
  font-weight: 500;
}
.medication-info-card__body ul li.warning {
  border-left-color: var(--badge-red);
  background: var(--badge-red-bg);
  color: #7a1111;
}

/* Dosage table */
.dosage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.dosage-table th {
  background: var(--cimed-navy);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.dosage-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.dosage-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.dosage-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.dosage-table td strong { color: var(--text-primary); }
.dosage-table tr:nth-child(even) td { background: var(--surface-2); }
.dosage-table .dose-value {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--cimed-orange);
}

/* Composition grid */
.composition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}
.composition-item {
  padding: var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  text-align: center;
}
.composition-item__name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.composition-item__amount {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--cimed-orange);
  font-weight: 700;
  background: var(--cimed-orange-pale);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}
.composition-item__type {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* Side effects severity */
.side-effects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.side-effect-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}
.side-effect-item--common { background: #FEF9E7; border-left: 3px solid #F6A623; color: #7A5200; }
.side-effect-item--uncommon { background: #FFF3EF; border-left: 3px solid var(--cimed-orange); color: var(--cimed-orange-dark); }
.side-effect-item--rare { background: #FDEAEA; border-left: 3px solid var(--badge-red); color: #7A1111; }
.side-effect-item__freq {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.08);
  white-space: nowrap;
}

/* Storage information */
.storage-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-4);
}
.storage-card {
  text-align: center;
  padding: var(--space-5);
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
}
.storage-card__icon {
  width: 48px; height: 48px;
  margin: 0 auto var(--space-3);
  background: var(--cimed-orange-pale);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cimed-orange);
  font-size: 1.5rem;
}
.storage-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  margin-bottom: 4px;
}
.storage-card__value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

/* Warning box */
.warning-box {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--badge-red-bg);
  border: 1px solid rgba(214,48,49,.2);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}
.warning-box__icon { font-size: 1.5rem; flex-shrink: 0; }
.warning-box__title {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--badge-red);
  margin-bottom: var(--space-1);
}
.warning-box__text {
  font-size: var(--text-sm);
  color: #6B2020;
  line-height: var(--leading-relaxed);
}

.info-box {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--cimed-orange-pale);
  border: 1px solid rgba(240,90,40,.2);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}
.info-box__icon { font-size: 1.5rem; flex-shrink: 0; }
.info-box__title { font-size: var(--text-sm); font-weight: 800; color: var(--cimed-orange-dark); margin-bottom: var(--space-1); }
.info-box__text { font-size: var(--text-sm); color: #7A3415; line-height: var(--leading-relaxed); }

/* =====================================================
   MAIN CONTENT AREA (single-medicamento)
   ===================================================== */
.medication-main {
  background: var(--bg-light);
  padding: var(--space-8) 0 var(--space-16);
}
.medication-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 1024px) {
  .medication-layout { grid-template-columns: 1fr; }
}

.medication-quick-info {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: var(--space-6);
}
.medication-quick-info__header {
  background: linear-gradient(135deg, var(--cimed-orange), var(--cimed-orange-dark));
  padding: var(--space-4) var(--space-5);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.medication-quick-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: var(--space-2);
  gap: var(--space-2);
}
.info-item {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-md);
}
.info-item__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
  margin-bottom: 2px;
}
.info-item__value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.info-item--full { grid-column: span 2; }

/* ANVISA badge */
.anvisa-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--badge-hospital-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.anvisa-badge__logo {
  width: 40px; height: 40px;
  background: var(--cimed-navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}
.anvisa-badge__info { flex: 1; min-width: 0; }
.anvisa-badge__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.anvisa-badge__number {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--cimed-navy);
  word-break: break-all;
}

/* =====================================================
   FOOTER
   ===================================================== */
#colophon {
  background: var(--cimed-navy-dark);
  color: rgba(255,255,255,.75);
}
.footer-main {
  padding: var(--space-16) 0 var(--space-10);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
}
@media (max-width: 1024px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .footer-main { grid-template-columns: 1fr; } }

.footer-brand { }
.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.footer-brand__mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--cimed-orange), var(--cimed-orange-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
}
.footer-brand__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: var(--tracking-tight);
}
.footer-brand__name span { color: var(--cimed-orange); }
.footer-brand__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,.5);
  margin-bottom: var(--space-6);
}
.footer-social {
  display: flex;
  gap: var(--space-3);
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 1rem;
  text-decoration: none;
}
.footer-social a:hover {
  background: var(--cimed-orange);
  color: #fff;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-5);
}
.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}
.footer-col__list a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer-col__list a:hover { color: var(--cimed-orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-bottom__copy {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.4);
}
.footer-bottom__copy a {
  color: var(--cimed-orange);
  font-weight: 600;
}
.footer-disclaimer {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.3);
  text-align: center;
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,255,255,.05);
  line-height: var(--leading-relaxed);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-10) 0;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.page-numbers:hover { border-color: var(--cimed-orange); color: var(--cimed-orange); }
.page-numbers.current { background: var(--cimed-orange); color: #fff; border-color: var(--cimed-orange); }
.page-numbers.prev, .page-numbers.next { width: auto; padding: 0 var(--space-4); }

/* =====================================================
   404 PAGE
   ===================================================== */
.error-404-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
}
.error-404__code {
  font-size: 7rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cimed-orange), var(--cimed-orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-3);
}
.error-404__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}
.error-404__desc {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto var(--space-8);
}

/* =====================================================
   SEARCH / MODAL
   ===================================================== */
.search-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.search-modal-overlay.open { display: flex; }
.search-modal {
  width: min(640px, 92vw);
  background: var(--bg-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: modalIn 200ms var(--transition-bounce);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.search-modal__input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}
.search-modal__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-xl);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: transparent;
}
.search-modal__input::placeholder { color: var(--text-muted); }
.search-modal__results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-3);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--surface-2); }
.search-result-item__icon {
  width: 40px; height: 40px;
  background: var(--cimed-orange-pale);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cimed-orange);
  flex-shrink: 0;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.content-area { padding: var(--space-10) 0 var(--space-16); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.text-center { text-align: center; }
.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; }

/* =====================================================
   WP ALIGNMENTS
   ===================================================== */
.alignleft { float: left; margin-right: var(--space-6); margin-bottom: var(--space-4); }
.alignright { float: right; margin-left: var(--space-6); margin-bottom: var(--space-4); }
.aligncenter { margin: var(--space-6) auto; text-align: center; }
.wp-block-image.alignfull img { width: 100vw; margin-left: calc(-50vw + 50%); border-radius: 0; }

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
  #masthead, .site-sidebar, .medication-tabs-nav, .share-bar, #colophon { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .medication-hero { color: #000 !important; background: none !important; }
  .medication-hero * { color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
}
