/* ============================================
   PORTAL PÚBLICO DE REGISTRO — CSS
   ============================================ */
:root {
  --azul:       #1A4A00;
  --azul-med:   #3D7A00;
  --dorado:     #E87722;
  --dorado-clr: #F5C400;
  --bg:         #f2f7ee;
  --trans:      .22s ease;
  --radius:     12px;
  --radius-sm:  8px;
  --sombra:     0 2px 12px rgba(0,0,0,.09);
  --sombra-lg:  0 4px 28px rgba(0,0,0,.13);
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ──────────────────────────────── */
.pub-header {
  background: linear-gradient(135deg, var(--azul) 0%, #2D6A00 100%);
  padding: 16px 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.pub-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pub-brand { display: flex; align-items: center; gap: 12px; }
.pub-logo  { font-size: 32px; display:flex; align-items:center; }
.pub-logo img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.pub-title { font-family: 'Cinzel', serif; color: #fff; font-size: 1rem; font-weight: 700; }
.pub-sub   { color: rgba(255,255,255,.65); font-size: .75rem; }

/* ── BOTONES PÚBLICOS ────────────────────── */
.btn-pub {
  display: inline-block;
  padding: 12px 24px;
  background: var(--dorado);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--trans);
  text-align: center;
}
.btn-pub:hover  { background: var(--dorado-clr); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(201,148,58,.4); }
.btn-pub.disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-pub-sm {
  display: inline-block;
  padding: 7px 16px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.3);
  transition: var(--trans);
}
.btn-pub-sm:hover { background: rgba(255,255,255,.25); }

/* ── SESIÓN BAR ──────────────────────────── */
.sesion-nombre {
  color: #fff;
  font-size: .88rem;
  margin-right: 8px;
}
#sesion-bar { display: flex; align-items: center; gap: 8px; }

/* ── MAIN ────────────────────────────────── */
.pub-main { flex: 1; padding: 32px 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── ANUNCIOS / PUBLICIDAD ───────────────── */
.anuncios-section {
  background: linear-gradient(to bottom, #fff 0%, var(--bg) 100%);
  padding: 24px 0;
  margin-bottom: 8px;
}
.anuncios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.anuncio-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  overflow: hidden;
  transition: var(--trans);
  border: 1px solid #e5e7eb;
}
.anuncio-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-lg);
}
.anuncio-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.anuncio-body { padding: 14px; }
.anuncio-titulo { font-weight: 700; color: var(--azul); margin-bottom: 6px; font-size: .95rem; }
.anuncio-desc   { font-size: .83rem; color: #64748b; margin-bottom: 10px; line-height: 1.5; }
.anuncio-cta {
  display: inline-block;
  padding: 5px 14px;
  background: var(--azul);
  color: #fff;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
}

/* ── TALLERES SECTION ────────────────────── */
.talleres-section { padding: 0; }
.section-title {
  font-family: 'Cinzel', serif;
  color: var(--azul);
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.section-sub { color: #64748b; font-size: .9rem; margin-bottom: 24px; }

.talleres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── TALLER CARD (lista pública) ─────────── */
.taller-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--trans);
  border: 1px solid #e5e7eb;
}
.taller-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-lg); }
.taller-card.lleno { opacity: .7; }
.taller-card-head {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-med) 100%);
  padding: 18px 20px;
}
.taller-nombre  { font-family: 'Cinzel', serif; color: #fff; font-size: 1rem; line-height: 1.3; }
.taller-decanato{ color: rgba(255,255,255,.7); font-size: .78rem; margin-top: 4px; }
.taller-card-body { padding: 16px 20px; flex: 1; }
.taller-dato { display: flex; gap: 8px; color: #555; font-size: .85rem; margin-bottom: 6px; }
.taller-desc { font-size: .83rem; color: #64748b; margin: 10px 0; line-height: 1.5; }
.taller-costo { margin-top: 10px; }
.badge-costo  { background: #fef3c7; color: #92400e; padding: 4px 12px; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.badge-gratis { background: #d1fae5; color: #065f46; padding: 4px 12px; border-radius: 20px; font-size: .82rem; font-weight: 700; }
.taller-card-foot { padding: 16px 20px; border-top: 1px solid #f1f5f9; }

/* Barra de cupo */
.cupo-bar { margin: 10px 0; }
.cupo-label { display: flex; justify-content: space-between; font-size: .78rem; color: #64748b; margin-bottom: 4px; }
.cupo-track { background: #e5e7eb; border-radius: 20px; height: 7px; overflow: hidden; }
.cupo-fill  { background: var(--azul-med); height: 100%; border-radius: 20px; transition: width .5s ease; }
.cupo-fill.lleno { background: #ef4444; }

/* ── TALLER DETALLE ──────────────────────── */
.taller-detail-card {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-med) 100%);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  color: #fff;
}
.taller-detail-nombre { font-family: 'Cinzel', serif; font-size: 1.4rem; margin-bottom: 8px; }
.taller-detail-badge  { display: inline-block; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 20px; font-size: .8rem; margin-bottom: 16px; }
.taller-detail-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.taller-detail-item   { display: flex; gap: 8px; font-size: .88rem; align-items: flex-start; color: rgba(255,255,255,.9); }
.taller-detail-desc   { font-size: .9rem; color: rgba(255,255,255,.85); line-height: 1.6; margin-top: 12px; }
@media (max-width: 480px) { .taller-detail-grid { grid-template-columns: 1fr; } }

/* ── FORMULARIO DE REGISTRO ──────────────── */
.registro-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 28px;
  margin-bottom: 20px;
}
.registro-title { font-family: 'Cinzel', serif; color: var(--azul); font-size: 1.15rem; margin-bottom: 16px; }

/* Tabs de registro */
.tabs-registro { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-reg {
  flex: 1;
  padding: 9px 12px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: #64748b;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans);
  font-family: 'Nunito', sans-serif;
  white-space: nowrap;
}
.tab-reg.active  { border-color: var(--azul); background: var(--azul); color: #fff; }
.tab-reg:hover:not(.active) { border-color: var(--azul-med); color: var(--azul); }
.tab-desc { font-size: .85rem; color: #64748b; margin-bottom: 16px; }

/* Sesión activa (persona logueada) */
.sesion-activa {
  background: #f0f9e8;
  border: 1px solid #c3e6a0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

/* Formulario público */
.form-pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-pub-grid .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .form-pub-grid { grid-template-columns: 1fr; } }
.form-pub-group { margin-bottom: 14px; }
.form-pub-label { display: block; font-size: .82rem; font-weight: 700; color: #374151; margin-bottom: 5px; }
.form-pub-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: var(--trans);
}
.form-pub-input:focus { border-color: var(--azul-med); box-shadow: 0 0 0 3px rgba(37,99,168,.1); }

/* ── ALERTAS PÚBLICAS ────────────────────── */
.alert-pub {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 14px;
}
.alert-pub.error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-pub.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-pub.info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── ESTADOS ─────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon  { font-size: 52px; margin-bottom: 12px; }
.empty-state p { color: #94a3b8; line-height: 1.8; }
.loading-msg { text-align: center; padding: 40px; color: #94a3b8; }

/* ── FOOTER ──────────────────────────────── */
.pub-footer {
  background: var(--azul);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 20px;
  font-size: .85rem;
}
