/* ============================================================
   1. RESET Y BASE
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #fff9f0;
  /* color: #666; */
  display: flex;
  justify-content: center;
  line-height: 1.6;
}

/* ============================================================
   2. LAYOUT GLOBAL
   ============================================================ */

.wrapper {
  width: 100%;
  max-width: 1024px;
  display: grid;
  grid-template-areas:
    "header"
    "hero"
    "main"
    "footer";
  grid-template-rows: auto auto 1fr auto;
  min-height: 100vh;
  background-color: #fdffde;
}

/* ============================================================
   3. HEADER Y NAVEGACIÓN PRINCIPAL
   ============================================================ */

header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #facf58ff;
  box-shadow:
    0 0.7px 3px #eadaca,
    0 -1px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(0.5rem, 5vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  height: clamp(2.5rem, 6vw, 4rem);
  width: auto;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
}

.hamburger {
  cursor: pointer;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  color: #eeeeeeff;
  user-select: none;
  line-height: 1;
}

.hamburger::before {
  content: "\2630";
}

.menu-toggle:checked ~ .header-content .hamburger::before {
  color: #eeeeeeff;
  content: "✕";
}

.main-nav {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  background-color: #eeeeeeff;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-bottom-left-radius: 0.75em;
  border-bottom-right-radius: 0.75em;
  box-shadow:
    0 0.7px 4px #eadaca,
    0 0.7px 4px #eadaca inset,
    0 0.7px 4px #eadaca inset;
}

.menu-toggle:checked ~ .main-nav {
  max-height: 500px;
}

.main-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.35rem, 5vw, 4rem)
    clamp(0.75rem, 2vw, 1rem);
}

.main-nav li {
  border-bottom: 0.1px solid #facf58ff;
}

.main-nav a {
  display: block;
  color: #666;
  text-decoration: none;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  /* padding: clamp(0.4rem, 1.2vw, 0.6rem) 0; */
  transition: opacity 0.2s;
}

.main-nav a:hover {
  opacity: 0.7;
}

/* ============================================================
   4. HERO / IMÁGENES PRINCIPALES
   ============================================================ */

.lobby-image {
  grid-area: hero;
  width: 100%;
  overflow: hidden;
}

.lobby-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-image {
  grid-area: hero;
  width: 100%;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   5. MAINS POR TIPO DE PÁGINA
   ============================================================ */

.home-main {
  grid-area: main;
  width: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(0.5rem, 5vw, 4rem);
}

.shop-main {
  grid-area: main;
  width: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(0.5rem, 5vw, 4rem);
}

.article-main {
  grid-area: main;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 7vw, 5rem);
  background-color: #fff;
}

.legal-main {
  grid-area: main;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 7vw, 5rem);
  background-color: #fff;
}

.institutional-main {
  grid-area: main;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 7vw, 5rem);
  background-color: #fff;
}

.commercial-main {
  grid-area: main;
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 7vw, 5rem);
  background-color: #fff;
}

/* ============================================================
   6. TÍTULOS, INTRODUCCIONES Y ENLACES
   ============================================================ */

.site-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #facf58ff;
  line-height: 1.2;
  margin-bottom: 0.75em;
}

.intro p {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  margin-bottom: 0.75em;
  line-height: 1.45;
  color: #666;
}

.intro h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  /* color: #3a2a14ff; */
  margin-bottom: 0.75em;
}

.resource-link {
  text-decoration: none;
  color: #facf58ff;
  text-decoration: underline;
  text-decoration-color: rgba(250, 207, 88, 0.35);
  text-underline-offset: 0.15em;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .resource-link:hover {
    color: #ffd86e;
    text-decoration-color: rgba(250, 207, 88, 0.8);
  }
}

@media (hover: none) and (pointer: coarse) {
  .resource-link {
    text-decoration-color: rgba(250, 207, 88, 0.6);
  }
}

/* ============================================================
   7. CARDS
   ============================================================ */

.cards-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.25;
  margin-top: clamp(2rem, 5vw, 2rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  color: #facf58ff;
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: auto;
  display: block;
}

.card-content {
  border-top: solid 1px #facf58ff;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: #facf58ff;
  margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
}

.card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   8. CONTENIDO EDITORIAL Y SECCIONES
   ============================================================ */

main p {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  line-height: 1.45;
  color: #555;
  margin-bottom: 1em;
}

.article-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: rgb(250, 207, 88);
  line-height: 1.2;
  margin-bottom: 0.75em;
}

.article-section {
  margin-bottom: clamp(2.5rem, 4vw, 3rem);
}

.article-section ul,
.article-section li,
.article-section ol {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  line-height: 1.45;
  color: #555;
  margin-bottom: 0.75em;
}

.article-section h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #3a2a14ff;
  margin-bottom: clamp(1rem, 2.5vw, 1rem);
  line-height: 1.3;
}

.article-section h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: #8c5a1fff;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
  line-height: 1.4;
}

.article-section p {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  color: #555;
  line-height: 1.7;
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.article-section p:last-child {
  margin-bottom: 0;
}

.article-section strong {
  font-weight: bold;
  color: #3a2a14ff;
}

.article-section em {
  font-style: italic;
  color: #444;
}

.article-section a {
  color: #f6c255;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.article-section a:hover {
  color: #dba446;
}

/* ============================================================
   9. CTA, BOTONES, CURSO Y TIENDA
   ============================================================ */

.article-section--cta {
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
  margin-top: 2rem;
}

.course-cta-wrapper {
  margin-top: 1.5rem;
}

.course-cta-text {
  margin-bottom: 1.25rem;
}

.schedule-list {
  margin-left: 1.25rem;
}

.button-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  background-color: #3b7c5b;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

.button-cta:hover {
  background-color: #32684c;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.button-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.button-cta:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: 3px;
}

.tienda-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #ec6426;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}

.tienda-btn:hover {
  background: #cf531d;
  transform: translateY(-1px);
}

.tienda-btn:active {
  transform: translateY(0);
}

a.tienda-btn:visited {
  color: #fff;
}

.tienda-cta {
  text-align: center;
  padding: 4px 0 24px;
  margin-top: clamp(2rem, 5vw, 4rem);
}

.tienda-cta .tienda-btn {
  margin-right: 0;
}

.tienda-subtitle {
  margin: 8px 0 18px;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.45;
  color: #555;
}

/* ============================================================
   10. CARDS COMERCIALES Y PRECIOS
   ============================================================ */

.card-cta {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 10px 16px;
  background: #cf531d;
  color: #fff !important;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}

.card:hover .card-cta {
  background: #b94718;
}

.card-description {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #666;
  margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
  flex: 1;
}

.price-note {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  color: #3a2a14;
  margin-bottom: 0.25rem;
}

.price::before {
  content: "$";
  font-weight: inherit;
  color: inherit;
}

/* ============================================================
   11. FOOTER
   ============================================================ */

footer {
  grid-area: footer;
  background-color: #facf58ff;
  padding: 1rem 1rem;
  font-family: "Inter", sans-serif;
  text-align: center;
}

.footer-brand p {
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: #d26e2a;
}

.footer-secondary {
  margin-bottom: 1rem;
}

.footer-secondary a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 400;
  color: #eeeeeeff;
  text-decoration: none;
  margin: 0 0.5rem;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-secondary a:hover {
  opacity: 1;
  color: #8c5a1f;
}

.footer-legal a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 300;
  color: #eeeeeeff;
  margin: 0 0.5rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-legal a:hover {
  opacity: 1;
  color: #8c5a1f;
}

.footer-secondary,
.footer-legal {
  padding: 0.4rem 0;
}
