:root {
  --crema: #FFFDF7;
  --crema-card: #FFFBEF;
  --crema-alt: #F8F4EA;
  --texto: #1E1108;
  --texto-sec: #5C4A3A;
  --texto-claro: #9A8A7A;
  --navy: #0f2a47;
  --navy-alpha: rgba(15,42,71,0.12);
  --navy-border: rgba(15,42,71,0.18);
  --dorado: #c9a227;
  --dorado-hover: #e0b930;
  --sombras: rgba(15,42,71,0.06);
  --card-shadow: 0 1px 3px rgba(15,42,71,0.06), 0 1px 2px rgba(15,42,71,0.04);
  --card-hover: 0 10px 30px rgba(15,42,71,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-round: 50px;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', monospace;
  --max-w: 1120px;
  --bot-defensoria: #1A5C5C;
  --bot-guardianes: #2D7D46;
  --bot-salud: #B84A4A;
  --bot-comercio: #B8860B;
  --bot-cultura: #7C3E6A;
  --bot-bia: #8B5CF6;
  --orb-def: linear-gradient(135deg, #1A5C5C, #2A8A8A);
  --orb-gua: linear-gradient(135deg, #2D7D46, #4CAF6E);
  --orb-sal: linear-gradient(135deg, #B84A4A, #D46A6A);
  --orb-com: linear-gradient(135deg, #B8860B, #D4A020);
  --orb-cul: linear-gradient(135deg, #7C3E6A, #A05A8A);
  --orb-bia: linear-gradient(135deg, #8B5CF6, #A07CF0);
}

[data-theme="dark"] {
  --crema: #141210;
  --crema-card: #1E1A16;
  --crema-alt: #28221C;
  --texto: #E8DED4;
  --texto-sec: #A89A8E;
  --texto-claro: #6E6258;
  --navy: #7A9ABF;
  --navy-alpha: rgba(122,154,191,0.12);
  --navy-border: rgba(122,154,191,0.2);
  --sombras: rgba(0,0,0,0.2);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.2);
  --card-hover: 0 10px 30px rgba(0,0,0,0.3);
  --bot-defensoria: #2A7A7A;
  --bot-guardianes: #3A9A5A;
  --bot-salud: #D45A5A;
  --bot-comercio: #D4A020;
  --bot-cultura: #A05A8A;
  --bot-bia: #A07CF0;
  --orb-def: linear-gradient(135deg, #1A5C5C, #3A9A9A);
  --orb-gua: linear-gradient(135deg, #2D7D46, #5ABE7E);
  --orb-sal: linear-gradient(135deg, #B84A4A, #E47A7A);
  --orb-com: linear-gradient(135deg, #B8860B, #E4B030);
  --orb-cul: linear-gradient(135deg, #7C3E6A, #B06A9A);
  --orb-bia: linear-gradient(135deg, #8B5CF6, #B08CFF);
  --dorado: #D4A840;
  --dorado-hover: #E8C050;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--crema);
  color: var(--texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection { background: var(--dorado); color: #fff; }

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes float-delay {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--glow-r, 15), var(--glow-g, 42), var(--glow-b, 71), 0.15); }
  50% { box-shadow: 0 0 40px rgba(var(--glow-r, 15), var(--glow-g, 42), var(--glow-b, 71), 0.25); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes orbit-open {
  0% { transform: rotate(0deg) translateX(0) rotate(0deg); opacity: 0; }
  100% { opacity: 1; }
}
@keyframes fade-up {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== LOADER ===== */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--crema);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  transition: opacity 0.4s, visibility 0.4s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 253, 247, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--navy-border);
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 16px;
}
[data-theme="dark"] .nav {
  background: rgba(20, 18, 16, 0.78);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.95rem; color: var(--texto);
  margin-right: auto;
}
.nav-logo img { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--dorado); object-fit: cover; }
.nav-logo-sub { font-weight: 400; color: var(--texto-sec); font-size: 0.85rem; }
.nav-logo-bua { display: none; }
.nav-logo-bua-gris { font-weight: 400; color: var(--texto-sec); }

.nav-links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  padding: 7px 14px; border-radius: var(--radius-round);
  font-size: 0.85rem; font-weight: 500; color: var(--texto-sec);
  transition: all var(--transition);
  display: block;
}
.nav-links a:hover { background: var(--navy-alpha); color: var(--texto); }
.nav-links a.activo { background: var(--navy); color: #fff; }

.nav-item-dropdown { position: relative; }
.nav-dropdown-trigger {
  padding: 7px 14px; border-radius: var(--radius-round);
  font-size: 0.85rem; font-weight: 500; color: var(--texto-sec);
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-dropdown-trigger::after {
  content: '▾'; display: inline-block;
  transition: transform 0.2s; opacity: 0.5;
  font-size: 0.65rem;
}
.nav-dropdown-trigger.open::after { transform: rotate(180deg); }
.nav-dropdown-trigger:hover { background: var(--navy-alpha); color: var(--texto); }
.nav-dropdown-trigger.activo { background: var(--navy); color: #fff; font-weight: 600; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--crema); border: 1px solid var(--navy-border);
  border-radius: var(--radius); padding: 6px; min-width: 180px;
  z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.nav-mobile-actions { display: none; }
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu a,
.nav-dropdown-menu .nav-nested-trigger {
  display: block; padding: 7px 12px; border-radius: 6px;
  font-size: 0.82rem; color: var(--texto-sec); transition: all var(--transition);
  cursor: pointer;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu .nav-nested-trigger:hover { background: var(--navy-alpha); color: var(--texto); }
.nav-dropdown-menu a.activo { background: var(--navy); color: #fff; font-weight: 600; }

/* Nested dropdown (Medios Digitales BUA inside Digital) */
.nav-item-nested { position: relative; }
.nav-nested-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.nav-nested-trigger::after {
  content: '▾'; display: inline-block;
  transition: transform 0.2s; opacity: 0.5;
  font-size: 0.65rem;
}
.nav-nested-trigger.open::after { transform: rotate(180deg); }
.nav-nested-menu {
  display: none; position: absolute; left: 100%; top: 0;
  background: var(--crema); border: 1px solid var(--navy-border);
  border-radius: var(--radius); padding: 6px; min-width: 180px;
  z-index: 101; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.nav-item-nested .nav-nested-menu.open { display: block; }
.nav-nested-menu a { display: block; padding: 7px 12px; border-radius: 6px; font-size: 0.82rem; color: var(--texto-sec); transition: all var(--transition); }
.nav-nested-menu a:hover { background: var(--navy-alpha); color: var(--texto); }
.nav-nested-menu a.activo { background: var(--navy); color: #fff; font-weight: 600; }

.nav-acciones { display: flex; align-items: center; gap: 8px; }

.btn-nav {
  padding: 0 16px; border-radius: var(--radius-round);
  font-size: 0.8rem; font-weight: 600; transition: all var(--transition);
  cursor: pointer; border: none;
  height: 38px; box-sizing: border-box;
  display: inline-flex; align-items: center;
}
.btn-nav--lleno { background: var(--navy); color: #fff; }
.btn-nav--lleno:hover { background: #1a3f66; }
.btn-nav--vacio { background: transparent; color: var(--navy); border: 1.5px solid var(--navy-border); }
.btn-nav--vacio:hover { background: var(--navy-alpha); }

.dark-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--navy-border); background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--texto-sec);
  transition: all var(--transition);
  box-sizing: border-box;
}
.dark-toggle:hover { background: var(--navy-alpha); transform: rotate(15deg); }

.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--texto); border-radius: 2px;
  transition: all 0.25s;
}

/* ===== MAIN ===== */
.main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.page-desc {
  color: var(--texto-sec);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 48px 32px;
  border-radius: 20px;
  margin-bottom: 40px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5a 50%, #2a1a3a 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(201,162,39,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(139,92,246,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glass {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}
.hero-glass h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero-glass h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--dorado), #e0b930, var(--dorado));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
.hero-glass p {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto 20px;
}
.hero-glass .btn {
  background: var(--dorado);
  color: #fff;
  border-radius: var(--radius-round);
  padding: 10px 28px;
  font-size: 0.9rem;
  transition: all var(--bounce);
}
.hero-glass .btn:hover { background: var(--dorado-hover); transform: scale(1.04); }

/* ===== ORBS ===== */
.orbs-section { margin-bottom: 48px; }
.orbs-head { text-align: center; margin-bottom: 28px; }
.orbs-head h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.orbs-head p { color: var(--texto-sec); font-size: 0.88rem; }

.orbs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.orb {
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}
.orb-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
  transition: all var(--bounce);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.orb-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.orb-circle:active {
  transform: scale(0.88);
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.orb-circle.clicked {
  animation: orb-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes orb-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.18); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.orb-circle::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  opacity: 0;
  transition: all var(--transition);
}
.orb:hover .orb-circle { transform: scale(1.12); }
.orb:hover .orb-circle::after { opacity: 1; inset: -6px; }
.orb:hover .orb-label { transform: translateY(2px); opacity: 1; }

.orb:nth-child(2) .orb-circle {  }
.orb:nth-child(3) .orb-circle {  }
.orb:nth-child(4) .orb-circle {  }
.orb:nth-child(5) .orb-circle {  }
.orb:nth-child(6) .orb-circle {  }

.orb-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--texto-sec);
  transition: all var(--transition);
  opacity: 0.85;
}
.orb-sub {
  font-size: 0.62rem;
  color: var(--texto-claro);
  text-align: center;
  margin-top: -6px;
}

.orb-def .orb-circle { background: var(--orb-def); }
.orb-gua .orb-circle { background: var(--orb-gua); }
.orb-sal .orb-circle { background: var(--orb-sal); }
.orb-com .orb-circle { background: var(--orb-com); }
.orb-cul .orb-circle { background: var(--orb-cul); }
.orb-bia .orb-circle { background: var(--orb-bia); }
.orb-chef .orb-circle { background: linear-gradient(135deg, #D4873A, #A06020); }

.orb-link { position: absolute; inset: 0; z-index: 2; }

/* ===== SOCIAL HUB ===== */
.social-hub {
  position: fixed;
  right: 20px;
  bottom: 140px;
  z-index: 60;
}
.social-hub-toggle {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(15,42,71,0.2);
  transition: all var(--bounce);
  position: relative;
  z-index: 2;
}
.social-hub-toggle:hover { transform: scale(1.08); }
.social-hub-toggle.open { transform: rotate(45deg); background: var(--dorado); }
.social-hub-items {
  position: absolute;
  bottom: 60px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
}
.social-hub.open .social-hub-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.social-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-width: 140px;
  justify-content: center;
  border-radius: var(--radius-round);
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  color: var(--texto);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--sombras);
  animation: fade-up 0.3s ease backwards;
}
.social-item:nth-child(1) { animation-delay: 0.05s; }
.social-item:nth-child(2) { animation-delay: 0.1s; }
.social-item:nth-child(3) { animation-delay: 0.15s; }
.social-item:nth-child(4) { animation-delay: 0.2s; }
.social-item:nth-child(5) { animation-delay: 0.25s; }
.social-item:nth-child(6) { animation-delay: 0.3s; }
.social-item:nth-child(7) { animation-delay: 0.35s; }
.social-item:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.social-item-icono { font-size: 1rem; }
.social-item svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== CHAT + COMERCIO SPLIT ===== */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.glass-card:hover {
  box-shadow: var(--card-hover);
}
.glass-card-body { padding: 12px 14px; }
.glass-card-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--navy-border);
  text-align: center;
}

/* ===== FEED ===== */
.feed-sec { margin-bottom: 0; min-width: 0; }
.feed-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.feed-item {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--navy-border);
}
.feed-item:last-child { border-bottom: none; }
.feed-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-alpha);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--navy);
  flex-shrink: 0;
}
.feed-cuerpo { flex: 1; min-width: 0; }
.feed-nombre { font-weight: 600; font-size: 0.8rem; }
.feed-texto { font-size: 0.82rem; color: var(--texto-sec); overflow-wrap: anywhere; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-hora { font-size: 0.68rem; color: var(--texto-claro); }
.feed-vacio {
  text-align: center;
  padding: 32px 16px;
  color: var(--texto-claro);
}

/* ===== COMERCIO ===== */
.comercio-sec { margin-bottom: 0; }
.comercio-head {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.comercio-list { display: flex; flex-direction: column; gap: 8px; }
.com-card {
  padding: 12px 14px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: var(--crema-card);
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 3px;
}
.com-card:hover { box-shadow: var(--card-hover); }
.com-card-icono { font-size: 1.2rem; }
.com-card-nombre { font-weight: 600; font-size: 0.82rem; }
.com-card-desc { font-size: 0.7rem; color: var(--texto-sec); line-height: 1.3; }
.com-card-tag {
  font-size: 0.6rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: var(--navy-alpha); color: var(--navy);
  align-self: flex-start;
  margin-top: 2px;
}

/* ===== MAPA ===== */
.mapa-sec { margin-bottom: 40px; }
.mapa-sec-titulo {
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.mapa-sec-sub {
  color: var(--texto-sec); font-size: 0.85rem;
  margin-bottom: 14px;
}
.mapa-placeholder {
  border: 2px dashed var(--navy-border);
  border-radius: var(--radius);
  background: var(--crema-alt);
  min-height: 200px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 28px;
  text-align: center; color: var(--texto-claro);
}
.mapa-placeholder-icono { font-size: 2rem; opacity: 0.5; }
.mapa-placeholder-texto { font-size: 0.88rem; font-weight: 500; }
.mapa-placeholder-sub { font-size: 0.75rem; max-width: 280px; }

/* ===== PROYECTOS ===== */
.proys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.proy-card {
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  background: var(--crema-card);
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.proy-card:hover { box-shadow: var(--card-hover); transform: translateY(-3px); }
.proy-card-icono { font-size: 1.5rem; }
.proy-card-nombre { font-weight: 600; font-size: 0.88rem; }
.proy-card-desc { color: var(--texto-sec); font-size: 0.75rem; line-height: 1.4; }
.proy-card-estado {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--estado-color, var(--texto-sec));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.proy-card-enlace { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--navy-border);
  padding: 40px 24px 24px;
  margin-top: 48px;
  background: var(--crema);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand > div { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--dorado); object-fit: cover; }
.footer-brand strong { color: var(--texto); font-size: 0.95rem; }
.footer-brand > div span { color: var(--texto-sec); font-size: 0.8rem; }
.footer-vision { font-size: 0.78rem; color: var(--texto-sec); line-height: 1.5; margin-top: 4px; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; color: var(--texto); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { color: var(--texto-sec); font-size: 0.78rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--texto); }
.footer-social-divider {
  height: 1px;
  background: var(--navy-border);
  margin: 6px 0 4px;
}
.footer-bot {
  border-top: 1px solid var(--navy-border);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--texto-claro);
}
.footer-bot em { font-style: normal; }
.footer-frase { color: var(--texto-claro); font-size: 0.7rem; }

/* ===== WHATSAPP / SCROLL ===== */
.whatsapp-float {
  position: fixed; bottom: 80px; right: 20px; z-index: 50;
}
.whatsapp-float a {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  transition: all var(--bounce);
}
.whatsapp-float a:hover { transform: scale(1.1) rotate(-8deg); box-shadow: 0 6px 24px rgba(37,211,102,0.4); }

/* ===== BOTS (BIA) FLOAT ===== */
.bots-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
}
.bots-float-toggle {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15,42,71,0.2);
  transition: all var(--bounce);
  position: relative;
  z-index: 2;
}
.bots-float-toggle img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.bots-float-toggle:hover { transform: scale(1.08); }
.bots-float.open .bots-float-toggle { box-shadow: 0 4px 16px rgba(212,135,58,0.4); }
.bots-float-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
}
.bots-float.open .bots-float-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.bot-float-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--crema-card);
  border: 2px solid var(--navy-border);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--sombras);
  animation: fade-up 0.3s ease backwards;
  position: relative;
}
.bot-float-item img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.bot-float-item::after {
  content: attr(title);
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  pointer-events: none;
}
.bot-float-item:hover::after {
  opacity: 1;
  visibility: visible;
}
.bot-float-item:nth-child(1) { animation-delay: 0.05s; }
.bot-float-item:nth-child(2) { animation-delay: 0.1s; }
.bot-float-item:nth-child(3) { animation-delay: 0.15s; }
.bot-float-item:nth-child(4) { animation-delay: 0.2s; }
.bot-float-item:nth-child(5) { animation-delay: 0.25s; }
.bot-float-item:nth-child(6) { animation-delay: 0.3s; }
.bot-float-item:hover { transform: scale(1.1); border-color: var(--dorado); }

body.bots-open .social-hub,
body.bots-open .whatsapp-float {
  opacity: 0;
  visibility: hidden;
}

/* ===== POPUP DE BOT ===== */
.bot-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15,42,71,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.bot-popup.open {
  opacity: 1;
  visibility: visible;
}
.bot-popup-card {
  background: var(--crema-card);
  border-radius: 16px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  position: relative;
  transform: translateY(12px);
  transition: all var(--bounce);
  overflow: hidden;
}
.bot-popup.open .bot-popup-card { transform: translateY(0); }
.bot-popup-x {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.bot-popup-x:hover { color: var(--dorado); transform: scale(1.15); }

/* Cabecera del chat */
.bot-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy), #1a3f66);
  color: #fff;
}
.bot-chat-head img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--dorado);
  flex-shrink: 0;
}
.bot-chat-head h4 { margin: 0; font-size: 0.98rem; color: #fff; }
.bot-chat-head span { font-size: 0.72rem; color: #9ecb5a; }

/* Mensajes */
.bot-chat-msgs {
  padding: 14px;
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--crema);
}
.bot-chat-msgs .bot-msg {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bot-chat-msgs .bot-msg.usuario {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bot-chat-msgs .bot-msg.asistente {
  align-self: flex-start;
  background: #fff;
  color: var(--texto);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px var(--sombras);
}
[data-theme="dark"] .bot-chat-msgs .bot-msg.asistente {
  background: var(--crema-alt);
  color: var(--texto);
}

/* Formulario */
.bot-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--crema-card);
  border-top: 1px solid var(--navy-border);
}
.bot-chat-form input {
  flex: 1;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-round);
  padding: 9px 14px;
  font-size: 0.84rem;
  background: var(--crema);
  color: var(--texto);
  outline: none;
}
.bot-chat-form input:focus { border-color: var(--dorado); }
.bot-chat-form button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--dorado);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--bounce);
  flex-shrink: 0;
}
.bot-chat-form button:hover { transform: scale(1.08); background: var(--dorado-hover); }

