/* ========== CSS Variables (Design Tokens) ========== */
:root {
  --background: hsl(210, 40%, 96%);
  --foreground: hsl(220, 20%, 10%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(220, 20%, 10%);
  --primary: hsl(213, 94%, 50%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(213, 94%, 94%);
  --muted: hsl(210, 20%, 94%);
  --muted-foreground: hsl(220, 10%, 45%);
  --accent: hsl(45, 93%, 47%);
  --border: hsl(214, 25%, 88%);
  --success: hsl(142, 76%, 36%);
  --radius: 0.5rem;
}

/* ========== Base Styles ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Manrope', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== Layout ========== */
.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== Header ========== */
.header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(213, 94%, 55%) 0%, hsl(213, 94%, 45%) 100%);
}

.header-bg-circle {
  position: absolute;
  border-radius: 50%;
  background: white;
  opacity: 0.1;
  filter: blur(48px);
}

.header-bg-circle--top {
  top: 0;
  left: 0;
  width: 12rem;
  height: 12rem;
  transform: translate(-50%, -50%);
}

.header-bg-circle--bottom {
  bottom: 0;
  right: 0;
  width: 16rem;
  height: 16rem;
  transform: translate(33%, 33%);
}

.header-content {
  position: relative;
  padding: 2rem 1rem;
  text-align: center;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.header-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.stat-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  font-size: 1rem;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.7);
}

.header-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.header-wave svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== Navigation ========== */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: rgba(29, 123, 245, 0.1);
  color: var(--primary);
  border: 1px solid rgba(29, 123, 245, 0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s;
}

.nav-link:hover {
  background: rgba(29, 123, 245, 0.2);
  text-decoration: none;
}

/* ========== Author Block ========== */
.author {
  padding: 1.5rem 0;
}

.author-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.author-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  flex-shrink: 0;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.author-credentials {
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.author-date {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

/* ========== Intro Section ========== */
.intro {
  padding: 1rem 0;
}

.intro-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.intro-text p {
  margin-bottom: 1rem;
}

/* ========== Before Table Block ========== */
.before-table {
  padding: 1rem 0;
}

.before-table-card {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(214, 225, 235, 0.5);
  backdrop-filter: blur(4px);
}

.before-table-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.before-table-paragraphs {
  margin-bottom: 1.5rem;
}

.before-table-paragraphs p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.criteria-list {
  list-style: none;
}

.criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}

.criteria-item:hover {
  background: rgba(255, 255, 255, 0.8);
}

.criteria-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.criteria-text {
  font-size: 0.875rem;
  color: var(--foreground);
  opacity: 0.9;
}

/* ========== Courses Table ========== */
.courses {
  padding: 1rem 0;
}

.courses-card {
  background: var(--card);
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.courses-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--accent);
}

