:root {
  --aew-deep: #2C2C54;
  --aew-surface: #F5F0EB;
  --aew-vivid: #B83B5E;
  --aew-muted: #6A8E7F;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--aew-deep);
  background: var(--aew-surface);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Vollkorn', serif;
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

a {
  color: var(--aew-vivid);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

p {
  margin-bottom: 1rem;
}

/* LEFT SIDEBAR NAV */
.aew-shaft#sideNav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: var(--aew-deep);
  padding: 24px;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.aew-shaft#sideNav .aew-lintel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.aew-shaft#sideNav .aew-brace {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: 'Vollkorn', serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.aew-shaft#sideNav .aew-brace:hover {
  opacity: 0.9;
  text-decoration: none;
}

.aew-shaft#sideNav .aew-column {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.aew-shaft#sideNav .aew-column li a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0 6px 12px;
  display: block;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.aew-shaft#sideNav .aew-column li a:hover {
  color: #fff;
  text-decoration: none;
}

.aew-shaft#sideNav .aew-column li a.aew-bracket {
  color: #fff;
  border-left: 3px solid var(--aew-vivid);
}

/* MOBILE MENU TOGGLE */
button.aew-lintel#menuToggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: var(--aew-deep);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* OVERLAY */
.aew-column#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
}

/* MAIN CONTENT */
main.aew-bracket {
  margin-left: 220px;
  padding: 48px 40px;
  max-width: 960px;
}

/* SECTION 1: CITIES TABLE */
#ciudades {
  margin-bottom: 3rem;
}

table.aew-shaft {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44, 44, 84, 0.08);
}

table.aew-shaft caption {
  font-family: 'Vollkorn', serif;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 16px 20px;
  text-align: left;
  background: var(--aew-deep);
  color: #fff;
}

table.aew-shaft thead tr th {
  padding: 12px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(44, 44, 84, 0.06);
  border-bottom: 2px solid rgba(44, 44, 84, 0.12);
}

table.aew-shaft tbody tr td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(44, 44, 84, 0.08);
}

table.aew-shaft tbody tr:last-child td {
  border-bottom: none;
}

table.aew-shaft tbody tr:hover {
  background: rgba(184, 59, 94, 0.04);
}

table.aew-shaft tbody tr td a {
  font-weight: 600;
}

/* SECTION 2: FEATURES DL */
#caracteristicas {
  margin-bottom: 3rem;
}

#caracteristicas dl.aew-shaft {
  display: grid;
  gap: 0;
}

#caracteristicas dl.aew-shaft dt {
  font-family: 'Vollkorn', serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(44, 44, 84, 0.1);
}

#caracteristicas dl.aew-shaft dt:first-child {
  border-top: none;
}

#caracteristicas dl.aew-shaft dd {
  padding: 0 0 16px;
  color: rgba(44, 44, 84, 0.75);
}

/* SECTION 3: HERO BANNER */
div[role="banner"]#principal {
  background: var(--aew-deep);
  color: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  margin-bottom: 3rem;
}

div[role="banner"]#principal .aew-column h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

div[role="banner"]#principal .aew-column p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 600px;
  margin-bottom: 2rem;
}

div[role="banner"]#principal .aew-shaft {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

div[role="banner"]#principal .aew-shaft a.aew-bracket {
  display: inline-block;
  background: var(--aew-vivid);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

div[role="banner"]#principal .aew-shaft a.aew-bracket:hover {
  opacity: 0.9;
  text-decoration: none;
}

div[role="banner"]#principal .aew-shaft a.aew-lintel {
  display: inline-block;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 10px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

div[role="banner"]#principal .aew-shaft a.aew-lintel:hover {
  border-color: #fff;
  text-decoration: none;
}

/* SECTION 4: BLOG NAV */
nav#articulos {
  margin-bottom: 3rem;
}

nav#articulos ul.aew-shaft {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

nav#articulos ul.aew-shaft li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(44, 44, 84, 0.1);
}

nav#articulos ul.aew-shaft li a {
  font-weight: 600;
  font-size: 1.05rem;
}

nav#articulos ul.aew-shaft li span {
  font-size: 0.85rem;
  color: var(--aew-muted);
  white-space: nowrap;
  margin-left: 16px;
}

/* SECTION 5: STATS REGION (DEEPEST) */
div[role="region"]#estadisticas {
  margin-bottom: 3rem;
}

div[role="region"]#estadisticas .aew-bracket {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

div[role="region"]#estadisticas .aew-lintel {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44, 44, 84, 0.06);
}

div[role="region"]#estadisticas .aew-brace {
  padding: 24px;
}

div[role="region"]#estadisticas .aew-brace dl dt {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aew-muted);
  margin-bottom: 4px;
}

div[role="region"]#estadisticas .aew-brace dl dd {
  font-family: 'Vollkorn', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--aew-vivid);
}

