/* Khóa Học (Course) Page Styles */
:root {
  --course-purple: #5c529f;
  --course-purple-light: #7067b8;
  --course-dark: #333333;
  --course-gray: #f5f5f5;
}

.course-page {
  overflow-x: hidden;
}

.course-page, .course-page * {
  box-sizing: border-box;
}

.program-glance-section,
.why-onion-section,
.cooperation-bg {
  background-color: var(--course-purple);
  color: #fff;
}

.course-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* Common Text Styles */
.course-h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  word-wrap: break-word;
}

.course-h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.course-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 800px;
}

/* Program at a glance */
.program-glance {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.program-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.program-header .course-h1,
.program-header .course-desc {
  margin-top: 0;
}

@media (min-width: 768px) {
  .program-header {
    grid-template-columns: 55% 1fr;
    align-items: start;
  }
}

.track-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.track-card {
  background: #fff;
  color: var(--course-purple);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.track-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.track-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.track-number {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.track-title {
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.track-tags {
  font-size: 0.85rem;
  border-top: 1px solid rgba(92, 82, 159, 0.2);
  padding-top: 15px;
  margin-top: auto;
}

/* Course Details Modules (Robotics, 3D, Filmmaking) */
.robotics-details {
  position: relative;
  padding: 50px 40px;
  margin-top: 40px;
  border-radius: 20px;
}
@media (max-width: 768px) {
  .robotics-details {
    padding: 30px 20px;
    border-radius: 16px;
  }
}

.course-module-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 15px;
}

.robotics-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 35px;
}
@media (min-width: 768px) {
  .robotics-top {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.course-main-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.course-outcomes-wrap {
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.course-outcomes-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.course-outcomes-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
}

.core-topics-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 30px;
  padding: 10px 28px;
  display: table;
  margin: 35px auto 25px;
  text-transform: uppercase;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.topic-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px 18px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
}

.topic-box .topic-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}

.topic-box .topic-text {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.4;
  margin-top: auto;
  color: #fff;
}

.topic-footer {
  margin-top: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.topic-footer .arrow {
  font-size: 1.3rem;
  line-height: 1;
}

/* Color Reset & Base Styling for Layouts */
.robotics-details {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.robotics-details .course-module-tag {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.robotics-details .course-h2 {
  color: #fff;
}
.robotics-details .course-outcomes-wrap {
  border-left: 3px solid rgba(255, 255, 255, 0.4);
}
.robotics-details .course-outcomes-title {
  color: #fff;
}
.robotics-details .core-topics-title {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.robotics-details .topic-footer {
  color: rgba(255, 255, 255, 0.8);
}

/* --- STYLE 1: SPLIT SCREEN --- */
.layout-style-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .layout-style-1 {
    grid-template-columns: 1fr 1fr;
  }
}
.layout-style-1 .ls1-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.layout-style-1 .ls1-left > *:first-child { margin-top: 0; }
.layout-style-1 .topic-footer { margin-top: auto; justify-content: flex-start; text-align: left; }
.layout-style-1 .course-module-tag { align-self: flex-start; }
.layout-style-1 .course-h2 { margin-bottom: 0; }
.layout-style-1 .ls1-topics {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.layout-style-1 .ls1-topic {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px 20px;
  border-radius: 8px;
}
.layout-style-1 .ls1-topic .topic-num { font-size: 1.5rem; font-weight: 900; color: rgba(255,255,255,0.3); }
.layout-style-1 .ls1-topic .topic-text { font-size: 0.9rem; font-weight: 700; }
.layout-style-1 .core-topics-title { margin: 0 0 20px 0; display: inline-block; }


/* --- STYLE 2: TIMELINE --- */
.layout-style-2 {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  align-items: center;
}
.layout-style-2 .ls2-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.layout-style-2 .course-module-tag { align-self: center; }
.layout-style-2 .course-main-desc { text-align: center; max-width: 800px; margin: 0 auto; }
.layout-style-2 .course-outcomes-wrap { text-align: center; border: 1px dashed rgba(255,255,255,0.3); padding: 20px; border-radius: 12px; max-width: 800px; }
.layout-style-2 .ls2-timeline-title { font-size: 1rem; font-weight: 800; text-transform: uppercase; margin-top: 30px; letter-spacing: 2px; }
.layout-style-2 .ls2-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin: 20px 0;
}
@media (min-width: 768px) {
  .layout-style-2 .ls2-timeline {
    flex-direction: row;
    justify-content: space-between;
  }
}
.layout-style-2 .ls2-step {
  flex: 1;
  background: rgba(255,255,255,0.05);
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  gap: 15px;
}
.layout-style-2 .ls2-step .topic-num { font-size: 1.5rem; font-weight: 900; margin-bottom: 0; opacity: 0.5; }
.layout-style-2 .ls2-step .topic-text { font-size: 0.85rem; font-weight: 700; line-height: 1.4; }

@media (min-width: 768px) {
  .layout-style-2 .ls2-step {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    aspect-ratio: 1/1;
    padding: 20px;
    gap: 0;
    border: 2px solid rgba(255,255,255,0.1);
  }
  .layout-style-2 .ls2-step .topic-num { font-size: 2rem; margin-bottom: 10px; }
  .layout-style-2 .ls2-step .topic-text { font-size: 0.8rem; }
}


/* --- STYLE 3: BIG NUMBER LIST --- */
.layout-style-3 {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.layout-style-3 .ls3-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .layout-style-3 .ls3-hero {
    grid-template-columns: 1fr 1.5fr;
  }
}
.layout-style-3 .ls3-text {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: flex-start;
}
.layout-style-3 .ls3-text .course-module-tag { align-self: flex-start; }
.layout-style-3 .ls3-text .course-h2 { font-size: clamp(2.5rem, 8vw, 4rem); margin: 0; line-height: 1; }
.layout-style-3 .ls3-topics-block {
  background: rgba(255,255,255,0.95);
  color: #111;
  padding: 30px;
  border-radius: 16px;
}
.layout-style-3 .ls3-topics-block .core-topics-title {
  background: transparent;
  color: #111;
  border: 1px solid #111;
  margin: 0 0 20px 0;
}
.layout-style-3 .ls3-topics-list {
  display: flex;
  flex-direction: column;
}
.layout-style-3 .ls3-item {
  padding: 15px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: baseline;
  gap: 15px;
  font-weight: 700;
  font-size: 1rem;
}
.layout-style-3 .ls3-item:last-child { border-bottom: none; }
.layout-style-3 .ls3-item .topic-num { font-size: 1.2rem; color: #5c529f; }
.layout-style-3 .course-outcomes-wrap {
  border-left: 4px solid #fff;
  background: transparent;
}

/* Filmmaking & 3D Section */
.white-bg-section {
  background: #fff;
  color: var(--course-dark);
  padding: 80px 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  margin-bottom: 80px;
}
@media (min-width: 992px) {
  .detail-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.detail-row img {
  width: 100%;
  border-radius: 16px;
  height: auto;
  object-fit: cover;
}

.detail-content h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--course-purple);
  margin-top: 20px;
  margin-bottom: 20px;
}

.detail-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--course-purple);
}

.detail-content p, .detail-content ul {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.detail-content ul {
  padding-left: 20px;
}

.detail-content li {
  margin-bottom: 8px;
}

/* Why Onion section */
.why-onion {
  padding: 80px 20px;
}
.why-onion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
}
@media (min-width: 992px) {
  .why-onion-grid {
    grid-template-columns: 40% 1fr;
  }
}

.why-left, .why-right {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.why-right > *:first-child,
.robotics-top > div > *:first-child,
.detail-content > *:first-child {
  margin-top: 0;
}

.why-onion-title {
  text-align: center;
  margin-bottom: 50px;
}

.why-left img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 3px solid #b685ff;
  border-radius: 0;
  margin-bottom: 30px;
}

.why-right-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.4;
}

.why-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: auto;
  padding-top: 30px;
}
@media (min-width: 768px) {
  .why-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.why-card {
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  padding: 20px 25px;
  background: transparent;
}

.why-card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-weight: 800;
  font-size: 1.1rem;
}
.why-card-top span:last-child {
  text-align: left;
  line-height: 1.4;
}
.why-card-num {
  font-size: 2rem;
  font-weight: 900;
}
.why-card p {
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.5;
}

/* Outcomes */
.outcomes-section {
  background: #fdfdfd;
  color: var(--course-purple);
  padding: 80px 0;
}

.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .outcomes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.outcomes-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .outcomes-table {
    grid-template-columns: 1fr 1fr;
  }
}
.outcome-item {
  border-top: 2px solid var(--course-purple);
  padding-top: 15px;
}
.outcome-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.outcome-item p {
  font-size: 0.9rem;
  color: #555;
}

.learn-build-img {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.learn-build-img img {
  width: 100%;
  display: block;
}
.learn-build-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--course-purple);
  color: #fff;
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
}

/* Cooperation */
.cooperation-section {
  padding: 80px 20px;
}
.coop-title {
  text-align: center;
}

.coop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}
@media (min-width: 768px) {
  .coop-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
  }
}

.coop-item {
  display: flex;
  gap: 20px;
  align-items: baseline;
}
.coop-num {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.coop-content h4 {
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.coop-content p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.thank-you {
  padding-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 60px;
}
.thank-you-title {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 40px;
}
.thank-you-contact {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 1.1rem;
}
.thank-you-contact a {
  color: #fff;
  text-decoration: none;
}