/* Mobile Course Cards */
.course-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.course-card {
  background: rgba(210, 220, 230, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(214, 225, 235, 0.5);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.course-rank {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.course-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.course-medal {
  font-size: 1.125rem;
}

.course-price-badge {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: var(--muted);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.course-title-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  display: block;
  margin-bottom: 0.25rem;
}

.course-school {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.course-promo-mobile {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--success);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 0.375rem;
  padding: 0.375rem 0.625rem;
  margin-bottom: 0.5rem;
}

.course-promo-mobile code {
  font-weight: 700;
  font-size: 0.8125rem;
}

.course-promo-mobile .promo-discount {
  color: var(--muted-foreground);
  font-size: 0.6875rem;
}

.table-promo {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 0.25rem;
}

.table-promo code {
  font-weight: 700;
}

.course-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
}

.btn-secondary:hover {
  background: rgba(210, 220, 230, 0.8);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.btn-primary:hover {
  background: hsl(213, 94%, 45%);
  text-decoration: none;
}

/* Desktop Table (hidden on mobile) */
.courses-table {
  display: none;
  width: 100%;
  border-collapse: collapse;
}

.courses-table th {
  background: rgba(210, 220, 230, 0.5);
  font-weight: 600;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.courses-table th:first-child,
.courses-table th:last-child {
  text-align: center;
}

.courses-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(214, 225, 235, 0.5);
  vertical-align: middle;
}

.courses-table tr:last-child td {
  border-bottom: none;
}

.courses-table tr:hover {
  background: rgba(210, 220, 230, 0.3);
}

/* ========== Course Details - Full Cards ========== */
.course-details {
  padding: 1rem 0;
}

.course-detail-card {
  background: var(--card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.course-detail-header {
  background: rgba(210, 220, 230, 0.3);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.course-detail-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.course-detail-title a {
  color: var(--primary);
}

.course-detail-number {
  color: var(--primary);
}

.course-detail-school {
  color: var(--foreground);
  font-weight: 600;
}

.course-detail-image {
  background: linear-gradient(135deg, rgba(29,123,245,0.05), rgba(29,123,245,0.1));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.course-detail-image img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

/* Info Grid */
.course-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(210, 220, 230, 0.3);
  border-radius: 0.5rem;
}

.info-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.125rem;
}

.info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.old-price {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
  margin-left: 0.5rem;
  font-weight: 400;
}

.info-installment {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
}

.info-format {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.info-promo {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.promo-code-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.promo-code-wrapper span {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.promo-code-wrapper code {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--success);
}

/* Course Detail Content */
.course-detail-content {
  padding: 1.25rem;
}

.detail-section {
  margin-bottom: 1.25rem;
}

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

.detail-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-icon {
  font-size: 1rem;
}

.detail-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Teachers */
.teachers-list {
  list-style: none;
}

.teachers-list li {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.teacher-name {
  font-weight: 500;
  color: var(--foreground);
}

.teacher-desc {
  color: var(--muted-foreground);
}

/* Program */
.program-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem;
  list-style: none;
}

.program-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.program-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: 700;
}

/* Skills */
.skills-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  list-style: none;
}

.skills-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.check-icon {
  color: var(--success);
  font-weight: 700;
}

/* Advantages */
.advantages-list {
  list-style: none;
}

.advantages-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.375rem;
}

.adv-icon {
  color: var(--accent);
  font-weight: 700;
}

/* Reviews */
.reviews-section {
  background: rgba(210, 220, 230, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
}

.reviews-quote {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.review-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  transition: border-color 0.2s;
}

.review-link:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.review-link span:first-child {
  font-weight: 500;
  color: var(--foreground);
}

.review-count {
  color: var(--muted-foreground);
}

.review-rating {
  color: #f59e0b;
}

/* CTA */
.course-cta {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.btn-large {
  width: 100%;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
}

/* ========== Content Blocks ========== */
.content-blocks {
  padding: 1rem 0 2rem;
}

.content-block {
  margin-bottom: 1.5rem;
}

.content-block:last-child {
  margin-bottom: 0;
}

.content-block-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.content-block-bullet {
  color: var(--primary);
  margin-top: 0.125rem;
}

.content-block-paragraphs p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.content-block-list {
  list-style: none;
  margin-top: 0.75rem;
}

.content-block-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.content-block-list-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ========== FAQ ========== */
.faq {
  padding: 2rem 0;
}

.faq-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--accent);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  font-weight: 600;
  padding: 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* ========== Footer ========== */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--primary);
  margin: 0 0.5rem;
}

/* ========== Responsive ========== */
@media (min-width: 768px) {
  .header-content {
    padding: 4rem 1rem;
  }

  .header-title {
    font-size: 2.25rem;
  }

  .header-subtitle {
    font-size: 1.125rem;
  }

  .header-stats {
    gap: 2.5rem;
  }

  .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .header-bg-circle--top {
    width: 18rem;
    height: 18rem;
  }

  .header-bg-circle--bottom {
    width: 24rem;
    height: 24rem;
  }

  .author-card {
    padding: 1.5rem;
  }

  .author-avatar {
    width: 5rem;
    height: 5rem;
  }

  .author-name {
    font-size: 1.125rem;
  }

  .author-credentials,
  .author-bio {
    font-size: 0.875rem;
  }

  .courses-card {
    padding: 1.5rem;
  }

  .courses-title {
    font-size: 1.5rem;
  }

  /* Hide mobile cards, show table */
  .course-cards {
    display: none;
  }

  .courses-table {
    display: table;
  }

  .faq-title {
    font-size: 1.5rem;
  }

  /* Course Details Desktop */
  .course-detail-title {
    font-size: 1.25rem;
  }

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

  .info-promo {
    grid-column: span 2;
  }

  .course-detail-image img {
    max-height: 400px;
  }

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

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

  .btn-large {
    width: auto;
  }

  /* Before Table Desktop */
  .before-table-card {
    padding: 2rem;
    border-radius: 1rem;
  }

  .before-table-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .before-table-paragraphs p {
    font-size: 1rem;
  }

  .criteria-item {
    padding: 1rem;
  }

  .criteria-icon {
    font-size: 1.25rem;
  }

  .criteria-text {
    font-size: 1rem;
  }

  /* Content Blocks Desktop */
  .content-blocks {
    padding: 2rem 0 3rem;
  }

  .content-block {
    margin-bottom: 2.5rem;
  }

  .content-block-title {
    font-size: 1.5rem;
  }

  .content-block-paragraphs p {
    font-size: 1rem;
  }

  .content-block-list li {
    font-size: 1rem;
  }
}
