/* ==========================================================================
   NYSORA DOLOR - ESTILOS OFICIALES EN ESPAÑOL
   Diseño de dos paneles inspirado en NYSORA_Portable_Universal
   Optimizado para iPad, PWA y navegación clínica táctil
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Colores Principales (Tema Claro de Serie) */
  --nysora-blue: #0088cc;
  --nysora-blue-hover: #0077b3;
  --nysora-blue-light: #e0f2fe;
  --nysora-dark: #0f172a;
  
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f1f8ff;
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --border-color: #e2e8f0;
  --border-focus: #0088cc;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-subtle: #1e293b;
  --bg-hover: rgba(0, 136, 204, 0.18);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #334155;
  --border-focus: #38bdf8;
  --nysora-blue-light: rgba(0, 136, 204, 0.2);
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

/* ==========================================================================
   CABECERA PRINCIPAL
   ========================================================================== */

.app-header {
  height: 64px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  background: linear-gradient(135deg, #0088cc 0%, #0366d6 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  box-shadow: 0 2px 4px rgba(0, 136, 204, 0.3);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--nysora-blue);
  line-height: 1.2;
}

[data-theme="dark"] .brand-text h1 {
  color: #38bdf8;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--nysora-blue-light);
  color: var(--nysora-blue);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid rgba(0, 136, 204, 0.2);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-subtle);
  transform: rotate(15deg);
}

/* ==========================================================================
   LAYOUT PRINCIPAL DE DOS PANELES
   ========================================================================== */

.app-container {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

/* Barra Lateral */
.sidebar {
  width: 370px;
  min-width: 320px;
  max-width: 420px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  overflow-y: auto;
  user-select: none;
}

/* Selector de Modo de Visualización (Segmented Control) */
.view-mode-selector {
  display: flex;
  background-color: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  gap: 4px;
  border: 1px solid var(--border-color);
}

.view-mode-btn {
  flex: 1;
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-primary);
}

.view-mode-btn.active {
  background-color: var(--bg-surface);
  color: var(--nysora-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .view-mode-btn.active {
  color: #38bdf8;
  background-color: #1e293b;
}

/* Caja de Búsqueda */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
}

.search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.6;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 2.2rem 0.65rem 2.2rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.search-box input:focus {
  background-color: var(--bg-surface);
  border-color: var(--nysora-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.clear-search {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
}

/* Cuadrado / Panel de Áreas y Articulaciones */
.region-grid-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.region-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
}

.region-box-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nysora-blue);
}

[data-theme="dark"] .region-box-title {
  color: #38bdf8;
}

.region-box-active {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--nysora-blue-light);
  color: var(--nysora-blue);
}

[data-theme="dark"] .region-box-active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.42rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  transition: all 0.15s ease;
  user-select: none;
  text-align: left;
}

.chip-all {
  grid-column: 1 / -1;
  font-weight: 700;
  padding: 0.48rem 0.65rem;
}

.chip-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.chip-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  line-height: 1;
}

.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.2;
}

.chip-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}

[data-theme="dark"] .chip-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.chip:hover {
  background: var(--bg-hover);
  border-color: var(--nysora-blue);
  color: var(--nysora-blue);
}

.chip.active {
  background-color: var(--nysora-blue) !important;
  border-color: var(--nysora-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(0, 136, 204, 0.25);
}

.chip.active .chip-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.chip.active .chip-name {
  font-weight: 700;
}

/* Menú de Navegación */
.nav-menu {
  flex: 1;
  overflow-y: auto;
}

.menu-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-group-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--nysora-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 0.5rem 0.3rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-group-title:hover {
  background-color: var(--bg-subtle);
}

.nav-group-badge {
  font-size: 0.7rem;
  background: rgba(0, 136, 204, 0.15);
  color: var(--nysora-blue);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.nav-subgroup {
  margin-left: 0.4rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}

.nav-item {
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: #0366d6;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.35;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .nav-item {
  color: #93c5fd;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  text-decoration: underline;
}

.nav-item.active {
  background-color: var(--nysora-blue) !important;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 2px 5px rgba(0, 136, 204, 0.25);
}

.nav-item .star-icon {
  font-size: 0.75rem;
  color: #f59e0b;
}

.item-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.item-joint-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 136, 204, 0.1);
  color: var(--nysora-blue);
  white-space: nowrap;
}

