/* ============================================
   TALLERES SERGIO BAENA — Global Styles
   Paleta: Blanco, Amarillo suave, Gris oscuro
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500;600&display=swap');

/* ── Variables base (modo claro) ── */
:root {
  /* Colores de marca */
  --yellow:       #F5C400;
  --yellow-light: #FFF3B0;
  --yellow-dark:  #D4A900;

  /* Tokens semánticos — modo CLARO */
  --bg:           #FFFFFF;
  --bg-alt:       #F0F0F0;
  --bg-alt2:      #F7F7F7;
  --surface:      #FFFFFF;
  --surface-alt:  #F4F4F4;
  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --text-subtle:  #9B9B9B;
  --text-dark:    #2E2E2E;
  --border:       #E2E2E2;
  --border-strong:#C8C8C8;

  /* Tipografía */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;

  /* Forma */
  --radius:       6px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.10);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.14);

  /* Layout */
  --max-width:    1200px;
  --section-gap:  96px;
}

/* ── Variables modo OSCURO ── */
[data-theme="dark"] {
  --yellow-light: rgba(245,196,0,0.18);

  --bg:           #111111;
  --bg-alt:       #1C1C1C;
  --bg-alt2:      #161616;
  --surface:      #1E1E1E;
  --surface-alt:  #282828;
  --text:         #EFEFEF;
  --text-muted:   #9A9A9A;
  --text-subtle:  #666666;
  --text-dark:    #CCCCCC;
  --border:       #343434;
  --border-strong:#484848;

  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.55);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.65);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

/* ── Utilidades ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: var(--section-gap); }

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow-dark);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Amarillo — siempre texto oscuro sobre amarillo */
.btn-primary {
  background: var(--yellow);
  color: #1A1A1A;
  border-color: var(--yellow);
}
.btn-primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Outline — adapta al tema */
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Outline blanco — solo sobre fondos oscuros */
.btn-outline-white {
  background: transparent;
  color: #FFFFFF;
  border-color: #FFFFFF;
}
.btn-outline-white:hover {
  background: #FFFFFF;
  color: #1A1A1A;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__logo-icon {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.navbar__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text);
}

.navbar__logo-text span {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__links a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width 0.2s;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--text);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

.navbar__cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.navbar__phone:hover { color: var(--yellow-dark); }

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  transform: scale(1.05);
}

/* Hamburger mobile */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
.navbar__mobile {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
}

.navbar__mobile a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.navbar__mobile a:last-child { border-bottom: none; }
.navbar__mobile.open { display: flex; }

/* ── FOOTER ── */
footer {
  background: #1A1A1A;
  color: #FFFFFF;
  padding-block: 56px 32px;
}

[data-theme="dark"] footer {
  background: #0A0A0A;
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer__brand p {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  margin-top: 16px;
  max-width: 300px;
  line-height: 1.7;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.footer__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #FFFFFF;
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 16px;
}

.footer__col ul { display: flex; flex-direction: column; gap: 10px; }

.footer__col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer__col ul li a:hover { color: #FFFFFF; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: 12px;
}

.footer__bottom a {
  color: rgba(255,255,255,0.35);
  transition: color 0.2s;
}
.footer__bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── Badge de valoración ── */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow-light);
  border: 1px solid var(--yellow);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

/* ── Cards genéricas ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ── Formularios ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group select option {
  background: var(--surface);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,196,0,0.2);
}

/* ── Page Hero (reutilizado en subpáginas) ── */
.page-hero {
  background: #0F0F0F;
  padding-block: 80px 72px;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .page-hero {
  background: #080808;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 60px,
    rgba(245,196,0,0.03) 60px, rgba(245,196,0,0.03) 61px
  );
}

.page-hero__content { position: relative; z-index: 1; }

.page-hero__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-hero__label::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--yellow);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.05;
  margin-bottom: 20px;
}

.page-hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 540px;
  line-height: 1.75;
}