/* Login requerido */
.bot-chat-login {
  padding: 14px;
  background: var(--crema-card);
  border-top: 1px solid var(--navy-border);
  text-align: center;
}
.bot-chat-login > span {
  display: block;
  font-size: 0.8rem;
  color: var(--texto-sec);
  margin-bottom: 10px;
}
.bot-chat-login > div { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.scroll-top {
  position: fixed; bottom: 20px; left: 20px; z-index: 50;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--sombras);
  transition: all var(--transition);
  opacity: 0; visibility: hidden; transform: translateY(10px);
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: #1a3f66; transform: translateY(-3px); }

.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 4px; color: var(--texto); }
.fi {
  width: 100%; padding: 9px 14px;
  border: 1.5px solid var(--navy-border); border-radius: var(--radius-sm);
  background: var(--crema); color: var(--texto);
  font-size: 0.85rem; font-family: var(--font);
  transition: border-color var(--transition);
}
.fi:focus { outline: none; border-color: var(--navy); }
.fe { color: #c0392b; font-size: 0.78rem; margin-bottom: 10px; }
.btn-full { width: 100%; }

/* ===== MODAL (login principal) ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
}
.modal-x {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 1.5rem; color: var(--texto-claro);
  cursor: pointer; line-height: 1;
}
.modal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.modal .sub { color: var(--texto-sec); font-size: 0.85rem; margin-bottom: 20px; }
.modal-foot { text-align: center; font-size: 0.82rem; color: var(--texto-sec); margin-top: 16px; }
.modal-foot a { color: var(--navy); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-round);
  font-size: 0.85rem; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: #1a3f66; }
.btn--dorado { background: var(--dorado); color: #fff; }
.btn--dorado:hover { background: var(--dorado-hover); }
.btn--crema { background: var(--crema); color: var(--texto); border: 1.5px solid var(--navy-border); }
.btn--crema:hover { background: var(--crema-alt); }
.btn--ghost { background: transparent; color: var(--texto-sec); }
.btn--ghost:hover { color: var(--texto); background: var(--navy-alpha); }
.btn-lg { padding: 10px 26px; font-size: 0.95rem; }
.btn-sm { padding: 6px 16px; font-size: 0.78rem; }

/* ===== UTILITIES ===== */
.tc { text-align: center; }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 32px; }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.in.r1 { transition-delay: 0s; }
.reveal.in.r2 { transition-delay: 0.08s; }
.reveal.in.r3 { transition-delay: 0.16s; }
.reveal.in.r4 { transition-delay: 0.24s; }
.reveal.in.r5 { transition-delay: 0.32s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-logo-text { display: none; }
  .nav-logo-bua { display: inline; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--crema); border-bottom: 1px solid var(--navy-border);
    padding: 8px 16px 16px; gap: 2px;
    z-index: 99;
  }
  .nav-links.open > li { flex-shrink: 0; }
  .nav-item-dropdown { position: static; }
  .nav-dropdown-trigger {
    font-weight: 600; font-size: 0.82rem;
    cursor: pointer; pointer-events: auto;
  }
  .nav-dropdown-menu { display: none; position: static; border: none; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
  .nav-dropdown-menu.open { display: block; }
  .nav-item-nested { position: static; }
  .nav-nested-menu { display: none; position: static; border: none; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
  .nav-nested-menu.open { display: block; }
  .nav-mobile-actions {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--navy-border);
  }
  .nav-mobile-actions .mobile-badge { justify-content: center; }
  .orb { width: 100px; }
  .orb-circle { width: 85px; height: 85px; font-size: 1.8rem; }
  .split-2 { grid-template-columns: 1fr; }
  .hero { padding: 36px 20px; }
  .hero-glass h1 { font-size: 1.4rem; }
  .orbs-grid { gap: 20px; }
  .social-hub { right: 12px; bottom: 134px; }
  .whatsapp-float { right: 12px; bottom: 74px; }
  .bots-float { right: 12px; bottom: 14px; }
  .scroll-top { left: 12px; bottom: 16px; }
  .social-item { min-width: 120px; font-size: 0.75rem; padding: 6px 12px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-bot { flex-direction: column; gap: 4px; text-align: center; }
  .footer-vision { max-width: 100%; }
}

@media (max-width: 480px) {
  .proys-grid { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 60px; }
  .orb { width: 85px; }
  .orb-circle { width: 72px; height: 72px; font-size: 1.5rem; }
  .hero { padding: 28px 16px; }
  .hero-glass h1 { font-size: 1.2rem; }
  .footer-top { grid-template-columns: 1fr; gap: 16px; }
  .footer { padding: 24px 16px 16px; }
  .social-hub { right: 8px; bottom: 130px; }
  .whatsapp-float { right: 8px; bottom: 70px; }
  .bots-float { right: 8px; bottom: 10px; }
  .scroll-top { left: 8px; bottom: 12px; }
  .social-hub-toggle { width: 44px; height: 44px; font-size: 1rem; }
  .bots-float-toggle { width: 44px; height: 44px; }
  .whatsapp-float a { width: 44px; height: 44px; }
  .social-item { min-width: 100px; font-size: 0.7rem; padding: 5px 10px; gap: 6px; }
  .page-title { font-size: 1.3rem; }
  .contenidos-grid { grid-template-columns: 1fr; }
  .grupos-grid { grid-template-columns: 1fr 1fr; }
  .form-panel .fr { grid-template-columns: 1fr; }
}

/* ===== CONTENT PAGES ===== */
.phero {
  padding: 36px 24px;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: #fff;
}
.phero .sello {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12);
  padding: 4px 14px; border-radius: var(--radius-round);
  font-size: 0.7rem; font-weight: 600;
  color: var(--dorado-claro, #e0b930);
}
.phero h1 { font-size: 1.5rem; font-weight: 800; margin: 10px 0 6px; }
.phero h1 em { font-style: normal; display: block; font-size: 1.1rem; opacity: 0.85; }
.phero p { font-size: 0.88rem; opacity: 0.8; max-width: 480px; margin: 0 auto; }

.contenido { max-width: 700px; margin: 0 auto 40px; }
.contenido h2 { font-size: 1.25rem; font-weight: 700; margin: 32px 0 10px; }
.contenido h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }
.contenido p { font-size: 0.9rem; line-height: 1.7; color: var(--texto-sec); margin-bottom: 10px; }
.contenido p strong { color: var(--texto); }
.contenido ul { padding-left: 20px; margin-bottom: 14px; }
.contenido ul li { font-size: 0.9rem; line-height: 1.6; color: var(--texto-sec); margin-bottom: 5px; list-style: disc; }
.contenido ul li strong { color: var(--texto); }

