/* =============================================
   AWE Online - Custom Styles for Eduma Child
   Matches production design (Home.pdf)
   ============================================= */

/* --- Variables --- */
:root {
  --awe-teal: #0d8a8a;
  --awe-teal-dark: #0a7070;
  --awe-teal-darker: #085858;
  --awe-teal-light: #e6f5f5;
  --awe-orange: #e8602c;
  --awe-orange-light: #f47b20;
  --awe-yellow: #f5c518;
}

/* =============================================
   AWE HEADER - wp_nav_menu output styles
   (can't add Tailwind classes to WP-generated markup)
   ============================================= */
.awe-header-logo img,
.awe-header-logo .custom-logo {
  max-height: 65px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
}

.awe-header-logo a,
.awe-header-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

/* Menu items generated by wp_nav_menu */
.awe-main-menu > li {
  position: relative;
}

.awe-main-menu > li > a {
  display: block;
  padding: 24px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  white-space: nowrap;
}

.awe-main-menu > li > a:hover,
.awe-main-menu > li.current-menu-item > a,
.awe-main-menu > li.current-menu-ancestor > a {
  color: var(--awe-teal);
}

/* Dropdown arrow */
.awe-main-menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
}

/* Submenu dropdown (default) */
.awe-main-menu > li > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 1000;
}

.awe-main-menu > li:hover > .sub-menu {
  display: block;
}

.awe-main-menu .sub-menu li a {
  display: block;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.awe-main-menu .sub-menu li a:hover {
  background: var(--awe-teal-light);
  color: var(--awe-teal);
}

/* --- Mega Menu (for items with nested sub-menus, e.g. KHOÁ HỌC) --- */
.awe-main-menu > li.menu-item-has-children > .sub-menu > li.menu-item-has-children {
  /* columns become visible when parent is hovered */
}

/* Detect mega menu: a sub-menu whose children also have sub-menus */
.awe-main-menu > li > .sub-menu:has(> li.menu-item-has-children) {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: auto;
  width: max-content;
  max-width: 900px;
  padding: 24px 32px;
  flex-direction: row;
  gap: 40px;
  border-radius: 0 0 12px 12px;
}

.awe-main-menu > li:hover > .sub-menu:has(> li.menu-item-has-children) {
  display: flex;
}

/* Each column */
.awe-main-menu > li > .sub-menu > li.menu-item-has-children {
  flex: 1;
  min-width: 180px;
}

/* Column header */
.awe-main-menu > li > .sub-menu > li.menu-item-has-children > a {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  padding: 0 0 10px 0;
  border-bottom: 2px solid var(--awe-teal);
  margin-bottom: 8px;
  pointer-events: none;
}

.awe-main-menu > li > .sub-menu > li.menu-item-has-children > a:hover {
  background: none;
}

/* Column items (3rd level) */
.awe-main-menu > li > .sub-menu > li.menu-item-has-children > .sub-menu {
  display: block;
  position: static;
  box-shadow: none;
  background: none;
  padding: 0;
  margin: 0;
  min-width: auto;
  border-radius: 0;
}

.awe-main-menu > li > .sub-menu > li.menu-item-has-children > .sub-menu li {
  list-style: none;
}

.awe-main-menu > li > .sub-menu > li.menu-item-has-children > .sub-menu li a {
  padding: 7px 0;
  font-size: 0.875rem;
  color: var(--awe-teal);
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}

.awe-main-menu > li > .sub-menu > li.menu-item-has-children > .sub-menu li a:hover {
  color: var(--awe-teal-dark);
  background: none;
  text-decoration: underline;
}

/* Hide Eduma's default page title banner */
.top_heading,
.top_site_main > .top_heading,
.page-title-wrapper,
.thim-page-title,
#breadcrumbs-default,
.breadcrumbs-wrapper {
  display: none !important;
}

/* --- Tailwind prefix helpers --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-accordion-content.hidden {
  display: none !important;
}

.awe-section > .container {
  max-width: 80%;
}

/* --- Full-width sections (break out of Eduma container) --- */
.awe-section-full {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

.awe-section-full > .container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.awe-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

.awe-hero img {
  width: 100%;
  height: auto;
  max-height: 750px;
  object-fit: cover;
  display: block;
}

/* =============================================
   SECTION HEADINGS (matching production)
   ============================================= */
.awe-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--awe-teal);
  margin-bottom: 4px;
}

