:root {
  --color-primary: #0e3966;
  --color-primary-light: #1a5a9e;
  --color-primary-dark: #082644;
  --color-bg: #ffffff;
  --color-text: #212529;
  --color-text-muted: rgba(0, 0, 0, 0.55);
  --font-heading: "Source Sans Pro", "Roboto", sans-serif;
  --font-body: "Roboto", "Source Sans Pro", sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Formas decorativas de fondo en tonos de la marca */
.background-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--color-primary);
}

.shape-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -160px;
}

.shape-2 {
  width: 360px;
  height: 360px;
  bottom: -140px;
  right: -120px;
  background: var(--color-primary-light);
}

.shape-3 {
  width: 220px;
  height: 220px;
  top: 60%;
  left: 8%;
  background: var(--color-primary-dark);
  opacity: 0.05;
}

/* Contenedor principal */
.container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 90%;
  text-align: center;
  padding: 48px 32px;
}

.logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 28px;
  border-radius: 16px;
}

.title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: 14px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 36px;
}

/* Barra de progreso */
.progress-wrap {
  margin-bottom: 32px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e9edf2;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Loader de puntos */
.loader {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: bounce 1.2s infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 0.15s;
  background: var(--color-primary-light);
}

.dot:nth-child(3) {
  animation-delay: 0.3s;
  background: var(--color-primary-dark);
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.contact-note {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--color-text);
}

.contact-note a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.contact-note a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: inline-block;
  margin-top: 6px;
}

/* Botones estilo enlace (usados en footer, modales y banner) */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

.link-btn:hover {
  color: var(--color-primary-light);
}

.link-btn.inline {
  font-weight: 600;
}

@media (max-width: 480px) {
  .container {
    padding: 32px 20px;
  }
}

/* ===== Modales (Aviso de Privacidad / Cookies) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 38, 68, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  position: relative;
  background: var(--color-bg);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(8, 38, 68, 0.3);
}

.modal h2 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.modal h3 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.modal-body p,
.modal-body li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text);
  text-align: left;
}

.modal-body ul {
  padding-left: 20px;
  margin-top: 6px;
}

.modal-body a {
  color: var(--color-primary);
}

.modal-updated {
  margin-top: 20px;
  font-size: 0.8rem !important;
  color: var(--color-text-muted) !important;
  font-style: italic;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-primary);
}

/* ===== Banner de cookies ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 18px 24px;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner.hidden-behind-modal {
  display: none;
}

.cookie-banner p {
  margin: 0;
  max-width: 640px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.cookie-banner .link-btn {
  color: #cfe0f2;
}

.cookie-banner .link-btn:hover {
  color: #ffffff;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-solid {
  background: #fff;
  color: var(--color-primary-dark);
}

.btn-solid:hover {
  background: #e9edf2;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  border-color: #fff;
}

@media (max-width: 480px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}