.tl { padding-left: 20px; border-left: 2px solid var(--navy-border); margin: 12px 0; }
.tl-item { padding: 8px 0 8px 28px; position: relative; }
.tl-dot { position: absolute; left: -7px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--dorado); border: 2px solid var(--crema); }
.tl-date { font-size: 0.72rem; font-weight: 700; color: var(--dorado); }
.tl-titulo { font-size: 0.9rem; font-weight: 600; margin: 2px 0; }
.tl-texto { font-size: 0.8rem; color: var(--texto-sec); }

.callout { padding: 14px 16px; border-radius: var(--radius); background: var(--crema-card); border: 1px solid var(--navy-border); margin-bottom: 10px; }
.callout-icon { font-size: 1.15rem; margin-bottom: 3px; }
.callout h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.callout p { font-size: 0.82rem; color: var(--texto-sec); margin: 0; }

.cita { background: var(--crema-card); border-left: 3px solid var(--dorado); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.92rem; font-style: italic; color: var(--texto-sec); margin-bottom: 10px; }

.form-panel { max-width: 440px; margin: 0 auto; }
.form-panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.form-panel > p { color: var(--texto-sec); font-size: 0.85rem; margin-bottom: 20px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select.fi { appearance: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='12' height='12' fill='%239A8A7A'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }

.grupos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.grupo-card { border: 1px solid var(--navy-border); border-radius: var(--radius); padding: 16px 14px; background: var(--crema-card); transition: all var(--transition); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.grupo-card:hover { box-shadow: var(--card-hover); transform: translateY(-2px); }
.grupo-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--dorado); }
.grupo-icono { font-size: 1.3rem; margin-bottom: 5px; }
.grupo-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 3px; }
.grupo-card p { font-size: 0.75rem; color: var(--texto-sec); line-height: 1.4; }

