:root {
  --bg-main: #0b0f14;
  --bg-alt: #111722;
  --text-main: #e6e9ee;
  --text-muted: #9aa3ad;
  --accent: #ff6b00;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11,15,20,0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.main-nav a {
  margin-left: 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--accent);
}

/*===   AÑADIDO PARA EL MENU DESPLEGABLE ===*/
/* DROPDOWN CLICK-BASED */

.nav-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 1.5rem;
}

.nav-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
}

.nav-toggle.active {
  color: var(--accent);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 1.8rem;
  left: 0;
  background: var(--bg-alt);
  border-radius: 6px;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  z-index: 999;
}

.dropdown-content a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-content a.active {
  color: var(--accent);
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.05);
}

/* Visible when open */
.nav-dropdown.open .dropdown-content {
  display: block;
}











/* HERO */
.chapter-hero {
  height: 60vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,15,20,0.75);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.hero-overlay h1 {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-overlay h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.5rem;
}

/* CONTENT */
.chapter-content {
  max-width: 800px;
  margin: auto;
  padding: 4rem 1.5rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

h3 {
  margin: 3rem 0 1rem;
  font-size: 1.4rem;
}

figure {
  margin: 3rem 0;
}

figure img {
  width: 100%;
  border-radius: 8px;
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* GALERÍA */
.gallery {
  margin-top: 4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-grid img {
  width: 100%;
  border-radius: 6px;
}

/* NAV */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
}


















.btn-primary,
.btn-secondary {
  padding: 0.6rem 1.5rem;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-secondary {
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}



/* MEDIA QUERY RESPONSIVE */
@media (max-width: 768px) {

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-title {
    font-size: 0.95rem;
  }

  .main-nav {
    display: flex;
    gap: 1rem;
  }

  .nav-dropdown {
    position: relative;
  }

  .chapter-hero {
    height: 45vh;
  }

  .chapter-content {
    padding: 2.5rem 1.2rem;
  }

  .chapter-nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 0.9rem 1.2rem;
    text-align: center;
  }
}
