/* ==========================================================================
   LEGALROSEL - ESTILOS BASE PWA (99% MOBILE-FIRST • SOLO TEXTO)
   ========================================================================== */

:root {
  --bg-primary: #102436;
  --bg-surface: rgba(16, 36, 54, 0.68);
  --bg-surface-elevated: rgba(20, 44, 66, 0.78);
  --bg-surface-border: rgba(212, 175, 55, 0.28);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent-gold: #D4AF37;
  --accent-gold-soft: rgba(212, 175, 55, 0.14);
  --accent-blue: #38BDF8;
  --danger-crimson: #EF4444;
  --success-emerald: #10B981;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Fondo global con legal_fondo_05.gif limpio y visible */
body {
  background-color: #102436;
  background-image: url('../referencias/legal_fondo_05.gif');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: 300px 300px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Contenedor vertical móvil estricto (440px max en escritorio, 100% en móvil) */
.mobile-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: #102436;
  background-image: url('../referencias/legal_fondo_05.gif');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: 300px 300px;
  border-left: 1px solid rgba(212, 175, 55, 0.25);
  border-right: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
  padding-bottom: calc(70px + var(--safe-bottom));
}

/* ==========================================================================
   CABECERA & MENÚ SUTIL (LETRA TAMAÑO 13)
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 36, 54, 0.92);
  border-bottom: 1px solid var(--bg-surface-border);
  padding: calc(10px + var(--safe-top)) 16px 10px 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.header-top-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo {
  width: 84px; /* Exactamente el doble de los 42px anteriores */
  height: 84px;
  border-radius: 8px;
  border: 1px solid var(--bg-surface-border);
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.header-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 23px; /* 3 tamaños arriba de los 17px iniciales */
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent-gold);
  line-height: 1.15;
  margin-bottom: 3px;
}

.brand-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Menú sutil alineado debajo/a la par con letras tamaño 13 */
.subtle-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.subtle-nav::-webkit-scrollbar {
  display: none;
}

.subtle-nav a {
  font-size: 13px; /* Requisito exacto del usuario */
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  padding: 4px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.subtle-nav a:hover,
.subtle-nav a.active {
  color: var(--accent-gold);
}

.subtle-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

/* ==========================================================================
   CONTENIDO PRINCIPAL (SOLO TEXTO • ELEGANTE Y SOBRIO)
   ========================================================================== */

.content-area {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.2s ease-in-out;
}

.tab-pane.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tarjetas de texto institucionales */
.text-card {
  background: var(--bg-surface);
  border: 1px solid rgba(212, 175, 55, 0.26);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.text-card.highlight {
  border-color: rgba(212, 175, 55, 0.48);
  background: rgba(20, 44, 66, 0.78);
}

.card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-body {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   LISTADOS Y ACCIONES DE TEXTO PARA LITIGACIÓN
   ========================================================================== */

.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.action-row:hover,
.action-row:active {
  border-color: var(--accent-gold);
  background: rgba(20, 32, 64, 0.85);
}

.action-details h4 {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.action-details p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.action-indicator {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
  padding-top: 2px;
}

/* ==========================================================================
   ACORDEONES PROCESALES (FASES JUDICIALES)
   ========================================================================== */

.stage-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: var(--bg-surface);
  overflow: hidden;
  margin-bottom: 8px;
}

.stage-header {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(18, 28, 56, 0.5);
}

.stage-header:hover {
  background: rgba(212, 175, 55, 0.08);
}

.stage-badge {
  font-size: 11px;
  color: var(--accent-gold);
}

.stage-content {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.55;
  background: rgba(10, 17, 36, 0.6);
}

.law-citation {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent-gold);
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

/* ==========================================================================
   MODO ATRIL DE AUDIENCIA (LETRA GRANDE PARA ESTRADOS)
   ========================================================================== */

.prompter-box {
  background: #050B18;
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 16px;
}

.prompter-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompter-text {
  font-size: 16.5px; /* Aumentado para lectura a distancia en estrado */
  line-height: 1.65;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.prompter-alert {
  font-size: 13px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid var(--danger-crimson);
  color: #FCA5A5;
  border-radius: 4px;
  margin-top: 10px;
}

/* ==========================================================================
   FORMULARIO Y CONTACTO
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  background: rgba(10, 18, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-gold);
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent-gold);
  color: #070D1E;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary:active {
  opacity: 0.85;
}

.btn-outline {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
}

/* ==========================================================================
   PIE DE PÁGINA Y NOTA DE INFRAESTRUCTURA
   ========================================================================== */

.app-footer {
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-secondary);
}

/* Barra fija de navegación inferior para móvil (Thumb-Zone) */
.mobile-bottom-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: rgba(7, 13, 30, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--bg-surface-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + var(--safe-bottom)) 4px;
  z-index: 150;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  min-width: 60px;
  min-height: 44px;
  border-radius: 6px;
  transition: color 0.15s;
}

.dock-item.active {
  color: var(--accent-gold);
}

.dock-icon {
  font-size: 15px;
  margin-bottom: 2px;
}