/* ===== CHAT & BOT ===== */
.chat-wrap { border: 1px solid var(--navy-border); border-radius: var(--radius); background: var(--crema-card); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--crema-alt); border-bottom: 1px solid var(--navy-border); font-size: 0.85rem; font-weight: 600; }
.chat-head span { color: var(--texto-claro); font-weight: 400; font-size: 0.82rem; }
.chat-msgs { padding: 14px; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 80%; min-width: 0; padding: 8px 12px; border-radius: var(--radius); font-size: 0.85rem; line-height: 1.4; }
.chat-msg.propio { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.otro { align-self: flex-start; background: var(--crema-alt); border: 1px solid var(--navy-border); border-bottom-left-radius: 4px; }
.chat-msg .chat-msg-autor { font-size: 0.68rem; font-weight: 600; margin-bottom: 2px; opacity: 0.7; }
.chat-msg .chat-msg-text { font-size: 0.85rem; line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.chat-msg .chat-msg-hora { font-size: 0.62rem; opacity: 0.6; margin-top: 3px; text-align: right; }
.chat-input { padding: 10px 14px; border-top: 1px solid var(--navy-border); display: flex; gap: 8px; }
.chat-input input { flex: 1; }

.chat-login-box {
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  background: var(--crema-card);
  text-align: center;
  padding: 40px 24px;
  max-width: 460px;
  margin: 0 auto;
}
.chat-login-icon { font-size: 2.6rem; margin-bottom: 10px; }
.chat-login-box h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--texto); }
.chat-login-box p { font-size: 0.85rem; color: var(--texto-sec); max-width: 360px; margin: 0 auto 18px; line-height: 1.5; }
.chat-login-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.bot-wrap { max-width: 600px; margin: 0 auto; }
.bot-panel { border: 1px solid var(--navy-border); border-radius: var(--radius); background: var(--crema-card); overflow: hidden; }
.bot-head { padding: 14px; text-align: center; border-bottom: 1px solid var(--navy-border); }
.bot-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.15); animation: pulse-glow 3s ease-in-out infinite; }
.bot-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.bot-head h3 { font-size: 0.95rem; font-weight: 700; }
.bot-head p { font-size: 0.78rem; color: var(--texto-sec); margin-top: 4px; }
.bot-msgs { padding: 14px; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bot-msg { max-width: 88%; padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; }
.bot-msg.asistente { align-self: flex-start; background: var(--crema-alt); border: 1px solid var(--navy-border); border-bottom-left-radius: 4px; }
.bot-msg.usuario { align-self: flex-end; background: var(--bot-bia); color: #fff; border-bottom-right-radius: 4px; }
.bot-input { padding: 10px 14px; border-top: 1px solid var(--navy-border); display: flex; gap: 8px; }
.bot-input input { flex: 1; }
.bot-nota { text-align: center; font-size: 0.7rem; color: var(--texto-claro); font-style: italic; margin-top: 10px; }
/* Typing indicator */
.bot-typing-container { align-self: flex-start; padding: 6px 14px; }
.bot-escribiendo { display: flex; gap: 4px; align-items: center; padding: 8px 14px; background: var(--crema-alt); border: 1px solid var(--navy-border); border-radius: var(--radius); border-bottom-left-radius: 4px; }
.bot-escribiendo span { width: 7px; height: 7px; border-radius: 50%; background: var(--texto-claro); display: inline-block; animation: bounce-typing 1.4s infinite ease-in-out both; }
.bot-escribiendo span:nth-child(1) { animation-delay: 0s; }
.bot-escribiendo span:nth-child(2) { animation-delay: 0.16s; }
.bot-escribiendo span:nth-child(3) { animation-delay: 0.32s; }
@keyframes bounce-typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.bot-msg.typewriter::after {
  content: '|';
  animation: blink-cursor 0.7s step-end infinite;
  margin-left: 2px;
  font-weight: 300;
  opacity: 0.7;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== CONTENIDOS (Netflix-style) ===== */
.contenidos-hero {
  padding: 40px 24px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  color: #fff;
  background: linear-gradient(135deg, #1a1a2e, #2a1a3a, #1a2a3a);
  text-align: center;
}
.contenidos-hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.contenidos-hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--dorado), #e0b930); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.contenidos-hero p { font-size: 0.85rem; opacity: 0.8; }

.contenidos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.contenido-card {
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--crema-card);
  transition: all var(--transition);
  position: relative;
}
.contenido-card:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-4px);
}
.contenido-card-thumb {
  aspect-ratio: 16/9;
  background: var(--navy-alpha);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}