.awe-section-subtitle {
  font-size: 1rem;
  color: #999;
  margin-bottom: 0;
}

/* =============================================
   COURSE CARDS (4-col grid)
   Matches: light border, shadow, instructor overlap
   ============================================= */
.awe-course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .awe-course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .awe-course-grid {
    grid-template-columns: 1fr;
  }
}

.awe-course-card {
  background: #fff;
  border: 1px solid #e0eef0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  text-decoration: none !important;
  display: block;
}

.awe-course-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.awe-course-card a {
  text-decoration: none !important;
  color: inherit;
}

.awe-course-card .card-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.awe-course-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.awe-course-card .card-instructor {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.awe-course-card .card-instructor img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  background: #e5e7eb;
}

.awe-course-card .card-instructor span {
  font-size: 0.875rem;
  color: #888;
  margin-top: 4px;
}

.awe-course-card .card-body {
  padding: 8px 16px 16px;
  text-align: center;
}

.awe-course-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.awe-course-card .card-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 12px 0;
}

.awe-course-card .card-price {
  text-align: right;
}

.awe-course-card .price-original {
  font-size: 0.875rem;
  color: #aaa;
  text-decoration: line-through;
  margin-right: 6px;
}

.awe-course-card .price-sale {
  font-size: 1rem;
  font-weight: 700;
  color: var(--awe-orange);
}

.awe-course-card .price-free {
  font-size: 1rem;
  font-weight: 600;
  color: var(--awe-teal);
}

/* =============================================
   "XEM THÊM" BUTTON (teal pill)
   ============================================= */
.awe-btn-teal {
  display: inline-block;
  background: var(--awe-teal);
  color: #fff !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 40px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.3s ease;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
}

.awe-btn-teal:hover {
  background: var(--awe-teal-dark);
  color: #fff !important;
}

/* =============================================
   COURSE PACKAGE (2-column layout)
   ============================================= */
.awe-package {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  margin-bottom: 30px;
}

.awe-package-inner {
  display: flex;
  flex-direction: row;
}

@media (max-width: 991px) {
  .awe-package-inner {
    flex-direction: column;
  }
}

.awe-package-left {
  width: 42%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid #f0f0f0;
}

@media (max-width: 991px) {
  .awe-package-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
}

.awe-package-left .pkg-thumb {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.awe-package-left .pkg-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.awe-package-left .pkg-instructor {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}

.awe-package-left .pkg-instructor img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  background: #e5e7eb;
}

.awe-package-left .pkg-instructor span {
  font-size: 0.875rem;
  color: #888;
  margin-top: 4px;
}

.awe-package-left .pkg-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  text-align: center;
  line-height: 1.4;
  margin: 0 0 4px;
}

.awe-package-left .pkg-subtitle {
  font-size: 1rem;
  color: #999;
  text-align: center;
  margin-bottom: 12px;
}

.awe-package-left .pkg-divider {
  width: 100%;
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 12px;
}

.awe-package-left .pkg-price {
  text-align: right;
  width: 100%;
}

.awe-package-left .pkg-price .price-original {
  font-size: 1rem;
  color: #aaa;
  text-decoration: line-through;
  margin-right: 6px;
}

.awe-package-left .pkg-price .price-sale {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--awe-orange);
}

/* Package RIGHT: Curriculum accordion */
.awe-package-right {
  width: 58%;
  padding: 24px;
}

@media (max-width: 991px) {
  .awe-package-right {
    width: 100%;
  }
}

.awe-accordion {
  margin-bottom: 8px;
}

.awe-accordion-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.awe-accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.awe-accordion-header:hover {
  background: #fafafa;
}

.awe-accordion-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.awe-accordion-icon.red {
  background: #fde8e8;
  color: #e53e3e;
}

.awe-accordion-icon.orange {
  background: #fff3e0;
  color: #f47b20;
}

.awe-accordion-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.awe-accordion-body {
  border-top: 1px solid #e5e7eb;
  padding: 14px;
}

.awe-accordion-body ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.awe-accordion-body ul li {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
}

.awe-accordion-body .checkmark-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 1rem;
  color: #444;
  margin-top: 8px;
  line-height: 1.5;
}

.awe-accordion-body .checkmark-item .check-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.awe-accordion-body .badge-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 1rem;
  color: #444;
  margin-top: 8px;
}

/* Package CTA button */
.awe-package-cta {
  text-align: center;
  margin-top: 20px;
}

/* =============================================
   "AWE ONLINE có gì?" SECTION
   ============================================= */
