:root {
  --bg: #fffcf7;
  --paper: #fffcf7;
  --card: #ffffff;
  --text: #263238;
  --ink: #263238;
  --muted: #665a50;
  --primary: #2f7d73;
  --primary-dark: #3b2a23;
  --blue: #28576a;
  --navy: #3b2a23;
  --accent: #d4a853;
  --gold: #d4a853;
  --teal: #2f7d73;
  --coral: #c95448;
  --purple: #7565a8;
  --sun: #d4a853;
  --sky: #67b8cf;
  --mint: #62b9a7;
  --soft: #f0e4d2;
  --border: #ddcdb8;
  --shadow: 0 9px 24px rgba(74, 52, 40, 0.09);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

body * {
  text-align: justify;
  text-justify: inter-word;
}

header {
  border-bottom-color: var(--border);
  background: rgba(255, 252, 247, 0.97);
  box-shadow: 0 2px 12px rgba(74, 52, 40, 0.06);
}

.nav { min-height: 66px; }

.logo {
  min-width: 54px;
  height: 40px;
  background: linear-gradient(135deg, #3b2a23, #2f7d73);
  color: #fff4dd;
  box-shadow: none;
}

.header-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: cover;
  border: 2px solid #d4a853;
  border-radius: 13px;
  box-shadow: 0 5px 14px rgba(74, 52, 40, 0.18);
}

.hero {
  padding: 58px 0 44px;
  background:
    radial-gradient(circle at 12% 18%, rgba(47, 125, 115, 0.12), transparent 32%),
    radial-gradient(circle at 88% 14%, rgba(212, 168, 83, 0.16), transparent 28%),
    linear-gradient(145deg, #fff9ef 0%, #eadcc8 54%, #eaf4ff 100%);
}

.hero-side {
  display: grid;
  gap: 16px;
  align-items: start;
}

.hero-logo {
  width: min(190px, 64%);
  display: block;
  margin: 0 auto;
  border: 6px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  box-shadow: 0 14px 34px rgba(74, 52, 40, 0.2);
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #4a3428;
}

.hero h1 { margin-top: 0; }

h2,
.section-heading h2,
article h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  color: #4a3428;
}

.hero p,
.dek { font-size: 1.02rem; }

section {
  padding-top: 52px;
  padding-bottom: 52px;
}

.tag,
.eyebrow {
  background: #f0e4d2;
  color: #4a3428;
  border-color: #d4a853;
}

.btn,
.nav-link,
.back-link,
.featured-link,
.button,
.resource-button {
  min-height: 44px;
  padding: 9px 16px;
}

.btn-primary,
.featured-link,
.nav-link.primary,
.resource-button {
  background: #c95448;
  border-color: #c95448;
  color: #fff;
}

.btn:not(.secondary):not(.btn-secondary) {
  background: #c95448;
  border-color: #c95448;
  color: #fff;
}

.btn-primary:hover,
.featured-link:hover,
.resource-button:hover,
.btn:not(.secondary):not(.btn-secondary):hover { background: #a94138; }

.btn.secondary,
.btn-secondary {
  background: #a86632;
  border-color: #a86632;
  color: #fff;
}

.btn.secondary:hover,
.btn-secondary:hover { background: #875126; }

.nav-link:hover,
.back-link:hover {
  border-color: #a86632;
  color: #3d2b1f;
}

.hero .btn-secondary {
  background: #2f7d73;
  border-color: #2f7d73;
  color: #fff;
}

.hero .btn-secondary:hover { background: #28576a; }

.latest-panel {
  padding: 22px;
  border-top: 5px solid #d4a853;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #fff9ef 58%, #f0e4d2);
}

.latest-panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.32rem;
}

.latest-label { color: #68785a; }

.latest-list a {
  padding: 11px 0;
  font-size: 0.95rem;
}

.latest-list li:nth-child(3n + 1) a::before { color: #c95448; }
.latest-list li:nth-child(3n + 2) a::before { color: #2f7d73; }
.latest-list li:nth-child(3n + 3) a::before { color: #7565a8; }

.card,
.learning-card,
.course-card,
.product-card,
.policy,
.panel,
.resource-card,
.gallery-item,
aside {
  border-color: var(--border);
  box-shadow: 0 6px 18px rgba(74, 52, 40, 0.065);
}

.card,
.learning-card,
.course-card,
.product-card { padding: 20px; }

.learning-card:nth-child(5n + 1),
.course-card:nth-child(5n + 1),
.product-card:nth-child(5n + 1) {
  background: #eaf4ff;
  border-top: 4px solid #28576a;
}

.learning-card:nth-child(5n + 2),
.course-card:nth-child(5n + 2),
.product-card:nth-child(5n + 2) {
  background: #eaf8f4;
  border-top: 4px solid #2f7d73;
}

.learning-card:nth-child(5n + 3),
.course-card:nth-child(5n + 3),
.product-card:nth-child(5n + 3) {
  background: #fff0ea;
  border-top: 4px solid #b95645;
}

.learning-card:nth-child(5n + 4),
.course-card:nth-child(5n + 4),
.product-card:nth-child(5n + 4) {
  background: #f3eeff;
  border-top: 4px solid #7565a8;
}

.learning-card:nth-child(5n + 5),
.course-card:nth-child(5n + 5),
.product-card:nth-child(5n + 5) {
  background: #fff7d6;
  border-top: 4px solid #d4a853;
}

.card-icon,
.course-mark,
.product-mark,
.learning-card .course-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 13px;
}

.card:nth-child(5n + 1) .card-icon,
.learning-card:nth-child(5n + 1) .course-mark,
.course-card:nth-child(5n + 1) .course-mark,
.product-card:nth-child(5n + 1) .product-mark {
  background: #d9eaf7;
  color: #28576a;
}

.card:nth-child(5n + 2) .card-icon,
.learning-card:nth-child(5n + 2) .course-mark,
.course-card:nth-child(5n + 2) .course-mark,
.product-card:nth-child(5n + 2) .product-mark {
  background: #d8eee8;
  color: #2f7d73;
}

.card:nth-child(5n + 3) .card-icon,
.learning-card:nth-child(5n + 3) .course-mark,
.course-card:nth-child(5n + 3) .course-mark,
.product-card:nth-child(5n + 3) .product-mark {
  background: #f8ddd5;
  color: #9b4537;
}

.card:nth-child(5n + 4) .card-icon,
.learning-card:nth-child(5n + 4) .course-mark,
.course-card:nth-child(5n + 4) .course-mark,
.product-card:nth-child(5n + 4) .product-mark {
  background: #e9e1fa;
  color: #66539b;
}

.card:nth-child(5n + 5) .card-icon,
.learning-card:nth-child(5n + 5) .course-mark,
.course-card:nth-child(5n + 5) .course-mark,
.product-card:nth-child(5n + 5) .product-mark {
  background: #f7e8b4;
  color: #6f551c;
}

.learning-hub {
  background: linear-gradient(145deg, #fff9ef 0%, #f0e4d2 48%, #eaf8f4 100%);
}

.featured {
  background: linear-gradient(120deg, #fff7d6, #eaf8f4);
  border-color: #d4a853;
}

.price-pill {
  background: #fff9ee;
  border-color: #ede3d4;
  color: #3d2b1f;
}

.learning-card.exam-card,
.course-card.exam-card {
  background: linear-gradient(120deg, #3b2a23, #28576a);
  border-top-color: #d4a853;
  color: #fff4dd;
}

.learning-card.exam-card .course-mark,
.course-card.exam-card .course-mark {
  background: #d4a853;
  color: #3b2a23;
}

.about-box {
  padding: 26px;
  background: linear-gradient(145deg, #3b2a23, #4a3428 62%, #2f7d73);
  border-top: 4px solid #d4a853;
}

.about-box h2,
.about-box p { color: #fff4dd; }

#about {
  background: linear-gradient(145deg, #fff9ef 0%, #eadcc8 52%, #f0e4d2 100%);
}

#gallery {
  background: linear-gradient(145deg, #eaf4ff 0%, #eaf8f4 54%, #fff7d6 100%);
}

#contact {
  background: linear-gradient(145deg, #fff9ef 0%, #fff0ea 48%, #eaf8f4 100%);
}

.contact-card {
  padding: 25px;
  background: linear-gradient(145deg, #3b2a23, #2f7d73);
  border-top: 4px solid #d4a853;
}

.contact-card h2,
.contact-card p { color: #fff4dd; }

.step:nth-child(3n + 1) .step-number { background: #c95448; }
.step:nth-child(3n + 2) .step-number { background: #2f7d73; }
.step:nth-child(3n + 3) .step-number { background: #7565a8; }

.contact-box,
.coming,
.cta {
  background: linear-gradient(120deg, #3b2a23, #4a3428 56%, #2f7d73);
  border-top: 4px solid #d4a853;
}

.brand-emblem { width: min(180px, 54%); }

.profile-photo {
  width: min(42%, 270px);
  max-height: 220px;
  border-radius: 20px;
}

.gallery-grid {
  width: min(100%, 900px);
  margin-inline: auto;
  gap: 18px;
}

.gallery-item img { max-height: 520px; }
.gallery-item.poster img { max-height: 590px; }
.gallery-item.resource-wide img { max-height: 460px; }

.gallery-item:nth-child(4n + 1) { border-top: 5px solid #c95448; }
.gallery-item:nth-child(4n + 2) { border-top: 5px solid #62b9a7; }
.gallery-item:nth-child(4n + 3) { border-top: 5px solid #8875be; }
.gallery-item:nth-child(4n + 4) { border-top: 5px solid #d4a853; }

.resource-card img,
.resource-card.portrait img {
  height: 300px;
  max-height: 480px;
}

.self-check {
  background: #eaf8f4;
  border-left-color: #2f7d73;
}

.note,
.summary,
.transfer-box { background: #fff7d6; }

.notice.warning { background: #fff0ea; }

footer {
  padding: 25px 0;
  background: #3b2a23;
  color: #fff4dd;
  border-top: 4px solid #d4a853;
}

footer a,
footer .footer-social a,
footer .footer-actions a { color: #f0c86f; }

.success-page {
  background: linear-gradient(145deg, #3b2a23, #2f7d73);
}

.success-page main {
  width: min(620px, 100%);
  padding: clamp(26px, 5vw, 44px);
  border-top-color: #d4a853;
}

.success-page h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); }
.success-page p { font-size: 1rem; }

@media (max-width: 850px) {
  .hero { padding: 46px 0 36px; }
  section { padding-top: 44px; padding-bottom: 44px; }

  .hero-logo { width: min(170px, 52%); }
}

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

  h2,
  .section-heading h2,
  article h2 { font-size: 1.65rem; }

  .hero p,
  .dek { font-size: 1rem; }

  .card,
  .learning-card,
  .course-card,
  .product-card,
  .policy,
  .panel { padding: 18px; }

  .profile-photo {
    width: min(62%, 210px);
    max-height: 190px;
  }

  .gallery-item img,
  .gallery-item.poster img,
  .gallery-item.resource-wide img { max-height: 470px; }
}