.contenido-card-thumb::after {
  content: '▶';
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: all var(--transition);
}
.contenido-card:hover .contenido-card-thumb::after { opacity: 1; }
.contenido-card-body { padding: 12px; }
.contenido-card-titulo { font-weight: 600; font-size: 0.82rem; margin-bottom: 2px; }
.contenido-card-desc { font-size: 0.7rem; color: var(--texto-sec); line-height: 1.3; }
.contenido-card-tag {
  display: inline-block;
  font-size: 0.58rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: var(--navy-alpha); color: var(--navy);
  margin-top: 6px;
}
.contenido-card-link { position: absolute; inset: 0; z-index: 1; }

/* ===== COMERCIO ACCORDION ===== */
.comercio-accordion { display: flex; flex-direction: column; gap: 6px; }
.ca-item { border: 1px solid var(--navy-border); border-radius: var(--radius); overflow: hidden; }
.ca-trigger {
  width: 100%; padding: 10px 14px;
  background: var(--crema-card);
  border: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; font-family: var(--font);
  color: var(--texto);
  display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition);
}
.ca-trigger:hover { background: var(--crema-alt); }
.ca-arrow { font-size: 0.65rem; transition: transform var(--transition); }
.ca-item.open .ca-arrow { transform: rotate(180deg); }
.ca-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 14px;
  font-size: 0.82rem; color: var(--texto-sec); line-height: 1.5;
}
.ca-item.open .ca-body {
  max-height: 600px;
  padding: 10px 14px 14px;
}
.ca-body ul { margin-top: 6px; }
.ca-body .com-card { margin-top: 8px; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--texto-claro); }
.empty-state-icon { font-size: 2.4rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--texto); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; max-width: 360px; margin: 0 auto; }

/* ===== RADIO ===== */
.radio-page {
  max-width: 780px;
  margin: 0 auto;
}
.radio-hero {
  padding: 40px 32px;
  border-radius: 20px;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #0f2a47 0%, #1a3a5a 50%, #2a1a3a 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
}
.radio-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(201,162,39,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(139,92,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.radio-hero-content { position: relative; z-index: 1; }
.radio-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-round);
  background: rgba(201,162,39,0.15);
  color: var(--dorado);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.radio-hero h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.radio-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--dorado), #e0b930);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.radio-hero p { font-size: 0.88rem; opacity: 0.8; max-width: 400px; margin: 0 auto; }

.radio-section { margin-bottom: 40px; }
.radio-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.radio-section-sub { font-size: 0.82rem; color: var(--texto-claro); margin-bottom: 16px; }

.player-container {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.player-art { font-size: 3rem; }
.player-now {
  font-size: 0.85rem;
  color: var(--texto-sec);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.player-controls { display: flex; gap: 8px; }
.player-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--bounce), background var(--transition);
}
.player-btn:hover { background: #1a3f66; transform: scale(1.05); }
.player-btn:active { transform: scale(0.95); }
.player-timer { font-size: 0.78rem; color: var(--texto-claro); font-family: var(--mono); }

.radio-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.radio-card {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
  position: relative;
}
.radio-card:hover { box-shadow: var(--card-hover); border-color: var(--navy); }
.radio-card-icon { font-size: 1.6rem; margin-bottom: 8px; }
.radio-card-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.radio-card-chapter {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--dorado);
  color: #fff;
  margin-bottom: 6px;
}
.radio-card-desc { font-size: 0.76rem; color: var(--texto-sec); line-height: 1.4; margin-bottom: 8px; }
.radio-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--navy-border);
}
.radio-card-autor { font-size: 0.7rem; color: var(--texto-claro); }
.podcast-controls { display: flex; align-items: center; gap: 6px; }
.podcast-timer { font-size: 0.65rem; color: var(--texto-claro); font-family: var(--mono); white-space: nowrap; }

.player-btn-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--navy-border);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.player-btn-sm:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== VIDEO CARDS (inline player with preview) ===== */
.video-series { margin-bottom: 24px; }
.series-hdr {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--navy-border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.series-count { font-size: 0.75rem; color: var(--texto-claro); font-weight: 400; }

.video-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.vid-card {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.vid-card:hover { box-shadow: var(--card-hover); }

.vid-preview {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}
.vid-preview-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.vid-preview-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.vid-preview-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
  transition: background var(--transition);
}
.vid-preview:hover .vid-preview-overlay { background: rgba(0,0,0,0.35); }
.vid-play-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--bounce);
}
.vid-play-btn:hover { background: var(--navy); border-color: var(--navy); transform: scale(1.08); }

.vid-body { padding: 12px; }
.vid-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.vid-desc { font-size: 0.76rem; color: var(--texto-sec); line-height: 1.4; margin-bottom: 6px; }
.vid-ft {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--navy-border);
}

.vid-player-wrap {
  position: relative;
  background: #000;
  line-height: 0;
}
.vid-close-overlay {
  position: absolute; top: 8px; right: 8px; z-index: 10;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.vid-close-overlay:hover { background: rgba(239,68,68,0.8); }
.vid-player { width: 100%; display: block; max-height: 70vh; }

/* ===== PODCAST CARDS ===== */
.podcast-series { margin-bottom: 16px; }
.pod-card {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 14px;
  transition: all var(--transition);
  margin-bottom: 8px;
}
.pod-card:hover { box-shadow: var(--card-hover); border-color: var(--navy); }
.pod-card-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.pod-card-desc { font-size: 0.76rem; color: var(--texto-sec); line-height: 1.4; margin-bottom: 6px; }
.pod-playlist-tag { font-size: 0.68rem; color: var(--texto-claro); margin-bottom: 6px; }
.pod-card-ft {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--navy-border);
}
.pod-autor { font-size: 0.7rem; color: var(--texto-claro); }
.pod-card-actions { display: flex; align-items: center; gap: 8px; }
.pod-timer { font-size: 0.65rem; color: var(--texto-claro); font-family: var(--mono); white-space: nowrap; }
.pod-play {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--navy-border);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.pod-play:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== GESTIÓN DE LISTAS (creador) ===== */
.pl-item {
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  overflow: hidden;
  background: var(--crema);
}
.pl-hdr {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.pl-hdr:hover { background: var(--crema-alt); }
.pl-name { font-weight: 600; font-size: 0.85rem; flex: 1; }
.pl-count {
  font-size: 0.7rem; color: var(--texto-claro);
  background: var(--navy-alpha); padding: 1px 8px; border-radius: 20px;
}
.pl-hdr-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pl-hdr-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 0.78rem; padding: 2px 4px; border-radius: 4px;
  transition: background var(--transition); line-height: 1;
}
.pl-hdr-actions button:hover { background: var(--navy-alpha); }
.pl-expand-icon { font-size: 0.6rem; color: var(--texto-claro); margin-left: 4px; }
.pl-body { padding: 6px 10px 10px; border-top: 1px solid var(--navy-border); }
.pl-item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 4px;
  font-size: 0.8rem;
  transition: background var(--transition);
}
.pl-item-row:hover { background: var(--crema-alt); }
.pl-item-icon { font-size: 0.9rem; flex-shrink: 0; }
.pl-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-item-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item-chapter { font-size: 0.68rem; color: var(--texto-claro); }
.pl-item-play {
  background: none; border: 1px solid var(--navy-border);
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.pl-item-play:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.pl-item-remove {
  background: none; border: none; cursor: pointer;
  font-size: 0.7rem; color: var(--texto-claro); padding: 2px 4px;
  border-radius: 4px; transition: all var(--transition); flex-shrink: 0;
}
.pl-item-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

.vid-actions { display: flex; align-items: center; gap: 4px; }

/* ===== UPLOAD INLINE ===== */
.upload-file-btn:hover { background: var(--crema-alt); border-color: var(--navy); }
.upload-tab.active { background: var(--crema-alt) !important; font-weight: 600 !important; color: var(--texto) !important; }
#upNewListBtn:hover { background: var(--crema-alt); border-color: var(--navy); }

/* ===== LISTAS PÚBLICAS ===== */
.pl-public {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.pl-public-hdr {
  padding: 12px 14px;
  font-weight: 700; font-size: 0.95rem;
  border-bottom: 1px solid var(--navy-border);
  background: var(--crema-alt);
  display: flex; align-items: center; gap: 6px;
}
.pl-public-autor { font-weight: 400; font-size: 0.8rem; color: var(--texto-sec); }
.pl-public-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--navy-border);
  transition: background var(--transition);
}
.pl-public-row:last-child { border-bottom: none; }
.pl-public-row:hover { background: var(--crema-alt); }
.pl-public-icon { font-size: 0.9rem; flex-shrink: 0; }
.pl-public-info { flex: 1; min-width: 0; }
.pl-public-title { font-weight: 500; font-size: 0.85rem; }
.pl-public-chapter { font-size: 0.7rem; color: var(--texto-claro); display: block; margin-top: 1px; }
.pl-public-play {
  background: none; border: 1.5px solid var(--navy-border);
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.pl-public-play:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.radio-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--texto-claro);
  font-size: 0.85rem;
}

