/*=================================
= Variables de diseño
=================================*/
:root {
  --color-bg: #993366;
  --color-surface: rgba(255,255,255,0.10);
  --color-surface-2: rgba(0,0,0,0.30);
  --color-text: #ffffff;
  --color-accent: #1e90ff;
  --color-accent-2: #63b3ff;
  --color-success: #4caf50;
  --color-success-hover: #45a049;
  --color-link: #a0cfff;
  --color-border: #ffffff;

  --ff-base: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-5: 28px;
  --container-max: 960px;
  --shadow-1: 0 6px 16px rgba(0,0,0,0.18);
  --shadow-2: 0 10px 28px rgba(0,0,0,0.22);
  --trans-fast: 150ms;
}

/*=============================
= Reseteos y base
=============================*/
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--ff-base);
  line-height: 1.5;
}

img {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/*=============================
= Layout principal
=============================*/
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4);
  text-align: center;
}

header {
  border: 1px solid var(--color-border);
  padding: var(--space-2);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.00));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}

header p { margin: 0.5em 0; }

/*=============================
= Header logo
=============================*/
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 50px;
  width: auto;
}

.logo-text {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw + 1rem, 2.2rem);
}

/*=============================
= Menú / Botones GIF
=============================*/
.menu { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 0px;
  margin-bottom: 20px;
}

.boton-nav {
  display: inline-block;
  line-height: 0;
  cursor: pointer;
}

.boton-gif {
  display: block;
  height: 22px;
  width: auto;
}

/*=============================
= Login Form
=============================*/
.login-form {
  background-color: var(--color-surface);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  text-align: left;
  box-shadow: var(--shadow-1);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.login-form label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 9px 10px;
  margin-bottom: var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
}

.login-form input[type="submit"] {
  background-color: var(--color-success);
  border: none;
  color: #fff;
  padding: 10px 18px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-1);
}

/*=============================
= Historia (criterio NO responsive)
=============================*/
.historia-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

/* VIDEO: SIEMPRE FIJO */
.historia-video {
  margin-bottom: 20px;
}

.historia-video video {
  width: 176px;
  height: 132px;
  max-width: none;
  max-height: none;
}

/* TEXTO HISTORIA */
.historia-texto {
  margin-bottom: 10px;
}

.text-content {
  max-width: 700px;
  margin: 0 auto 20px auto;
}

/* CARRUSEL: TAMAÑO REAL */
.historia-carrusel img {
  width: auto;
  height: auto;
  max-width: none;
  display: block;
  border: 1px solid #000;
}

/* CONTROLES CARRUSEL */
.historia-controles {
  margin-top: 10px;
}

.historia-controles button {
  margin: 0 6px;
  font-size: 14px;
  cursor: pointer;
}

/*=============================
= Libro
=============================*/
.libro-tarjeta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
}

.libro-imagen img {
  width: 400px;
  box-shadow: var(--shadow-1);
}

.libro-detalle {
  max-width: 600px;
}

.boton-libro {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0066cc;
  color: white;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
}

/*=============================
= Responsivo (solo header)
=============================*/
@media (max-width: 720px) {
  .logo-img { height: 42px; }
}

@media (max-width: 480px) {
  .logo-img { height: 36px; }
}