/* ── Tags ── */
.tag {
  background: var(--bg-alt);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.tag--yellow {
  background: var(--yellow-light);
  color: #1A1A1A;
  border: 1px solid var(--yellow);
}

/* ── Horario tabla ── */
.horario-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.92rem;
}

.horario-table tr td {
  padding: 6px 0;
  color: var(--text-dark);
}

.horario-table tr td:first-child {
  font-weight: 600;
  color: var(--text);
  min-width: 110px;
}

.horario-table tr td .badge-open {
  display: inline-block;
  background: rgba(46,125,50,0.15);
  color: #2e7d32;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  border: 1px solid rgba(46,125,50,0.3);
}

[data-theme="dark"] .horario-table tr td .badge-open {
  background: rgba(76,175,80,0.15);
  color: #66bb6a;
  border-color: rgba(76,175,80,0.3);
}

/* ── Sección alternada (fondo gris) ── */
.section--alt {
  background: var(--bg-alt);
}

/* ── Alert/notice ── */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  line-height: 1.6;
  border: 1px solid;
}

.alert--info {
  background: rgba(245,196,0,0.1);
  border-color: rgba(245,196,0,0.4);
  color: var(--text);
}

.alert--success {
  background: rgba(46,125,50,0.1);
  border-color: rgba(46,125,50,0.3);
  color: var(--text);
}

.alert--error {
  background: rgba(211,47,47,0.1);
  border-color: rgba(211,47,47,0.3);
  color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .navbar__links,
  .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  :root { --section-gap: 64px; }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Animaciones de entrada ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }
.fade-up-4 { animation-delay: 0.4s; }

/* ══════════════════════════════════════════
   FORO — Estilos específicos
   ══════════════════════════════════════════ */

/* Auth pages (login, registro, verificar) */
.auth-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  padding: 48px 24px;
}

.auth-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.auth-box__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-box__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.auth-box__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.auth-box h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-box p.auth-sub {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .btn {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 15px;
  margin-top: 4px;
}

.auth-link {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-link a {
  color: var(--yellow-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Foro layout ── */
.forum-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ── Hilo / post card ── */
.thread-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  gap: 20px;
}

.thread-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-sm);
}

.thread-card__meta {
  flex: 1;
}

.thread-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.2s;
}

.thread-card:hover .thread-card__title {
  color: var(--yellow-dark);
}

.thread-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.thread-card__info {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.thread-card__stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  text-align: center;
  padding: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.thread-card__stat-n {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.thread-card__stat-l {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Hilo individual (respuestas) ── */
.post-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.post-item.post-item--op {
  border-color: var(--yellow);
  background: var(--surface);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #1A1A1A;
  flex-shrink: 0;
}

.post-author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.post-author-badge {
  font-size: 0.72rem;
  background: var(--yellow);
  color: #1A1A1A;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-left: auto;
}

.post-body {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.75;
}

.post-body p + p { margin-top: 12px; }

/* ── Sidebar foro ── */
.forum-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
}

.sidebar-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Paginación ── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover,
.page-btn.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1A1A1A;
}

/* ── Categoría badge ── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.cat-badge--yellow {
  background: var(--yellow-light);
  color: #8a6d00;
  border-color: var(--yellow);
}

/* ── Responsive foro ── */
@media (max-width: 860px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }
  .forum-sidebar {
    position: static;
  }
  .thread-card {
    flex-direction: column;
  }
  .thread-card__stats {
    flex-direction: row;
    min-width: auto;
    width: 100%;
    justify-content: flex-start;
    gap: 20px;
  }
}

@media (max-width: 500px) {
  .auth-box {
    padding: 32px 24px;
  }
}

/* ── Logo navbar ── */
.navbar__logo-img {
  height: 44px !important;
  max-height: 44px !important;
  width: auto !important;
  max-width: 60px !important;
  display: block;
  object-fit: contain;
  content: url('img/logo negro sin fondo.png');
}
[data-theme='dark'] .navbar__logo-img {
  content: url('img/logo amarillo sin fondo.png') !important;
}

/* ── Logo footer ── */
.footer__logo-img {
  height: 48px;
  width: auto;
  display: block;
}