[data-theme="dark"] .item-joint-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.nav-item.active .item-joint-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.breadcrumb-joint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--nysora-blue-light);
  color: var(--nysora-blue);
  margin-left: 0.5rem;
  vertical-align: middle;
}

[data-theme="dark"] .breadcrumb-joint-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

/* ==========================================================================
   PANEL PRINCIPAL DE LECTURA
   ========================================================================== */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  overflow-y: auto;
}

.content-toolbar {
  padding: 0.75rem 2rem;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.breadcrumb-area {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-category {
  font-weight: 600;
  color: var(--nysora-blue);
}

.breadcrumb-sep {
  opacity: 0.5;
}

.breadcrumb-title {
  font-weight: 700;
  color: var(--text-primary);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-arrow-btn, .tool-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-arrow-btn:hover, .tool-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.tool-btn.active {
  background-color: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
}

/* Contenedor del Artículo */
.article-wrapper {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 3rem 4rem;
}

/* Welcome Hero */
.welcome-hero {
  text-align: center;
  padding: 3rem 1.5rem;
}

.welcome-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.welcome-hero h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.welcome-hero p {
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.feature-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.feature-item .f-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.feature-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   TIPOGRAFÍA Y CONTENIDO MARKDOWN (NYSORA AUTHENTIC)
   ========================================================================== */

.markdown-body h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

[data-theme="dark"] .markdown-body h1 {
  color: #f8fafc;
}

.markdown-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.4rem;
}

[data-theme="dark"] .markdown-body h2 {
  color: #e2e8f0;
  border-bottom-color: #334155;
}

.markdown-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .markdown-body h3 {
  color: #cbd5e1;
}

.markdown-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.markdown-body p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.markdown-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.markdown-body li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

/* Authentic NYSORA Tip Box */
.tip-box {
  border: 1px solid #bce8f1;
  border-radius: 6px;
  margin: 25px 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 136, 204, 0.08);
}

.tip-header {
  background-color: #0088cc;
  color: #ffffff;
  padding: 10px 18px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tip-content {
  background-color: #d9edf7;
  color: #31708f;
  padding: 16px 20px;
}

[data-theme="dark"] .tip-box {
  border-color: #0284c7;
}

[data-theme="dark"] .tip-content {
  background-color: rgba(2, 132, 199, 0.15);
  color: #bae6fd;
}

.tip-content ul {
  margin: 0;
  padding-left: 20px;
}

.tip-content li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Imágenes y Figuras */
.wp-block-image {
  margin: 25px 0;
  text-align: center;
}

.wp-block-image figure {
  margin: 0;
}

.wp-block-image img, .markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  margin: 10px auto;
  display: block;
}

.wp-element-caption, figcaption {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  text-align: center;
}

/* Reproductores de Vídeo (16:9) */
.wp-block-embed, .video-container {
  margin: 25px 0;
  max-width: 100%;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background-color: #000000;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Notas Personales */
.personal-notes-card {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.notes-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.notes-auto-save {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notes-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
}

.notes-textarea:focus {
  border-color: var(--nysora-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: auto;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsividad para Móviles y Tablets */
@media (max-width: 860px) {
  .app-container {
    flex-direction: column;
    height: auto;
  }
  .sidebar {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .article-wrapper {
    padding: 1.5rem 1rem 3rem;
  }
  .content-toolbar {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Lightbox Modal para Ampliación de Sonoanatomía */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-modal-content {
  position: relative;
  z-index: 3001;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: #000;
}

.image-modal-caption {
  margin-top: 0.85rem;
  color: #f1f5f9;
  font-size: 0.92rem;
  text-align: center;
  max-width: 800px;
  line-height: 1.45;
}

.image-modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

figure.aligncenter {
  margin: 1.75rem 0;
  text-align: center;
}

figure.aligncenter img {
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
  height: auto;
}

figure.aligncenter img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

figcaption.wp-element-caption {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}