/* SECTION 6: CTA */
div[role="complementary"]#accion {
  background: linear-gradient(135deg, var(--aew-vivid), #6C2942);
  color: #fff;
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 3rem;
}

div[role="complementary"]#accion h2 {
  margin-top: 0;
  font-size: 2rem;
}

div[role="complementary"]#accion p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 2rem;
}

div[role="complementary"]#accion > a {
  display: inline-block;
  background: #fff;
  color: var(--aew-vivid);
  padding: 14px 36px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

div[role="complementary"]#accion > a:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* SIGNATURE: REVERSED OL */
#como-funciona {
  margin-bottom: 3rem;
}

#como-funciona ol[reversed] {
  list-style: none;
  counter-reset: step-counter 6;
}

#como-funciona ol[reversed] li {
  counter-increment: step-counter -1;
  padding: 16px 0 16px 60px;
  position: relative;
  border-bottom: 1px solid rgba(44, 44, 84, 0.1);
}

#como-funciona ol[reversed] li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 14px;
  width: 40px;
  height: 40px;
  background: var(--aew-deep);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Vollkorn', serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* CONTENT SECTION */
#contenido {
  margin-bottom: 3rem;
}

#contenido .aew-shaft {
  line-height: 1.8;
}

#contenido .aew-shaft p {
  margin-bottom: 1.2rem;
}

/* ARTICLE TEMPLATE */
article.aew-shaft {
  max-width: 720px;
}

article.aew-shaft header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(44, 44, 84, 0.1);
}

article.aew-shaft header .aew-lintel {
  font-size: 1.15rem;
  color: rgba(44, 44, 84, 0.7);
  margin-top: 0.5rem;
}

article.aew-shaft header time {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--aew-muted);
  margin-top: 0.5rem;
}

article.aew-shaft header .aew-brace {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin-top: 1rem;
  padding: 16px;
  background: rgba(44, 44, 84, 0.04);
  border-radius: 8px;
}

article.aew-shaft header .aew-brace dt {
  font-weight: 700;
  font-size: 0.9rem;
}

article.aew-shaft header .aew-brace dd {
  color: var(--aew-vivid);
  font-weight: 600;
}

article.aew-shaft .aew-column {
  line-height: 1.8;
}

article.aew-shaft .aew-column p {
  margin-bottom: 1.2rem;
}

article.aew-shaft nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(44, 44, 84, 0.1);
}

article.aew-shaft nav ul.aew-bracket {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

article.aew-shaft nav ul.aew-bracket li a {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(44, 44, 84, 0.06);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}

article.aew-shaft nav ul.aew-bracket li a:hover {
  background: rgba(184, 59, 94, 0.1);
  text-decoration: none;
}

/* FOOTER */
footer.aew-brace {
  margin-left: 220px;
  padding: 40px 40px 24px;
  border-top: 1px solid rgba(44, 44, 84, 0.1);
}

footer.aew-brace .aew-lintel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 2rem;
}

footer.aew-brace .aew-lintel > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

footer.aew-brace .aew-lintel > div span {
  font-size: 0.8rem;
  color: rgba(44, 44, 84, 0.6);
  font-weight: 500;
}

footer.aew-brace p {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(44, 44, 84, 0.5);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .aew-shaft#sideNav {
    transform: translateX(-100%);
  }

  .aew-shaft#sideNav.aew-lintel {
    transform: translateX(0);
  }

  button.aew-lintel#menuToggle {
    display: flex;
  }

  main.aew-bracket {
    margin-left: 0;
    padding: 80px 20px 32px;
  }

  footer.aew-brace {
    margin-left: 0;
    padding: 32px 20px 20px;
  }

  footer.aew-brace .aew-lintel {
    grid-template-columns: repeat(2, 1fr);
  }

  div[role="banner"]#principal {
    padding: 32px 24px;
  }

  div[role="banner"]#principal .aew-column h1 {
    font-size: 1.8rem;
  }

  div[role="region"]#estadisticas .aew-bracket {
    grid-template-columns: repeat(2, 1fr);
  }

  div[role="complementary"]#accion {
    padding: 32px 24px;
  }

  table.aew-shaft {
    font-size: 0.9rem;
  }

  table.aew-shaft thead tr th,
  table.aew-shaft tbody tr td {
    padding: 10px 12px;
  }

  nav#articulos ul.aew-shaft li {
    flex-direction: column;
    gap: 4px;
  }

  nav#articulos ul.aew-shaft li span {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }

  div[role="banner"]#principal .aew-column h1 {
    font-size: 1.5rem;
  }

  div[role="region"]#estadisticas .aew-bracket {
    grid-template-columns: 1fr;
  }

  footer.aew-brace .aew-lintel {
    grid-template-columns: repeat(2, 1fr);
  }
}