.radio-panel-box {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.radio-auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--crema-alt);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.radio-auth-tab {
  flex: 1;
  padding: 7px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--texto-sec);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.radio-auth-tab.active { background: var(--crema-card); color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.radio-auth-form { display: none; }
.radio-auth-form.active { display: block; }
.radio-auth-msg { font-size: 0.82rem; margin-bottom: 8px; }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn--navy { background: var(--navy); color: #fff; border: none; }
.btn--navy:hover { background: #1a3f66; }
.btn--ghost { background: transparent; border: 1.5px solid var(--navy-border); color: var(--texto-sec); }
.btn--ghost:hover { background: var(--navy-alpha); }
.btn-full { width: 100%; }

/* ===== ECUALIZADOR ===== */
.player-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin: 2px 0;
}
.player-eq span {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--navy);
  transition: height 0.2s ease;
}
.player-eq.playing span {
  animation: eq-bar 0.9s ease-in-out infinite;
}
.player-eq.playing span:nth-child(2) { animation-delay: 0.2s; }
.player-eq.playing span:nth-child(3) { animation-delay: 0.4s; }
.player-eq.playing span:nth-child(4) { animation-delay: 0.6s; }
.player-eq.playing span:nth-child(5) { animation-delay: 0.8s; }
@keyframes eq-bar {
  0%, 100% { height: 6px; }
  50% { height: 24px; }
}

/* ===== TABS PROGRAMA / VIDEOS ===== */
.radio-view-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 6px;
}
.radio-view-tab {
  padding: 9px 22px;
  border: 1.5px solid var(--navy-border);
  background: var(--crema-card);
  color: var(--texto-sec);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.radio-view-tab:hover { border-color: var(--navy); color: var(--texto); }
.radio-view-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== BOTÓN CARGAR MÁS ===== */
.radio-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}
.radio-load-more {
  padding: 10px 26px;
  border: 1.5px solid var(--navy-border);
  background: var(--crema-card);
  color: var(--texto);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.radio-load-more:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ===== SERIES (programas unificados) ===== */
#seriesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
#seriesGrid .radio-empty { grid-column: 1 / -1; }
.serie-card {
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.serie-card:hover { box-shadow: var(--card-hover); border-color: var(--navy); }
.serie-card.open { border-color: var(--navy); }
.serie-cover {
  position: relative;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.serie-cover.serie-cover--img {
  height: auto;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--navy);
}
.serie-cover-emoji { font-size: 2.4rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35)); }
.serie-body { padding: 12px 14px; }
.serie-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.serie-titles { flex: 1; min-width: 0; }
.serie-name { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.serie-meta { font-size: 0.72rem; color: var(--texto-claro); margin-top: 2px; }
.serie-toggle {
  font-size: 0.65rem;
  color: var(--texto-claro);
  background: var(--navy-alpha);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.serie-eps {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.serie-eps.open { max-height: 900px; }
.serie-ep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-top: 1px solid var(--navy-border);
}
.serie-ep-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dorado);
  font-family: var(--mono);
  width: 24px;
  flex-shrink: 0;
}
.serie-ep-info { flex: 1; min-width: 0; }
.serie-ep-title { font-weight: 500; font-size: 0.84rem; }
.serie-ep-desc { font-size: 0.74rem; color: var(--texto-sec); line-height: 1.4; margin-top: 2px; }
.serie-ep .pod-timer { flex-shrink: 0; }

[data-theme="dark"] .serie-card { background: var(--crema-card); }
[data-theme="dark"] .serie-ep-num { color: var(--dorado); }

/* ===== VIDEOS (series) ===== */
.video-series { margin-bottom: 24px; }
.video-series .series-hdr {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--navy-border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-series .series-count { font-size: 0.75rem; color: var(--texto-claro); font-weight: 400; }

/* ===== MAP VIEWER ===== */
.map-viewer {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  user-select: none;
}
.map-viewer-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--crema-card);
  border: 1px solid var(--navy-border);
  box-shadow: var(--card-shadow);
}
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 0.77;
  background: var(--crema-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1200px;
}
.map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}
.map-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(15,42,71,0.7);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--bounce);
  backdrop-filter: blur(4px);
  opacity: 0;
}
.map-viewer-main:hover .map-arrow { opacity: 1; }
.map-arrow:hover { background: var(--navy); transform: translateY(-50%) scale(1.1); }
.map-arrow:active { transform: translateY(-50%) scale(0.92); }
.map-arrow--prev { left: 10px; }
.map-arrow--next { right: 10px; }

.map-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--navy-border);
  background: var(--crema-card);
  min-height: 44px;
}
.map-meta-info { flex: 1; min-width: 0; }
.map-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--texto);
}
.map-desc {
  font-size: 0.72rem;
  color: var(--texto-claro);
  margin-top: 1px;
}
.map-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 12px;
}
.map-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--navy-border);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  flex-shrink: 0;
}
.map-dot.active {
  background: var(--navy);
  width: 22px;
  border-radius: 4px;
}
.map-dot:hover { background: var(--texto-claro); }

.map-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-border) transparent;
}
.map-thumbs::-webkit-scrollbar { height: 3px; }
.map-thumbs::-webkit-scrollbar-thumb { background: var(--navy-border); border-radius: 3px; }
.map-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--crema-alt);
  transition: all var(--transition);
  scroll-snap-align: start;
  opacity: 0.55;
}
.map-thumb:hover { opacity: 0.8; }
.map-thumb.active { border-color: var(--dorado); opacity: 1; }
.map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-counter {
  font-size: 0.72rem;
  color: var(--texto-claro);
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 10px;
}

@media (max-width: 600px) {
  .map-arrow { width: 32px; height: 32px; font-size: 0.8rem; opacity: 1; background: rgba(15,42,71,0.55); }
  .map-arrow--prev { left: 6px; }
  .map-arrow--next { right: 6px; }
  .map-thumb { width: 56px; height: 42px; }
  .map-meta { flex-wrap: wrap; gap: 6px; }
}

/* ===== GALERÍA MOSAICO ===== */
.galeria-sec { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--navy-border); }
.galeria-head { text-align: center; margin-bottom: 4px; }
.galeria-head h2 { font-size: 1.3rem; font-weight: 800; }
.galeria-head p { font-size: 0.8rem; color: var(--texto-sec); margin-bottom: 16px; }

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 150px;
  gap: 10px;
  margin-bottom: 16px;
}

.galeria-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  animation: galeria-float var(--float-d, 3s) ease-in-out infinite alternate;
  animation-delay: calc(var(--float-d, 3s) * -0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
  will-change: transform;
}

.galeria-item:hover {
  transform: scale(1.04) rotate(-0.8deg);
  z-index: 2;
}

.galeria-item-inner {
  width: 100%; height: 100%;
  position: relative; overflow: hidden;
  border-radius: inherit;
}

.galeria-item-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.galeria-item:hover .galeria-item-inner img {
  transform: scale(1.1);
  filter: brightness(0.7) saturate(1.2);
}

.galeria-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex; align-items: flex-end; padding: 12px;
}

.galeria-item:hover .galeria-item-overlay {
  opacity: 1;
}

