/* ===== Reset and General ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background-color: #fdfdfd;
  color: #1a1a1a;
  font-family: 'Charter', 'EB Garamond', serif;
  font-size: 20px;
  line-height: 1.6;
}

/* ===== Centrador universal ===== */
.container, .content, main {
  max-width: 750px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: justify;
}

/* ===== Header and Navigation ===== */
header.main-header {
  text-align: center;
  margin-bottom: 2em;
}

.main-title {
  font-family: 'EB Garamond', serif;
  font-weight: bold;
  font-size: 3em;
  margin: 0.5em auto;
  line-height: 1.2;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.main-title a {
  text-decoration: none;
  color: inherit;
}

.main-menu {
  font-family: 'EB Garamond', serif;
  font-size: 1.2em;
  font-weight: normal;
  margin-bottom: 1.5em;
  white-space: nowrap;
}

.main-menu a {
  text-decoration: none;
  color: inherit;
  margin: 0 0.3em;
  font-weight: bold;
}

.main-menu a:hover {
  text-decoration: underline;
}

/* ===== Títulos y texto ===== */
h1 {
  font-family: 'EB Garamond', serif;
  font-weight: bold;
  text-align: center;
  font-size: 3em; /* Match .main-title for consistency */
  margin: 0.5em auto;
}

h2, h3 {
  font-family: 'EB Garamond', serif;
  font-weight: bold;
  text-align: center;
}

h2 {
  font-size: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1em;
}

a {
  color: #6d3d7d;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ===== Navegación ===== */
nav {
  font-size: 0.9em;
  margin-bottom: 30px;
  text-align: center;
}

nav a {
  margin: 0 10px;
  font-weight: 900;
  opacity: 0.9;
}

nav a:hover {
  opacity: 1;
  text-decoration: none;
}

nav a,
nav a:link,
nav a:visited,
nav a:hover,
nav a:active,
nav a:focus {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  background-image: none !important;
  text-shadow: none !important;
  color: inherit !important;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  margin-top: 60px;
  padding: 20px;
  font-size: 0.8em;
  color: #888;
}

/* ===== Exlibris & Estética literaria ===== */
.exlibris {
  font-family: 'EB Garamond', serif;
  font-size: 1.3em;
  text-align: center;
  max-width: 700px;
  margin: 60px auto 40px auto;
  padding: 10px 20px;
  border-top: 1px dashed #999;
  border-bottom: 1px dashed #999;
  line-height: 1.6;
  color: #333;
}

.exlibris-frase {
  display: inline;
  font-weight: 400;
}

.exlibris-latin {
  font-family: 'UnifrakturCook', cursive;
  font-size: 1.2em;
  letter-spacing: 0.3px;
  color: #3a003a;
  margin-top: 5px;
  display: block;
}

/* ===== Ornamento ===== */
.ornamento {
  font-size: 1.5em;
  color: #888;
  margin: 20px 0;
  text-align: center;
}

/* ===== Firma & Instagram Widget ===== */
.firma-medusahra {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 60px;
}

.firma-medusahra img {
  max-width: 280px;
  height: auto;
  opacity: 0.85;
}

/* ===== Unicornios mágicos flotantes ===== */
.unicornio {
  position: absolute;
  width: 60px; /* Match index.html for consistency */
  pointer-events: none;
  z-index: 1000;
  animation-name: flotarX;
  animation-duration: calc(10s + 10s * var(--vel));
  animation-delay: calc(-1s * var(--delay));
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes flotarX {
  0% { transform: translate(0, 0); opacity: 0.6; }
  25% { transform: translate(40px, -50px); opacity: 1; }
  50% { transform: translate(-30px, -100px); }
  75% { transform: translate(20px, -150px); }
  100% { transform: translate(0, -200px); opacity: 0.3; }
}

.unicorn {
  position: absolute;
  width: 80px;
  user-select: none;
  cursor: grab;
  transition: transform 0.2s;
  will-change: transform, top, left;
}

.unicorn:active {
  cursor: grabbing;
}