:root {
  --blue-900: #0c2a60;
  --blue-700: #1e53b7;
  --blue-500: #2f7eff;
  --purple-500: #7f5dff;
  --gold-500: #f0b81f;
  --gold-400: #ffd24d;
  --green-500: #2f9e63;
  --red-500: #d14343;
  --bg: #f1f6ff;
  --surface: #ffffff;
  --text: #1a3561;
  --muted: #5a719b;
  --border: #d6e2f5;
  --shadow: 0 14px 30px rgba(27, 73, 153, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, #fef4d8 0, var(--bg) 28%),
    radial-gradient(circle at 100% 20%, #e8efff 0, var(--bg) 34%), var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

main .section:nth-of-type(odd) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(236, 245, 255, 0.7));
}

main .section:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.9), rgba(255, 250, 236, 0.65));
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  color: var(--blue-900);
}

.section-subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 760px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(130deg, var(--purple-500), var(--blue-500));
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  margin-bottom: 1rem;
}

header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--blue-900);
}

.brand-logo {
  height: 68px;
  width: auto;
  object-fit: contain;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--blue-700), var(--purple-500));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.3rem 0.08rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue-700);
  border-color: var(--gold-500);
  text-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--blue-700);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-700), var(--purple-500));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: #fff;
  color: var(--blue-700);
  border-color: #9eb8ea;
}

.btn-accent {
  background: linear-gradient(130deg, var(--gold-500), var(--gold-400));
  color: #1c2b47;
}

.btn-secondary:hover {
  background: #f5f9ff;
}

.hero {
  padding: 1rem 0 3.5rem;
  background: linear-gradient(125deg, #edf3ff 0%, #fdf2cc 52%, #eff6ff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero::before {
  width: 340px;
  height: 340px;
  top: -120px;
  right: -90px;
  background: rgba(128, 95, 255, 0.18);
}

.hero::after {
  width: 280px;
  height: 280px;
  bottom: -120px;
  left: -70px;
  background: rgba(240, 184, 31, 0.2);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--blue-900);
}

.hero p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-subscribe {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30, 83, 183, 0.18);
}

.hero-subscribe h2 {
  margin: 0 0 0.4rem;
  color: var(--blue-900);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.hero-subscribe p {
  max-width: 620px;
}

.hero-subscribe .hero-actions {
  margin-top: 0.9rem;
}

.hero-card {
  background: linear-gradient(160deg, #ffffff, #f2f6ff);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.hero-carousel {
  position: relative;
  margin-top: 0.8rem;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-track {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #eef4ff;
  aspect-ratio: 3 / 4;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.carousel-image.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 42, 96, 0.8);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.carousel-btn.prev {
  left: 0.6rem;
}

.carousel-btn.next {
  right: 0.6rem;
}

.carousel-dots {
  margin-top: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: #b7c8ea;
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active {
  background: var(--blue-700);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.stat {
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  padding: 0.7rem;
  background: linear-gradient(145deg, #ffffff, #eef4ff);
}

.stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--blue-900);
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 1rem;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: linear-gradient(160deg, #ffffff, #f8fbff);
  border: 1px solid #d8e5fb;
  border-radius: 16px;
  padding: 1.05rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(36, 87, 182, 0.18);
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--blue-900);
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.level-card img,
.book-cover {
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #eef4ff;
}

.level-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.list {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
}

.list li {
  margin-bottom: 0.35rem;
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.35rem;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd8e8;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.help-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(130deg, #e5eeff, #ffecc3);
  color: #335ca8;
  font-size: 0.8rem;
  margin: 0.2rem 0.18rem 0 0;
}

.audio-item {
  display: grid;
  gap: 0.55rem;
}

.audio-item audio {
  width: 100%;
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.7rem 0 0.45rem;
}

.resource-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--blue-700);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.resource-tab.active {
  background: linear-gradient(130deg, var(--blue-700), var(--purple-500));
  color: #fff;
  border-color: transparent;
}

.resource-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.resource-featured {
  margin: 1.4rem 0;
}

.resource-featured h2 {
  margin: 0 0 0.8rem;
  color: var(--blue-900);
  font-size: 1.25rem;
}

.resource-featured-list {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.4rem;
}

.resource-featured-list .resource-card {
  min-width: min(340px, 82vw);
  scroll-snap-align: start;
  gap: 0.9rem;
}

.resource-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.resource-carousel-track {
  overflow: hidden;
}

.resource-carousel-list {
  display: flex;
  gap: 0.9rem;
  transition: transform 0.3s ease;
}

.resource-carousel-list .card {
  min-width: min(320px, 80vw);
}

.resource-carousel-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--blue-700);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
}

.resource-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.resource-card {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.resource-card .btn {
  justify-self: start;
}

.resource-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, #eef4ff, #fff7da);
  color: var(--blue-700);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pdf-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #eef4ff;
}

.auth-card {
  max-width: 720px;
  margin: 0 auto;
}

.notice {
  border: 1px solid #c9d8f3;
  background: #eef4ff;
  color: var(--blue-700);
  border-radius: 12px;
  padding: 0.8rem;
  margin: 0.8rem 0;
}

.notice-success {
  border-color: #79c29d;
  background: #eaf8ef;
  color: #1d7a45;
}

.table-wrap {
  overflow: auto;
}

.table-basic {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table-basic th,
.table-basic td {
  border: 1px solid var(--border);
  padding: 0.55rem;
  text-align: left;
  vertical-align: top;
}

.table-basic th {
  background: #f6f9ff;
}

.stack {
  display: grid;
  gap: 0.7rem;
}

.message-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.message-item.unread {
  border-color: var(--gold-500);
  background: #fffaf0;
}

.message-item h4 {
  margin: 0 0 0.4rem;
}

.muted {
  color: var(--muted);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-line input,
input[type="checkbox"] {
  width: auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}


.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--blue-700);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.filter-btn.active {
  background: linear-gradient(130deg, var(--blue-700), var(--purple-500));
  border-color: transparent;
  color: #fff;
}

.contact-strip {
  background: linear-gradient(120deg, #0d2d62, #2a61cb, #2f9e63);
  color: #fff;
  border-radius: 16px;
  padding: 1rem;
}

.whatsapp-btn {
  background: #25d366;
  color: #fff;
}

footer {
  margin-top: 3.4rem;
  background: linear-gradient(120deg, #0b2248, #163a78);
  color: #e8eefb;
  padding: 2.2rem 0;
}

.footer-credits {
  margin-top: 1.1rem;
  color: #cddaf2;
  font-size: 0.9rem;
}

.footer-credits p {
  margin: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 1rem;
}

.footer-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.footer-link {
  display: block;
  color: #cddaf2;
  margin-bottom: 0.4rem;
}

.flag-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: var(--red-500);
}

.dot.green {
  background: var(--green-500);
}

.dot.gold {
  background: var(--gold-500);
}

[data-animate] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .carousel-track {
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 780px) {
  .menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 4%;
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .nav-links.open {
    display: flex;
  }

  .grid-2,
  .field-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  header,
  footer,
  .hero-actions,
  .carousel-btn,
  .carousel-dots {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .section,
  main .section:nth-of-type(odd),
  main .section:nth-of-type(even) {
    background: #fff !important;
    padding: 1rem 0 !important;
  }

}