.galeria-item-label {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1.2;
}

.galeria-toolbar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 14px;
}

.galeria-count {
  font-size: 0.75rem;
  color: var(--texto-claro);
}

@keyframes galeria-float {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(calc(var(--float-y, 4px) * -1)); }
}

/* Lightbox */
.galeria-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

.galeria-lightbox.open {
  opacity: 1; pointer-events: all;
}

.galeria-lightbox-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.galeria-lightbox-content {
  position: relative;
  max-width: 80vw; max-height: 80vh;
  display: flex; flex-direction: column;
  align-items: center;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.galeria-lightbox.open .galeria-lightbox-content {
  transform: scale(1);
}

.galeria-lightbox-img {
  max-width: 100%; max-height: 70vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  object-fit: contain;
}

.galeria-lightbox-info {
  display: flex; align-items: center; gap: 16px;
  margin-top: 12px; color: #fff;
}

.galeria-lightbox-label {
  font-size: 0.9rem; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.galeria-lightbox-counter {
  font-size: 0.75rem; opacity: 0.6;
}

.galeria-lightbox-nav {
  position: absolute; top: 50%; z-index: 1;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: none; color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.galeria-lightbox-nav:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-50%) scale(1.1);
}

.galeria-lightbox-prev { left: 20px; }
.galeria-lightbox-next { right: 20px; }

[data-theme="dark"] .galeria-lightbox-bg {
  background: rgba(0,0,0,0.92);
}

@media (max-width: 600px) {
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }
  .galeria-lightbox-content { max-width: 94vw; }
  .galeria-lightbox-img { max-height: 50vh; }
  .galeria-lightbox-nav { width: 36px; height: 36px; font-size: 1.2rem; }
  .galeria-lightbox-prev { left: 8px; }
  .galeria-lightbox-next { right: 8px; }
}

/* ===== PROYECTOS — NIVELES ===== */
.proy-nivel-header {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px;
  background: var(--crema-card);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.proy-nivel-header h2 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.proy-nivel-header p { font-size: 0.82rem; color: var(--texto-sec); margin: 4px 0 0; }
.proy-nivel-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-round);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Seguimiento cards */
.proy-seg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.proy-seg-card {
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--crema-card);
  transition: all var(--transition);
}
.proy-seg-card:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-3px);
}
.proy-seg-card p {
  font-size: 0.82rem;
  color: var(--texto-sec);
  line-height: 1.55;
  margin: 10px 0;
}
.proy-seg-head {
  display: flex; align-items: center; gap: 10px;
}
.proy-seg-icono {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--seg-color, var(--navy-alpha));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.proy-seg-nombre { font-weight: 600; font-size: 0.85rem; }
.proy-seg-estado {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--seg-color, var(--texto-sec));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Express grid */
.proy-express-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
}
.proy-express-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  background: var(--crema-card);
  transition: all var(--transition);
}
.proy-express-item:hover {
  background: var(--crema-alt);
  transform: translateX(4px);
}
.proy-express-emoji { font-size: 1.2rem; flex-shrink: 0; }
.proy-express-body { flex: 1; min-width: 0; }
.proy-express-body strong { font-size: 0.82rem; display: block; }
.proy-express-body span { font-size: 0.68rem; color: var(--texto-claro); }
.proy-express-dur {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-round);
  background: var(--navy-alpha);
  color: var(--navy);
}

@media (max-width: 600px) {
  .proy-nivel-header { flex-direction: column; gap: 8px; }
  .proy-seg-grid { grid-template-columns: 1fr; }
  .proy-express-grid { grid-template-columns: 1fr; }
}

/* ===== CALENDARIO ===== */
.cal-filtros { margin: 24px 0 8px; }
.cal-pill {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius-round);
  font-size: 0.78rem; font-weight: 600; text-decoration: none;
  background: var(--crema-alt); color: var(--texto-sec);
  border: 1px solid var(--navy-border); transition: all var(--transition);
}
.cal-pill:hover { background: var(--navy-alpha); color: var(--navy); }
.cal-pill.activo { background: var(--navy); color: #fff; border-color: var(--navy); }

.cal-lista { max-width: 640px; margin: 0 auto 48px; padding: 0 14px; }
.cal-mes {
  font-size: 1.05rem; font-weight: 700; margin: 28px 0 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--navy-border); color: var(--texto);
}

.cal-evento {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--navy-border);
}
.cal-evento:last-child { border-bottom: none; }

.cal-evento-fecha {
  min-width: 52px; text-align: center; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
}
.cal-dia { font-size: 1.4rem; font-weight: 800; line-height: 1; color: var(--texto); }
.cal-semana { font-size: 0.65rem; text-transform: uppercase; color: var(--texto-claro); letter-spacing: 0.5px; }

.cal-evento-cuerpo { flex: 1; min-width: 0; }
.cal-evento-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.cal-tag {
  display: inline-block; padding: 1px 10px; border-radius: var(--radius-round);
  font-size: 0.68rem; font-weight: 600;
}
.cal-hora { font-size: 0.72rem; color: var(--texto-claro); }
.cal-titulo { font-size: 0.92rem; font-weight: 600; margin: 2px 0; color: var(--texto); }
.cal-lugar { font-size: 0.78rem; color: var(--texto-sec); margin: 1px 0; }
.cal-desc { font-size: 0.8rem; color: var(--texto-sec); margin: 4px 0; line-height: 1.5; }
.cal-org { font-size: 0.75rem; color: var(--texto-claro); margin: 2px 0; }
.cal-link { font-size: 0.78rem; display: inline-block; margin-top: 4px; color: var(--navy); }

/* Modal */
.cal-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
  padding: 20px;
}
.cal-modal-overlay.abierto { display: flex; }
.cal-modal {
  background: var(--crema-card); border-radius: var(--radius);
  padding: 24px; max-width: 480px; width: 100%; position: relative;
  max-height: 90vh; overflow-y: auto;
}
.cal-modal-close {
  position: absolute; top: 10px; right: 14px; font-size: 1.5rem;
  background: none; border: none; cursor: pointer; color: var(--texto-claro);
  line-height: 1;
}
.cal-field { margin-bottom: 10px; }
.cal-field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 3px; color: var(--texto); }
.cal-field .fi { width: 100%; }
.cal-row { display: flex; gap: 10px; }
.cal-row .cal-field { flex: 1; }
.cal-msg { font-size: 0.82rem; margin-top: 8px; text-align: center; }

/* View switcher */
.cal-vistas {
  display: flex; gap: 0; justify-content: center; margin: 16px 0;
  background: var(--crema-card); border-radius: var(--radius-round);
  overflow: hidden; max-width: 420px; margin-left: auto; margin-right: auto;
  border: 1px solid var(--borde);
}
.cal-vista {
  flex: 1; text-align: center; padding: 8px 10px; font-size: 0.78rem;
  font-weight: 600; color: var(--texto-sec); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.cal-vista:hover { background: rgba(0,0,0,0.03); color: var(--texto); }
.cal-vista.activo { background: var(--dorado); color: #fff; }

/* Timeline image */
.cal-evento-img {
  width: 80px; min-height: 60px; flex-shrink: 0; border-radius: var(--radius);
  background-size: cover; background-position: center;
  align-self: stretch;
}

/* Grid calendar */
.cal-grid-wrap {
  max-width: 860px; margin: 20px auto; padding: 0 16px;
}
.cal-grid-nav {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-bottom: 12px;
}
.cal-grid-titulo {
  font-size: 1.05rem; font-weight: 700; min-width: 180px; text-align: center;
  color: var(--texto);
}
.cal-grid-arrow {
  font-size: 1.3rem; text-decoration: none; color: var(--texto-claro);
  padding: 4px 12px; border-radius: var(--radius-round);
  transition: background 0.2s;
}
.cal-grid-arrow:hover { background: var(--crema-card); color: var(--texto); }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; background: var(--borde); border-radius: var(--radius);
  overflow: hidden;
}
.cal-grid-hd {
  background: var(--crema-card); padding: 6px 2px; text-align: center;
  font-size: 0.72rem; font-weight: 700; color: var(--texto-sec);
  text-transform: uppercase;
}
.cal-grid-celda {
  background: var(--crema-card); min-height: 90px; padding: 4px;
  display: flex; flex-direction: column; gap: 1px;
}
.cal-grid-fuera { opacity: 0.3; }
.cal-grid-num {
  font-size: 0.78rem; font-weight: 700; color: var(--texto-claro);
  margin-bottom: 2px;
}
.cal-grid-hoy .cal-grid-num {
  color: var(--dorado); position: relative;
}
.cal-grid-hoy {
  background: rgba(201,162,39,0.06);
}
.cal-grid-ev {
  font-size: 0.62rem; line-height: 1.2; padding: 2px 3px;
  border-radius: 3px; background: var(--ev-color, var(--dorado));
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: default;
}
.cal-grid-mas {
  font-size: 0.6rem; color: var(--texto-claro); text-align: center;
  padding: 1px;
}
.cal-grid-tiene .cal-grid-num::after {
  content: ''; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--dorado);
  margin-left: 3px; vertical-align: middle;
}

