/* Aviso-Privacidad.css
   Versión actualizada: mobile first, responsiva, accesible y optimizada
   Reemplaza el archivo existente por este contenido.
*/

/* =========================
   Variables globales
   ========================= */
:root{
  --bg: #071018;
  --bg-2: #031018;
  --card: #0b0b0b;
  --muted: #9fb3c8;
  --accent: #00bcd4;
  --text: #dbeefc;
  --radius: 10px;
  --container-max: 1200px;
  --gap: 18px;

  /* Espaciado y tipografía fluidos */
  --fluid-padding: clamp(12px, 2.5vw, 28px);
  --fluid-font: clamp(14px, 1.6vw, 18px);
  --heading-scale: clamp(1.25rem, 3.5vw, 2rem);

  font-family: Inter, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

/* Box sizing global */
*, *::before, *::after { box-sizing: inherit; }

/* =========================
   Base y layout
   ========================= */
html, body {
  height: 100%;
  margin: 0;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 100%;
  line-height: 1.5;
}

body.anom4lia-body {
  font-size: var(--fluid-font);
  -webkit-text-size-adjust: 100%;
}

/* Contenedor fluido con max-width */
.container {
  width: 94%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--fluid-padding);
}

/* =========================
   Header y navegación
   ========================= */
.site-header {
  background: transparent;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

/* Logo responsivo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-height: 40px;
  height: auto;
  width: auto;
}

/* Navegación principal */
.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus {
  color: #ffffff;
  background: rgba(255,255,255,0.02);
  outline: none;
}

.main-nav a.active {
  color: var(--accent);
  background: rgba(0,188,212,0.06);
}

/* Botón hamburguesa para móvil */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.4rem;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   Página y tarjetas
   ========================= */
.page-content {
  padding: 24px 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  overflow: hidden;
}

.card-header h1 {
  margin: 0;
  font-size: var(--heading-scale);
  color: #ffffff;
  line-height: 1.15;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Card body */
.card-body h2 {
  color: #bfe6ff;
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
}

.card-body h3 {
  color: #bfe6ff;
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

.card-body p, .card-body li {
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

.card-body ul {
  margin-left: 18px;
}

/* Footer de tarjeta */
.card-footer {
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================
   Formularios y controles
   ========================= */
label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea,
input[type="file"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: #071018;
  color: var(--text);
  font-size: 1rem;
  box-sizing: border-box;
}

textarea { resize: vertical; min-height: 120px; }

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #021018;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(159,224,255,0.08);
  background: transparent;
}

/* =========================
   Tablas y notas
   ========================= */
.note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

.changes-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.changes-table th,
.changes-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-align: left;
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================
   Grid responsive
   ========================= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* =========================
   Utilities
   ========================= */
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* =========================
   Breakpoints
   ========================= */

/* Small tablets and up */
@media (min-width: 480px) {
  .brand-logo { max-height: 44px; }
  .card { padding: 20px; }
}

/* Medium devices: tablet */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .main-nav { gap: 1.25rem; }
  .nav-toggle { display: none; }
}

/* Desktop and larger */
@media (min-width: 880px) {
  .container { padding: clamp(18px, 2vw, 28px); }
  .brand-logo { max-height: 48px; }
  .card { padding: 22px; }
  .header-inner { align-items: center; }
}

/* Large desktop */
@media (min-width: 1200px) {
  :root { --container-max: 1400px; }
  .brand-logo { max-height: 56px; }
}

/* =========================
   Mobile specific adjustments
   ========================= */
@media (max-width: 767px) {
  /* Mobile first: show toggle, hide nav by default */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: var(--fluid-padding);
    background: linear-gradient(180deg, rgba(11,11,11,0.98), rgba(11,11,11,0.98));
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    z-index: 50;
  }

  .main-nav a {
    display: block;
    padding: 10px 12px;
    width: 100%;
  }

  .header-inner { position: relative; }
  .brand-logo { max-height: 40px; }
  .card { padding: 16px; }
  .page-content { padding: 12px 0; }
}

/* =========================
   Focus states and accessibility
   ========================= */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0,188,212,0.18);
  outline-offset: 2px;
  border-radius: 8px;
}

/* =========================
   Image helpers (use with srcset in HTML)
   ========================= */
.responsive-img {
  display: block;
  max-width: 100%;
  height: auto;
  width: auto;
}
