/* ════════════════════════════════════════
   TERMS PAGE — Página independiente de
   Términos y Condiciones con pestañas
   ════════════════════════════════════════ */

body {
  font-family: 'Lato', sans-serif;
  background: #f4f4f4;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Barra superior de navegación ── */
.terms-topbar {
  background: linear-gradient(135deg, #FF8C00 0%, #e07800 100%);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(255,140,0,0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

.terms-back {
  color: #fff;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.terms-back:hover { opacity: 0.8; }

.terms-topbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
}

/* ── Área principal ── */
.terms-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  flex: 1;
  width: 100%;
}

/* ── Encabezado de página ── */
.terms-page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.terms-page-icon { font-size: 3.5rem; margin-bottom: 0.75rem; }

.terms-page-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #333;
  margin-bottom: 0.5rem;
}

.terms-page-header p {
  font-size: 1rem;
  color: #666;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.terms-updated {
  font-size: 0.82rem !important;
  color: #999 !important;
  margin-top: 0.5rem !important;
}

/* ── Contenedor de pestañas ── */
.tabs-wrapper {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.09);
  overflow: hidden;
}

/* ── Navegación de pestañas ── */
.tabs-nav {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  background: #fafafa;
}

.tab-btn {
  flex: 1;
  padding: 1.1rem 1.5rem;
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--orange);
  background: #fff8f0;
}

.tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
  background: #fff;
}

/* ── Panel de contenido de cada pestaña ── */
.tab-panel {
  display: none;
  padding: 2.5rem;
  animation: fadeTab 0.25s ease;
}

.tab-panel.active { display: block; }

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

/* ── Secciones de términos ── */
.terms-section { margin-bottom: 2.25rem; }

.terms-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #ffe0b2;
}

.terms-section p { font-size: 0.92rem; color: #555; line-height: 1.75; margin-bottom: 0.65rem; }

.terms-section ul { padding-left: 0; list-style: none; margin-bottom: 0.65rem; }

.terms-section ul li {
  font-size: 0.92rem;
  color: #555;
  padding: 0.28rem 0 0.28rem 1.5rem;
  position: relative;
  line-height: 1.6;
}

.terms-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

/* ── Cajas de alerta ── */
.alert-box {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.alert-box.yellow { background: #fff8e1; border-left: 4px solid #ffc107; color: #6d4c00; }
.alert-box.blue   { background: #e3f2fd; border-left: 4px solid #2196f3; color: #0d47a1; }
.alert-box.green  { background: #e8f5e9; border-left: 4px solid #43a047; color: #1b5e20; }

.alert-box strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: 'Poppins', sans-serif;
}

/* ── Bloque Meta API ── */
.meta-api-block {
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 1rem;
}

.meta-api-header {
  background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meta-logo { font-size: 2rem; flex-shrink: 0; }

.meta-api-header strong {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.meta-api-header span { font-size: 0.76rem; opacity: 0.85; }

.meta-subsection {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.meta-subsection:last-child { border-bottom: none; }

.meta-subsection h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-subsection p  { font-size: 0.88rem; color: #555; line-height: 1.7; margin-bottom: 0.5rem; }
.meta-subsection ul { padding-left: 0; list-style: none; margin-bottom: 0.5rem; }

.meta-subsection ul li {
  font-size: 0.88rem;
  color: #555;
  padding: 0.2rem 0 0.2rem 1.4rem;
  position: relative;
  line-height: 1.5;
}

.meta-subsection ul li::before { content: "→"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.meta-subsection a { color: var(--orange); text-decoration: underline; }

.optin-box {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-left: 4px solid #43a047;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.65rem;
}

.optin-box strong { display: block; font-family: 'Poppins', sans-serif; font-size: 0.83rem; color: #2e7d32; margin-bottom: 0.3rem; }
.optin-box p { font-size: 0.86rem; color: #388e3c; margin-bottom: 0; }
.optin-box a { color: #1b5e20; }

.optout-box {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}

.optout-box strong { display: block; font-family: 'Poppins', sans-serif; font-size: 0.83rem; color: var(--orange-dark); margin-bottom: 0.3rem; }
.optout-box p { font-size: 0.86rem; color: #6d4c00; margin-bottom: 0.4rem; }
.optout-box ul { padding-left: 0; list-style: none; }
.optout-box ul li { font-size: 0.86rem; color: #6d4c00; padding: 0.15rem 0 0.15rem 1.4rem; position: relative; }
.optout-box ul li::before { content: "→"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }

/* ── Tabla de tipos de mensajes (pestaña 2) ── */
.service-table-wrapper {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  margin-top: 0.75rem;
}

.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.service-table thead tr {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
}

.service-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.service-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  vertical-align: top;
  line-height: 1.5;
}

.service-table tbody tr:last-child td { border-bottom: none; }
.service-table tbody tr:hover { background: #fff8f0; }

/* Badges de categoría Meta */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

.badge-utility  { background: #e3f2fd; color: #1565c0; }
.badge-marketing { background: #fff3e0; color: #e65100; }

/* ── Footer ── */
.terms-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

.terms-footer strong { color: rgba(255,255,255,0.85); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .terms-topbar-brand { display: none; }
  .terms-page { padding: 2rem 1rem 3rem; }
  .tab-panel { padding: 1.5rem 1.25rem; }
  .tab-btn { font-size: 0.8rem; padding: 0.9rem 0.75rem; }
  .service-table th,
  .service-table td { padding: 0.6rem 0.75rem; }
}