/* Posters gallery */
.cal-poster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; max-width: 1000px; margin: 20px auto; padding: 0 16px;
}
.cal-poster-card {
  background: var(--crema-card); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cal-poster-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.cal-poster-img {
  width: 100%; height: 200px; background-size: cover; background-position: center;
  flex-shrink: 0;
}
.cal-poster-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.cal-poster-body {
  padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.cal-poster-body h4 { font-size: 0.9rem; font-weight: 600; margin: 0; color: var(--texto); }
.cal-poster-fecha { font-size: 0.75rem; color: var(--texto-claro); }
.cal-poster-body .cal-tag { align-self: flex-start; }

@media (max-width: 600px) {
  .cal-row { flex-direction: column; gap: 0; }
  .cal-evento { gap: 10px; }
  .cal-evento-fecha { min-width: 42px; }
}

/* ===== MERCADO AMIGO ===== */
.mc-tabs {
  display: flex; gap: 0; margin: 24px 0 0;
  background: var(--crema-card); border-radius: var(--radius-round);
  overflow: hidden; max-width: 540px; border: 1px solid var(--borde);
}
.mc-tab {
  flex: 1; text-align: center; padding: 9px 10px; font-size: 0.8rem;
  font-weight: 600; color: var(--texto-sec); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.mc-tab:hover { background: rgba(0,0,0,0.03); color: var(--texto); }
.mc-tab.activo { background: var(--dorado); color: #fff; }

.mc-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 18px 0 16px;
}
.mc-search { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.mc-search .fi { flex: 1; min-width: 0; }

.mc-pills {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
}
.mc-pill {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius-round);
  font-size: 0.77rem; font-weight: 600; text-decoration: none;
  background: var(--crema-alt); color: var(--texto-sec);
  border: 1px solid var(--navy-border); transition: all var(--transition);
}
.mc-pill:hover { background: var(--navy-alpha); color: var(--navy); }
.mc-pill.activo { background: var(--navy); color: #fff; border-color: var(--navy); }

.mc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin-bottom: 40px;
}
.mc-card {
  background: var(--crema-card); border: 1px solid var(--navy-border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.mc-card:hover { box-shadow: var(--card-hover); transform: translateY(-2px); }
.mc-card-img {
  height: 120px; background-size: cover; background-position: center;
}
.mc-card-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}
.mc-card-body { padding: 14px; }
.mc-card-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 2px 10px; border-radius: var(--radius-round);
  background: var(--navy-alpha); color: var(--navy); margin-bottom: 6px;
}
.mc-card-body h4 { font-size: 0.92rem; font-weight: 700; margin: 0 0 4px; color: var(--texto); }
.mc-card-body p { font-size: 0.8rem; color: var(--texto-sec); line-height: 1.5; margin: 0 0 8px; }
.mc-card-info { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.mc-card-info span { font-size: 0.75rem; color: var(--texto-sec); }
.mc-card-contacto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--navy-border); }
.mc-card-contacto span { font-size: 0.78rem; color: var(--texto-claro); }
.mc-wa {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-round);
  background: #25D366; color: #fff; font-size: 0.75rem; font-weight: 600;
  text-decoration: none; transition: opacity var(--transition);
}
.mc-wa:hover { opacity: 0.85; }
.mc-link { font-size: 0.78rem; color: var(--navy); }

.mc-card-top-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.mc-card-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-alpha); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.mc-card-prof { font-size: 0.78rem; color: var(--texto-claro); }

.mc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.mc-list-card {
  background: var(--crema-card); border: 1px solid var(--navy-border);
  border-radius: var(--radius); padding: 16px;
  transition: all var(--transition);
}
.mc-list-card:hover { box-shadow: var(--card-hover); }
.mc-list-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.mc-list-tipo {
  display: inline-block; padding: 2px 12px; border-radius: var(--radius-round);
  font-size: 0.72rem; font-weight: 600;
}
.mc-list-cat { font-size: 0.72rem; color: var(--texto-claro); }
.mc-list-card h4 { font-size: 0.92rem; font-weight: 700; margin: 4px 0; color: var(--texto); }
.mc-list-card p { font-size: 0.8rem; color: var(--texto-sec); line-height: 1.5; margin: 4px 0 8px; }
.mc-list-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.75rem; color: var(--texto-claro); }

/* ===== MI ESPACIO ===== */
.me-dashboard {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 32px;
}
.me-stat {
  background: var(--crema-card); border: 1px solid var(--navy-border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.me-stat-num { font-size: 2.2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.me-stat-label { font-size: 0.8rem; color: var(--texto-sec); }
.btn-xs { padding: 4px 10px; font-size: 0.7rem; }

.me-section { margin-bottom: 28px; }
.me-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--navy-border);
}
.me-section-header h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.me-empty {
  padding: 20px; text-align: center; color: var(--texto-claro);
  background: var(--crema-card); border-radius: var(--radius);
  border: 1px dashed var(--navy-border); font-size: 0.85rem;
}
.me-list { display: flex; flex-direction: column; gap: 6px; }
.me-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--crema-card);
  border: 1px solid var(--navy-border); border-radius: var(--radius-sm);
}
.me-list-body { flex: 1; min-width: 0; }
.me-list-body strong { display: block; font-size: 0.85rem; color: var(--texto); }
.me-list-body span { font-size: 0.72rem; color: var(--texto-claro); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--crema-card); border-radius: var(--radius);
  padding: 24px; width: 100%; position: relative;
  max-height: 90vh; overflow-y: auto;
}
.modal-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-h h3 { margin: 0; font-size: 1.1rem; }
.modal-x { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--texto-claro); line-height: 1; }
.modal-b label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; color: var(--texto); }
.modal-b .fi { width: 100%; }
.mc-form-actions { display: flex; gap: 8px; margin-top: 16px; }
.btn--outline { background: transparent; border: 1.5px solid var(--navy-border); color: var(--texto-sec); }
.btn--outline:hover { background: var(--navy-alpha); }

.me-list-thumb {
  width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: var(--crema-alt);
}
.mc-list-img {
  height: 100px; background-size: cover; background-position: center;
  margin: -16px -16px 10px; border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--crema-alt);
}

.me-list-actions { display: flex; gap: 4px; flex-shrink: 0; }
.me-edit-btn { background: var(--navy); color: #fff; border: none; }
.me-edit-btn:hover { background: #1a3f66; }

.mc-img-preview { margin-top: 6px; }
.mc-img-preview img { max-width: 100px; max-height: 60px; border-radius: 4px; border: 1px solid var(--navy-border); object-fit: cover; }

@media (max-width: 600px) {
  .mc-grid { grid-template-columns: 1fr; }
  .mc-tabs { max-width: 100%; border-radius: var(--radius); }
  .mc-tab { font-size: 0.72rem; padding: 8px 6px; }
  .me-dashboard { grid-template-columns: 1fr; }
}