.awe-features-section {
  background: var(--awe-teal-dark);
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 60px 0;
}

.awe-features-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.awe-features-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}

.awe-features-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 40px;
}

.awe-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .awe-features-grid {
    grid-template-columns: 1fr;
  }
}

.awe-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow 0.3s;
}

.awe-feature-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.awe-feature-card .feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
}

.awe-feature-card .feature-icon svg {
  width: 100%;
  height: 100%;
}

.awe-feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--awe-teal);
  margin-bottom: 12px;
}

.awe-feature-card p {
  font-size: 0.9375rem;
  color: #777;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   TESTIMONIALS SECTION
   ============================================= */
.awe-testimonials {
  padding: 60px 0;
}

.awe-testimonials-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--awe-teal);
  text-align: center;
  margin-bottom: 4px;
}

.awe-testimonials-subtitle {
  font-size: 1rem;
  color: #999;
  text-align: center;
  margin-bottom: 40px;
}

/* Testimonial avatars row (5 circles, center larger) */
.testimonial-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.testimonial-avatars .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0.5;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.testimonial-avatars .avatar.active {
  width: 80px;
  height: 80px;
  opacity: 1;
  border-color: var(--awe-teal);
}

.testimonial-avatars .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-quote-icon {
  text-align: center;
  margin-bottom: 10px;
  color: var(--awe-teal);
  font-size: 24px;
}

.testimonial-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--awe-teal);
  text-align: center;
  margin-bottom: 4px;
}

.testimonial-course {
  font-size: 1rem;
  color: #999;
  text-align: center;
  margin-bottom: 16px;
}

.testimonial-quote {
  font-size: 1rem;
  color: #555;
  font-style: italic;
  line-height: 1.7;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* Swiper overrides */
.testimonial-swiper .swiper-pagination-bullet {
  background: #ccc;
  opacity: 1;
}

.testimonial-swiper .swiper-pagination-bullet-active {
  background: var(--awe-teal);
}

.student-gallery-swiper .swiper-button-prev,
.student-gallery-swiper .swiper-button-next {
  color: #fff;
}

/* =============================================
   STICKY SIDEBAR (Course detail page)
   ============================================= */
#course-sidebar {
  position: sticky;
  top: 100px;
}

/* =============================================
   ACCORDION (Course detail + package)
   ============================================= */
.cp-accordion-toggle {
  cursor: pointer;
  background: none;
  border: none;
}

.cp-accordion-icon {
  transition: transform 0.2s;
}

/* =============================================
   HOMEPAGE SECTIONS SPACING
   ============================================= */
.awe-section {
  align-items: center;
  margin: 0 auto;
}

.awe-section.bg-white {
  background: #fff;
}

.awe-section.bg-gray {
  background: #f8f9fa;
}

.awe-section-header {
  margin-bottom: 24px;
}

.awe-section-cta {
  text-align: center;
  margin-top: 40px;
}

/* =============================================
   FOOTER - matches production design
   ============================================= */
.awe-footer {
  background: #085858;
  color: #fff;
}

.awe-footer-main {
  padding: 50px 0 40px;
  max-width: 80%;
  margin: 0 auto;
}

.awe-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 30px;
}

@media (max-width: 991px) {
  .awe-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .awe-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer logo + brand */
.awe-footer-logo {
  margin-bottom: 16px;
}

.awe-footer-logo img {
  max-height: 60px;
  width: auto;
}

.awe-footer-logo a {
  display: inline-block;
}

.awe-footer-about {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Social icons */
.awe-footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.awe-footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.3s;
}

.awe-footer-social a:hover {
  background: rgba(255, 255, 255, 0.25);
}

.awe-footer-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Footer headings */
.awe-footer-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

/* Footer menu links */
.awe-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awe-footer-menu li {
  margin-bottom: 10px;
}

.awe-footer-menu li a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.awe-footer-menu li a::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.awe-footer-menu li a:hover {
  color: #fff;
}

/* Footer contact */
.awe-footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awe-footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.awe-footer-contact li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
}

/* Copyright bar */
.awe-footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 0;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   RESPONSIVE FIXES
   ============================================= */
@media (max-width: 767px) {
  .awe-hero img {
    height: auto;
    max-height: 400px;
  }

  .awe-course-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .awe-section {
    padding: 40px 0;
  }

  .awe-features-grid {
    gap: 12px;
  }
}
