.main-nav { gap: 0; }
.nav-list,
.nav-dropdown { margin: 0; padding: 0; list-style: none; }
.nav-list { display: flex; align-items: center; gap: clamp(12px, 1.7vw, 25px); }
.nav-item { position: relative; }
.nav-entry { display: flex; align-items: center; }
.nav-list a:not(.button) { position: relative; display: inline-flex; align-items: center; min-height: 42px; padding: 8px 0; font-weight: 700; transition: color .18s ease; }
.nav-list > .nav-item > .nav-entry > a::after { position: absolute; right: 0; bottom: 3px; left: 0; height: 2px; border-radius: 2px; background: var(--red); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-list a:hover,
.nav-list a:focus-visible { color: var(--red); }
.nav-list > .nav-item > .nav-entry > a:hover::after,
.nav-list > .nav-item > .nav-entry > a:focus-visible::after { transform: scaleX(1); }
.dropdown-toggle { display: none; }
.nav-dropdown { position: absolute; z-index: 20; top: calc(100% - 2px); left: 0; width: 250px; padding: 9px; border: 1px solid #f1e9ea; border-radius: 10px; background: #fff; box-shadow: 0 15px 34px #2423261c; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.nav-dropdown .nav-item { width: 100%; }
.nav-dropdown .nav-entry { width: 100%; justify-content: space-between; }
.nav-dropdown a:not(.button) { width: 100%; min-height: 38px; padding: 9px 11px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.nav-dropdown .nav-entry:hover,
.nav-dropdown .nav-entry:focus-within { background: var(--soft); }
.nav-dropdown .nav-dropdown { top: -8px; left: calc(100% - 2px); }
.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.nav-apply { margin-left: 2px; }
.nav-list .nav-apply > .button:hover,
.nav-list .nav-apply > .button:focus-visible { color: #fff; }

@media (max-width: 1100px) and (min-width: 801px) {
  .nav-list { gap: 12px; }
  .nav-list a:not(.button) { font-size: 12px; }
  .button-small { padding-inline: 12px; }
}

@media (max-width: 800px) {
  .main-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 8px 20px 16px; border-top: 1px solid #f2eeee; background: #fff; box-shadow: 0 9px 15px #27212814; }
  .main-nav.open { display: block; }
  .nav-list { display: grid; gap: 0; max-height: min(72vh, 560px); overflow-y: auto; }
  .nav-list a:not(.button) { min-height: 42px; padding: 9px 3px; }
  .nav-entry { justify-content: space-between; }
  .dropdown-toggle { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
  .dropdown-toggle span { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .18s ease; }
  .dropdown-toggle[aria-expanded="true"] span { transform: rotate(225deg) translate(-2px, -2px); }
  .nav-dropdown,
  .nav-dropdown .nav-dropdown { position: static; width: 100%; display: none; padding: 2px 0 5px 13px; border: 0; border-left: 2px solid var(--soft); border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav-item.submenu-open > .nav-dropdown { display: block; }
  .nav-item:hover > .nav-dropdown,
  .nav-item:focus-within > .nav-dropdown { display: none; }
  .nav-item.submenu-open:hover > .nav-dropdown,
  .nav-item.submenu-open:focus-within > .nav-dropdown { display: block; }
  .nav-dropdown .nav-dropdown { padding-left: 12px; }
  .nav-dropdown a:not(.button) { min-height: 36px; font-size: 12px; }
  .nav-apply { margin: 9px 0 0; }
  .nav-apply .button { width: fit-content; }
}

.zoomable-image { cursor: zoom-in; transition: transform .18s ease, filter .18s ease; }
.zoomable-image:hover { filter: saturate(1.06); transform: scale(1.015); }
.footer-logos .zoomable-image:hover { transform: scale(1.08); }
.image-lightbox { box-sizing: border-box; position: fixed; width: min(94vw, 1200px); max-width: 94vw; height: min(92vh, 900px); height: min(92dvh, 900px); max-height: 92dvh; margin: auto; padding: 52px 24px 16px; overflow: hidden; flex-direction: column; border: 1px solid #ffffff30; border-radius: 14px; background: #201d20f5; color: #fff; box-shadow: 0 24px 90px #0008; }
.image-lightbox::backdrop { background: #171317d9; backdrop-filter: blur(4px); }
.image-lightbox[open] { display: flex; animation: lightbox-in .2s ease-out both; }
.lightbox-image { display: block; flex: 1 1 auto; width: 100%; height: auto; min-height: 0; max-height: 100%; object-fit: contain; }
.lightbox-caption { flex: 0 0 auto; margin: 7px 46px 0; color: #fff; font-size: 13px; text-align: center; }
.lightbox-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 1px solid #ffffff55; border-radius: 50%; background: #ffffff18; color: #fff; font-size: 29px; line-height: 1; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.lightbox-close:hover { background: var(--red); transform: rotate(90deg); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 560px) {
  .image-lightbox { width: 94vw; max-width: 94vw; height: 88vh; height: 88dvh; max-height: 88dvh; padding: 48px 10px 12px; border-radius: 10px; }
  .lightbox-caption { margin: 7px 30px 0; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .image-lightbox[open] { animation: none; }
  .zoomable-image, .lightbox-close { transition: none; }
}

/* Shared mobile drawer used by the homepage and every front-end page. */
@media (max-width: 991.98px) {
  .th-menu-wrapper { --theme-color: #f21c3d; --title-color: #242326; }
  .th-menu-wrapper .th-menu-area {
    display: flex;
    flex-direction: column;
    width: min(340px, 88vw);
    max-width: none;
    height: 100%;
    max-height: 100dvh;
    overflow: visible;
    border-right: 3px solid #f21c3d;
    border-radius: 0 14px 14px 0;
    background: #fff;
    transition: left .32s cubic-bezier(.22,.75,.25,1), opacity .2s ease, visibility .2s ease;
  }
  .th-menu-wrapper .mobile-logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    margin: 0;
    padding: 12px 46px;
    border-bottom: 1px solid #f0e9eb;
    background: #fff;
  }
  .th-menu-wrapper .mobile-logo img { width: auto; height: 52px !important; max-width: 100%; object-fit: contain; }
  .th-menu-wrapper .th-menu-toggle {
    display: none;
  }
  .th-menu-wrapper .th-menu-toggle:hover,
  .th-menu-wrapper .th-menu-toggle:focus-visible { color: #fff; background: #242326; }
  .th-menu-wrapper .th-mobile-menu {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 7px 18px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: left;
  }
  .th-menu-wrapper .th-mobile-menu > ul { margin: 0; padding: 0; list-style: none; }
  .th-menu-wrapper .th-mobile-menu > ul > li { border-bottom-color: #f1ecee; }
  .th-menu-wrapper .th-mobile-menu ul li a {
    min-height: 45px;
    padding: 11px 26px 11px 17px;
    color: #303039;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
  }
  .th-menu-wrapper .th-mobile-menu ul li a:before {
    content: '›';
    top: 10px;
    color: #657080;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
  }
  .th-menu-wrapper .th-mobile-menu ul .th-item-has-children > a .th-mean-expand {
    right: 0;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #f21c3d;
    background: #fff2f4;
  }
  .th-menu-wrapper .th-mobile-menu ul .th-item-has-children > a:after { display: none; }
  .th-menu-wrapper .th-mobile-menu ul li.th-active > a,
  .th-menu-wrapper .th-mobile-menu ul li a:hover,
  .th-menu-wrapper .th-mobile-menu ul li a:focus-visible { color: #f21c3d; }
  .th-menu-wrapper .mobile-auth-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    margin: 8px 18px max(18px, env(safe-area-inset-bottom));
    padding-top: 14px;
    border-top: 1px solid #f0e9eb;
    background: #fff;
  }
  .th-menu-wrapper .mobile-auth-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #f21c3d;
    border-radius: 7px;
    color: #c5102d;
    background: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
  }
  .th-menu-wrapper .mobile-auth-footer a:last-child { color: #fff; background: #f21c3d; }
  .th-menu-wrapper .mobile-auth-footer a:hover,
  .th-menu-wrapper .mobile-auth-footer a:focus-visible { border-color: #242326; color: #fff; background: #242326; }
}

.recognition-section { padding-block: 54px 64px; background: #fff; }
.recognition-heading { max-width: 690px; margin: 0 auto 30px; text-align: center; }
.recognition-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 40px); line-height: 1.14; letter-spacing: -.045em; }
.recognition-heading > p:last-child { margin: 11px 0 0; color: #77737a; line-height: 1.7; }
.recognition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.recognition-card { min-width: 0; overflow: hidden; border: 1px solid #e7e5e6; border-radius: 18px; background: #fff; box-shadow: 0 7px 22px #2521280c; transition: transform .2s ease, box-shadow .2s ease; }
.recognition-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px #25212814; }
.recognition-card .certificate-image { width: 100%; height: 278px; margin: 0; padding: 16px; object-fit: contain; background: #f4f7f9; }
.recognition-card-copy { padding: 19px 20px 20px; }
.recognition-card-copy .eyebrow { min-height: 28px; margin-bottom: 7px; letter-spacing: .035em; }
.recognition-card-copy h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.recognition-card-copy > p:not(.eyebrow) { min-height: 47px; margin: 8px 0 15px; color: #76757b; font-size: 13px; line-height: 1.55; }
.certificate-reference { display: grid; gap: 4px; padding-top: 13px; border-top: 1px solid #e7e5e6; font-size: 12px; }
.certificate-reference span { color: #89858b; }
.certificate-reference strong { font-weight: 700; }

.course-page-hero { padding-block: 54px 44px; background: var(--soft); }
.course-page-hero-inner { max-width: 1140px; }
.course-page-hero h1 { margin: 0; color: var(--ink); font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.055em; }
.course-page-hero > .page-width > p:not(.eyebrow) { max-width: 620px; margin: 13px 0 0; color: #625f64; font-size: 16px; line-height: 1.65; }
.course-breadcrumb { display: flex; gap: 9px; margin-top: 20px; color: #7e7880; font-size: 12px; }
.course-breadcrumb a { color: var(--red); font-weight: 700; }
.course-catalog { padding-top: 40px; }
.course-page-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.course-page-toolbar h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.course-count { margin: 5px 0 0; color: #76757b; font-size: 13px; }
.course-search { width: min(100%, 340px); display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #e6e1e3; border-radius: 9px; background: #fff; color: #77737a; }
.course-search input { width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.course-search > span:last-child { font-size: 22px; }
.all-course-card { display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.all-course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px #25212816; }
.all-course-image { display: block; overflow: hidden; background: #f4f4f5; }
.all-course-image img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s ease; }
.all-course-card:hover .all-course-image img { transform: scale(1.035); }
.all-course-card .course-card-body { display: flex; flex: 1; flex-direction: column; }
.all-course-card h3 a { color: inherit; }
.all-course-card h3 a:hover { color: var(--red); }
.all-course-description { min-height: 42px; margin: 8px 0 0; color: #76757b; font-size: 12px; line-height: 1.55; }
.course-date-row { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 10px; color: #76757b; font-size: 10px; }
.course-no-results { margin: 30px 0 0; color: #76757b; text-align: center; }
.course-empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; }
.course-empty h3 { margin: 0; }
.course-empty p { color: #76757b; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .recognition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .recognition-section { padding-block: 34px; }
  .recognition-grid { grid-template-columns: 1fr; gap: 14px; }
  .recognition-card .certificate-image { height: 230px; }
  .recognition-card-copy { padding: 16px; }
  .course-page-hero { padding-block: 36px 30px; }
  .course-page-hero > .page-width > p:not(.eyebrow) { font-size: 13px; }
  .course-catalog { padding: 25px 10px 0; }
  .course-page-toolbar { align-items: stretch; flex-direction: column; }
  .course-search { width: 100%; }
  .course-catalog .course-grid { grid-template-columns: 1fr; gap: 13px; }
  .course-catalog .all-course-image img { height: 210px; }
  .course-catalog .course-card h3 { min-height: 0; font-size: 16px; }
  .course-catalog .course-meta { font-size: 10px; }
  .course-catalog .course-foot { font-size: 12px; }
  .course-catalog .course-foot a { padding: 6px 10px; font-size: 10px; }
  .all-course-description { font-size: 11px; }
}

.site-header .main-nav .nav-list > .nav-apply > a.button:hover,
.site-header .main-nav .nav-list > .nav-apply > a.button:focus-visible { color: #fff !important; -webkit-text-fill-color: #fff; }


.nav-list > li.nav-apply > a.button.button-small:hover,
.nav-list > li.nav-apply > a.button.button-small:focus-visible,
.nav-list > li.nav-apply > a.button.button-small:hover *,
.nav-list > li.nav-apply > a.button.button-small:focus-visible * { color: #fff !important; -webkit-text-fill-color: #fff !important; }

/* Homepage-only responsive corrections; keep the existing desktop design intact. */
@media (max-width: 991.98px) {
  body.home-modern .header-layout1 .menu-area > .container > .row { min-height: 68px; }
  body.home-modern .header-layout1 .menu-area > .container > .row > .col-lg-2 img { height: 52px !important; }
  body.home-modern .header-layout1 .th-menu-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; }
  body.home-modern .header-layout1 .main-menu.mobile-menu-open { left: 12px; width: min(360px, calc(100vw - 24px)); }
}

@media (max-width: 900px) {
  body.home-modern .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 34px; }
  body.home-modern .hero-copy { max-width: 720px; padding-left: 0; }
  body.home-modern .hero h1 { max-width: 760px; font-size: clamp(38px, 7vw, 58px); }
  body.home-modern .hero-description { max-width: 650px; font-size: 15px; }
  body.home-modern .hero-visual { width: 100%; max-width: 720px; height: clamp(240px, 48vw, 360px); margin-inline: auto; }
  body.home-modern .hero-stamp { right: 10px; bottom: -12px; }
  body.home-modern .intro-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.home-modern .intro-photo { width: 100%; max-width: 720px; height: clamp(230px, 42vw, 340px); margin-inline: auto; }
  body.home-modern .intro-copy { max-width: 720px; }
  body.home-modern .intro-copy h2 { font-size: clamp(30px, 5vw, 42px); }
  body.home-modern .stats { flex-wrap: wrap; gap: 18px 36px; }
  body.home-modern .seminar-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  body.home-modern .seminar-inner > div,
  body.home-modern .seminar-inner > img { width: 100%; max-width: 720px; margin-inline: auto; }
  body.home-modern .seminar-inner > img { height: clamp(220px, 42vw, 320px); }
}

@media (max-width: 800px) {
  body.home-modern .recognition-section { padding-block: 38px 44px; }
  body.home-modern .recognition-heading { margin-bottom: 22px; }
  body.home-modern .recognition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  body.home-modern .recognition-card .certificate-image { height: clamp(180px, 30vw, 240px); }
  body.home-modern .popular-inner { width: 100%; }
  body.home-modern .popular-carousel { padding-inline: 16px; }
  body.home-modern .popular-track { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
  body.home-modern .popular-card > img { height: clamp(150px, 30vw, 205px); }
  body.home-modern .catalog { padding-inline: 14px; }
  body.home-modern .catalog-panel { padding: 14px 10px; }
  body.home-modern .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  body.home-modern .course-grid .course-card-body { padding: 12px; }
  body.home-modern .course-grid .course-card h3 { min-height: 0; font-size: 13px; }
  body.home-modern .course-grid .course-meta { flex-wrap: wrap; white-space: normal; font-size: 9px; }
  body.home-modern .course-grid .course-foot { gap: 8px; font-size: 11px; }
  body.home-modern .course-grid .course-foot a { padding-inline: 10px; }
  body.home-modern .success { width: calc(100% - 28px); padding-inline: 24px; }
}

@media (max-width: 560px) {
  body.home-modern .topbar-inner { gap: 8px; }
  body.home-modern .top-phone { font-size: 9px; letter-spacing: 0; }
  body.home-modern .utility-nav { gap: 10px; }
  body.home-modern .hero-inner { gap: 20px; padding-block: 24px 30px; }
  body.home-modern .hero h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.12; }
  body.home-modern .hero-description { font-size: 13px; }
  body.home-modern .hero-actions { flex-wrap: wrap; gap: 10px 16px; }
  body.home-modern .hero-visual { height: clamp(190px, 58vw, 260px); margin: 0; }
  body.home-modern .hero-stamp { right: 4px; bottom: -10px; width: 76px; height: 76px; }
  body.home-modern .recognition-section { padding-block: 30px; }
  body.home-modern .recognition-heading h2 { font-size: 27px; }
  body.home-modern .recognition-grid { grid-template-columns: minmax(0, 1fr); }
  body.home-modern .recognition-card .certificate-image { height: 220px; }
  body.home-modern .recognition-card-copy { padding: 16px; }
  body.home-modern .intro-inner { gap: 18px; }
  body.home-modern .intro-photo { height: clamp(190px, 58vw, 250px); }
  body.home-modern .intro-copy h2 { font-size: 27px; }
  body.home-modern .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  body.home-modern .stats strong { font-size: 21px; }
  body.home-modern .stats span { font-size: 10px; }
  body.home-modern .popular { padding-block: 30px; }
  body.home-modern .popular-tabs { max-width: 100%; justify-content: flex-start; overflow-x: auto; }
  body.home-modern .popular-tabs button { flex: 0 0 auto; }
  body.home-modern .popular-carousel { padding-inline: 16px; }
  body.home-modern .popular-track { grid-auto-columns: calc((100% - 10px) / 2); gap: 10px; }
  body.home-modern .popular-card > img { height: 150px; }
  body.home-modern .course-card-body { padding: 12px; }
  body.home-modern .course-card h3 { font-size: 13px; }
  body.home-modern .course-meta { flex-wrap: wrap; white-space: normal; font-size: 9px; }
  body.home-modern .catalog { padding: 20px 8px 0; }
  body.home-modern .catalog-panel { padding: 10px 8px; }
  body.home-modern .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.home-modern .course-grid .course-card-body { padding: 10px; }
  body.home-modern .course-grid .course-card h3 { font-size: 12px; line-height: 1.35; }
  body.home-modern .course-grid .course-meta { align-items: flex-start; gap: 4px; font-size: 8px; }
  body.home-modern .course-grid .course-foot { align-items: flex-start; flex-direction: column; gap: 8px; font-size: 11px; }
  body.home-modern .course-grid .course-foot a { width: 100%; min-height: 34px; }
  body.home-modern .course-grid .course-card:last-child:nth-child(odd) { width: calc(50% - 6px); }
  body.home-modern .success { width: calc(100% - 24px); padding: 28px 12px; border-radius: 24px; }
  body.home-modern .success h2 { font-size: 26px; }
  body.home-modern .story-row { display: grid; grid-template-columns: 18px repeat(3, minmax(0, 1fr)) 18px; gap: 6px; }
  body.home-modern .story-card { width: 100%; height: clamp(72px, 22vw, 96px); min-width: 0; }
  body.home-modern .story-arrow { font-size: 25px; }
  body.home-modern .seminar-inner { gap: 17px; }
  body.home-modern .seminar-inner > img { height: clamp(180px, 55vw, 230px); }
  body.home-modern .admission-wrap { padding-inline: 12px; }
  body.home-modern .admission-card { padding-inline: 14px; }
  body.home-modern .footer-wrapper.footer-layout-default .widget-area { padding-block: 46px 26px; }
}

@media (max-width: 380px) {
  body.home-modern .page-width { width: calc(100% - 24px); }
  body.home-modern .brand strong { font-size: 11px; }
  body.home-modern .brand small { font-size: 7px; }
  body.home-modern .hero h1 { font-size: 32px; }
  body.home-modern .hero-actions .button { padding-inline: 12px; font-size: 10px; }
  body.home-modern .popular-track { grid-auto-columns: 84%; }
  body.home-modern .course-grid { grid-template-columns: minmax(0, 1fr); }
  body.home-modern .course-grid .course-card:last-child:nth-child(odd) { grid-column: auto; width: 100%; }
  body.home-modern .course-grid .course-card > img { aspect-ratio: 1.5 / 1; }
  body.home-modern .course-grid .course-foot { flex-direction: row; align-items: center; }
  body.home-modern .course-grid .course-foot a { width: auto; }
  body.home-modern .story-row { grid-template-columns: 14px repeat(3, minmax(0, 1fr)) 14px; gap: 4px; }
}

@media (max-width: 560px) {
  body.home-modern .popular-track,
  body.home-modern .course-grid { grid-auto-rows: 1fr; align-items: stretch; }
  body.home-modern .popular-card,
  body.home-modern .course-grid .course-card { height: 100%; display: flex; flex-direction: column; }
  body.home-modern .popular-card > img { flex: 0 0 150px; }
  body.home-modern .popular-card .course-card-body,
  body.home-modern .course-grid .course-card-body { min-width: 0; display: flex; flex: 1; flex-direction: column; }
  body.home-modern .popular-card h3,
  body.home-modern .course-grid .course-card h3 {
    min-height: 33px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body.home-modern .course-grid .course-level { min-height: 22px; }
  body.home-modern .popular-card .course-foot,
  body.home-modern .course-grid .course-foot { margin-top: auto; }

  body.home-modern .hero-actions .button,
  body.home-modern .seminar .button,
  body.home-modern .all-courses {
    min-height: 42px;
    padding: 0 16px;
    font-size: 12px;
    white-space: nowrap;
  }
  body.home-modern .course-grid .course-foot { align-items: stretch; flex-direction: column; }
  body.home-modern .course-grid .course-foot > span {
    width: 100%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  body.home-modern .course-grid .course-foot a {
    display: inline-flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  body.home-modern .popular-card .course-foot { align-items: stretch; flex-wrap: wrap; }
  body.home-modern .popular-card .course-foot > span { flex: 1 0 100%; white-space: nowrap; font-variant-numeric: tabular-nums; }
  body.home-modern .popular-card .course-foot a {
    width: 100%;
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }
  body.home-modern .admission-card > div { width: 100%; flex-wrap: wrap; justify-content: center; }
  body.home-modern .admission-card > div a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    font-size: 10px;
    white-space: nowrap;
  }
  body.home-modern .footer-wrapper.footer-layout-default .footer-apply > .th-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Keep the home catalog price and CTA on separate rows at narrow widths. */
  .hero ~ .catalog .course-grid .course-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }
  .hero ~ .catalog .course-grid .course-foot > span {
    min-width: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .hero ~ .catalog .course-grid .course-foot > a {
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    line-height: 1;
    white-space: nowrap !important;
    overflow: hidden;
    word-break: keep-all;
    font-size: 11px;
  }
}


.course-detail-hero { padding-block: 46px 38px; }
.course-detail-section { padding-block: 40px 56px; }
.course-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.course-detail-main { min-width: 0; }
.course-detail-cover { max-height: 470px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #f4f4f5; }
.course-detail-cover img { width: 100%; max-height: 470px; object-fit: cover; }
.course-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.course-detail-stats > div { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.course-detail-stats span { color: var(--muted); font-size: 12px; }
.course-detail-stats strong { color: var(--ink); font-size: 16px; }
.course-detail-content { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.course-detail-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.course-detail-tabs button { padding: 10px 14px; border: 0; border-radius: 7px; background: #f7f5f5; color: #625f64; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.course-detail-tabs button:hover, .course-detail-tabs button.active { background: var(--red); color: #fff; }
.course-detail-panel { padding-top: 22px; }
.course-detail-panel[hidden] { display: none !important; }
.course-detail-panel h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.03em; }
.course-detail-panel > p, .course-rich-content { color: #625f64; font-size: 14px; line-height: 1.75; }
.course-rich-content img { max-width: 100%; height: auto; }
.course-detail-aside { position: sticky; top: 24px; }
.course-enroll-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px #2521280c; }
.course-enroll-card .eyebrow { margin-bottom: 4px; }
.course-detail-price { display: block; margin-bottom: 17px; color: var(--ink); font-size: 32px; letter-spacing: -.04em; }
.course-enroll-button { width: 100%; min-height: 48px; }
.course-enroll-card h2 { margin: 24px 0 12px; font-size: 17px; }
.course-enroll-card dl { display: grid; gap: 0; margin: 0; }
.course-enroll-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.45; }
.course-enroll-card dt { color: var(--muted); }
.course-enroll-card dd { margin: 0; color: var(--ink); font-weight: 700; text-align: right; }
.course-instructor-list { display: grid; gap: 12px; }
.course-instructor-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.course-instructor-card img { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; object-fit: cover; }
.course-instructor-card h3 { margin: 0 0 4px; font-size: 15px; }
.course-instructor-card p { margin: 0; color: var(--muted); font-size: 12px; }
.course-review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.course-review > div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 13px; }
.course-review time { color: var(--muted); font-size: 11px; }
.course-review p { margin: 8px 0 0; color: #625f64; line-height: 1.6; }
.course-review-form { display: grid; gap: 10px; margin-top: 22px; }
.course-review-form label { font-weight: 700; }
.course-review-form textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.course-review-form .button { width: fit-content; cursor: pointer; }
.course-login-link, .course-related-link { color: var(--red); font-weight: 700; }
.course-flash-message { padding: 12px; border-radius: 8px; background: var(--soft); color: var(--red-dark) !important; }
.course-related-section { padding: 10px 24px 56px; background: #fff; }
.course-related-section .page-width { max-width: 1320px; }
.course-related-section .course-page-toolbar { align-items: center; }

/* All Courses layout tuned to the current homepage palette and responsive card spacing. */
.course-catalog { padding: 38px 0 58px; }
.course-catalog .course-page-toolbar { align-items: end; margin-bottom: 22px; }
.course-catalog .course-page-toolbar h2 { color: var(--ink); }
.course-catalog .course-search { border-color: var(--line); box-shadow: 0 3px 12px #24232608; }
.course-catalog .course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.course-catalog .all-course-card { min-width: 0; border-color: var(--line); border-radius: 14px; box-shadow: 0 5px 18px #2423260b; }
.course-catalog .all-course-image { flex: 0 0 auto; aspect-ratio: 1.42 / 1; }
.course-catalog .all-course-image img { width: 100%; height: 100%; object-fit: cover; }
.course-catalog .all-course-card .course-card-body { min-width: 0; padding: 15px 16px 16px; }
.course-catalog .course-level { color: var(--red-dark); }
.course-catalog .course-card h3 { min-height: 2.8em; color: var(--ink); font-size: 15px; line-height: 1.4; }
.course-catalog .all-course-description { min-height: 3.2em; margin-top: 7px; font-size: 11px; }
.course-catalog .course-date-row { gap: 6px; margin-top: 9px; line-height: 1.5; }
.course-catalog .course-meta { gap: 6px; margin-top: 10px; font-size: 10px; }
.course-catalog .course-foot { gap: 8px; margin-top: auto; padding-top: 12px; }
.course-catalog .course-foot strong { color: var(--ink); }
.course-catalog .course-foot a { flex: 0 0 auto; padding-inline: 13px; background: var(--red); color: #fff; white-space: nowrap; }
.course-catalog .course-foot a:hover { background: var(--red-dark); }
@media (max-width: 1100px) {
  .course-catalog .course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .course-catalog .all-course-card .course-card-body { padding-inline: 12px; }
  .course-catalog .course-card h3 { font-size: 14px; }
}
@media (max-width: 820px) {
  .course-catalog .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .course-catalog .all-course-image { aspect-ratio: 1.55 / 1; }
}
@media (max-width: 560px) {
  .course-catalog { padding: 26px 0 40px; }
  .course-catalog .course-page-toolbar { align-items: stretch; gap: 13px; margin-bottom: 17px; }
  .course-catalog .course-search { min-height: 43px; }
  .course-catalog .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .course-catalog .all-course-card { border-radius: 12px; }
  .course-catalog .all-course-image { aspect-ratio: 1.18 / 1; }
  .course-catalog .all-course-card .course-card-body { padding: 11px 11px 12px; }
  .course-catalog .course-level { margin-bottom: 4px; font-size: 8px; }
  .course-catalog .course-card h3 { min-height: 0; font-size: 12px; line-height: 1.35; }
  .course-catalog .all-course-description { min-height: 0; margin-top: 6px; font-size: 10px; line-height: 1.5; }
  .course-catalog .course-date-row { margin-top: 7px; font-size: 9px; }
  .course-catalog .course-meta { align-items: flex-start; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 9px; white-space: normal; }
  .course-catalog .course-foot { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; font-size: 11px; }
  .course-catalog .course-foot a { min-height: 34px; width: 100%; padding-inline: 8px; font-size: 10px; }
}
@media (max-width: 370px) {
  .course-catalog .course-grid { grid-template-columns: 1fr; gap: 15px; }
  .course-catalog .all-course-image { aspect-ratio: 1.7 / 1; }
  .course-catalog .all-course-card .course-card-body { padding: 14px; }
  .course-catalog .course-card h3 { font-size: 15px; }
  .course-catalog .course-meta { align-items: center; flex-direction: row; }
  .course-catalog .course-foot { align-items: center; flex-direction: row; }
  .course-catalog .course-foot a { width: auto; padding-inline: 12px; }
}
@media (max-width: 900px) {
  .course-detail-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
  .course-detail-content { padding: 18px; }
  .course-enroll-card { padding: 18px; }
}
@media (max-width: 700px) {
  .course-detail-layout { grid-template-columns: 1fr; }
  .course-detail-aside { position: static; grid-row: 1; }
  .course-detail-cover { max-height: 340px; }
  .course-detail-cover img { max-height: 340px; }
  .course-detail-stats { gap: 8px; }
  .course-detail-stats > div { padding: 12px; }
  .course-detail-stats strong { font-size: 13px; }
  .course-detail-tabs { gap: 5px; }
  .course-detail-tabs button { padding: 9px 10px; font-size: 11px; }
  .course-related-section { padding-inline: 16px; }
}

/* Homepage-matched public blog, About Us and result pages. */
.editorial-hero { background: var(--soft); }
.editorial-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; padding-block: 42px 60px; align-items: start; }
.editorial-main { min-width: 0; }
.editorial-toolbar { margin-bottom: 20px; }
.editorial-toolbar h2, .about-featured h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.editorial-search { display: flex; gap: 8px; }
.editorial-search input { width: min(230px, 38vw); min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12px; }
.editorial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.editorial-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #eee3e5; border-radius: 15px; background: #fff; box-shadow: 0 6px 20px #25212808; transition: transform .2s ease, box-shadow .2s ease; }
.editorial-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px #25212812; }
.editorial-image { display: block; height: 205px; overflow: hidden; background: var(--soft); }
.editorial-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.editorial-card:hover .editorial-image img { transform: scale(1.035); }
.editorial-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 18px; }
.editorial-meta, .editorial-article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #817c83; font-size: 11px; }
.editorial-card h3 { margin: 10px 0 7px; color: var(--ink); font-size: 18px; line-height: 1.4; letter-spacing: -.025em; }
.editorial-card h3 a { color: inherit; }
.editorial-card h3 a:hover { color: var(--red); }
.editorial-card-body > p { margin: 0 0 15px; color: #6d6970; font-size: 12px; line-height: 1.7; }
.editorial-read-more { margin-top: auto; }
.editorial-sidebar { display: grid; gap: 16px; }
.editorial-widget, .editorial-contact { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.editorial-widget h2, .editorial-contact h2 { margin: 0 0 13px; color: var(--ink); font-size: 17px; letter-spacing: -.025em; }
.editorial-widget > p { margin: 0 0 14px; color: #6d6970; font-size: 12px; line-height: 1.65; }
.editorial-recent { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.editorial-recent li { display: grid; gap: 5px; padding: 11px 0; border-top: 1px solid var(--line); }
.editorial-recent li:first-child { border-top: 0; padding-top: 0; }
.editorial-recent a { color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.5; }
.editorial-recent a:hover { color: var(--red); }
.editorial-recent time { color: var(--muted); font-size: 10px; }
.editorial-contact { border-color: #f5d4da; background: var(--soft); }
.editorial-contact .eyebrow { margin-bottom: 5px; }
.editorial-contact h2 { margin-bottom: 15px; font-size: 20px; }
.editorial-empty { grid-column: 1 / -1; padding: 46px 20px; border: 1px dashed #e7dadd; border-radius: 14px; background: #fffafa; text-align: center; }
.editorial-empty h3 { margin: 0; font-size: 20px; }
.editorial-empty p { margin: 8px 0 0; color: var(--muted); }
.editorial-pagination { grid-column: 1 / -1; }
.editorial-detail-hero .course-page-hero-inner > h1 { max-width: 900px; }
.editorial-detail-layout { grid-template-columns: minmax(0, 1fr) 290px; }
.editorial-article { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.editorial-cover { width: 100%; max-height: 490px; margin-bottom: 21px; border-radius: 12px; object-fit: cover; }
.editorial-article h2 { margin: 10px 0 18px; color: var(--ink); font-size: clamp(25px, 3vw, 34px); line-height: 1.3; letter-spacing: -.04em; }
.editorial-rich-content { color: #5f5b62; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.editorial-rich-content h1, .editorial-rich-content h2, .editorial-rich-content h3, .editorial-rich-content h4 { margin: 1.4em 0 .5em; color: var(--ink); }
.editorial-rich-content img, .editorial-rich-content video { max-width: 100%; height: auto; border-radius: 10px; }
.editorial-rich-content a { color: var(--red-dark); text-decoration: underline; }
.editorial-rich-content ul, .editorial-rich-content ol { margin: 0 0 1em 1.4em; padding: 0; }
.editorial-gallery { margin-top: 26px; }
.editorial-gallery h3 { margin: 0 0 12px; font-size: 18px; }
.editorial-gallery > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.editorial-gallery img { width: 100%; height: 140px; border-radius: 9px; object-fit: cover; }
.editorial-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 16px 0; border-block: 1px solid var(--line); color: var(--ink); font-size: 12px; }
.editorial-share > div { display: flex; flex-wrap: wrap; gap: 7px; }
.editorial-share a { padding: 7px 10px; border: 1px solid #f0d2d7; border-radius: 999px; color: var(--red-dark); font-size: 10px; font-weight: 700; }
.editorial-share a:hover { background: var(--red); color: #fff; }
.editorial-post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 20px 0; }
.editorial-post-nav a { display: grid; gap: 5px; max-width: 48%; color: var(--ink); }
.editorial-post-nav a.next { text-align: right; }
.editorial-post-nav small { color: var(--red-dark); font-size: 10px; font-weight: 700; }
.editorial-post-nav strong { font-size: 12px; }
.result-page-hero { background: var(--soft); }
.result-search-section { display: grid; place-items: center; padding-block: 46px 60px; }
.result-search-card { width: min(100%, 540px); padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 12px 34px #2521280b; }
.result-search-heading { margin-bottom: 23px; text-align: center; }
.result-search-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: var(--soft); color: var(--red); font-size: 25px; font-weight: 800; }
.result-search-heading .eyebrow { margin-bottom: 4px; }
.result-search-heading h2 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.035em; }
.result-search-heading > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.result-search-form { display: grid; gap: 9px; }
.result-search-form > label { margin-top: 4px; color: var(--ink); font-size: 12px; font-weight: 700; }
.result-search-form select, .result-search-form input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.result-search-form select:focus, .result-search-form input:focus { border-color: var(--red); outline: 3px solid #f21c3d1c; }
.result-captcha-row { display: grid; grid-template-columns: auto 38px minmax(0, 1fr); align-items: center; gap: 9px; }
.result-captcha-code { min-width: 130px; padding: 9px 14px; border: 1px dashed #efb6c0; border-radius: 8px; background: var(--soft); color: var(--red-dark); font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 800; letter-spacing: 5px; text-align: center; user-select: none; }
.result-captcha-refresh { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--red-dark); font-size: 21px; cursor: pointer; transition: transform .25s ease, background .2s ease, color .2s ease; }
.result-captcha-refresh:hover { transform: rotate(90deg); background: var(--soft); }
.result-search-form .result-submit-button { width: 100%; min-height: 48px; margin-top: 8px; }
.result-alert { margin-bottom: 17px; padding: 12px 14px; border: 1px solid #f5c2ca; border-radius: 8px; background: #fff5f6; color: #a9162e; font-size: 12px; line-height: 1.6; }
.result-help { margin: 17px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.result-help a { color: var(--red-dark); font-weight: 800; }
.about-page-hero { background: var(--soft); }
.about-content-section { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 25px; align-items: start; padding-block: 42px 60px; }
.about-profile-card { min-width: 0; padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.about-profile-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 21px; }
.about-profile-icon { width: 52px; height: 52px; display: grid; flex: 0 0 52px; place-items: center; border-radius: 14px; background: var(--red); color: #fff; font-size: 15px; font-weight: 800; }
.about-profile-heading .eyebrow { margin-bottom: 4px; }
.about-profile-heading h2 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.035em; }
.about-rich-content { color: #5f5b62; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.about-rich-content h1, .about-rich-content h2, .about-rich-content h3, .about-rich-content h4 { margin: 1.35em 0 .5em; color: var(--ink); }
.about-rich-content img, .about-rich-content video { max-width: 100%; height: auto; border-radius: 10px; }
.about-rich-content a { color: var(--red-dark); text-decoration: underline; }
.about-rich-content ul, .about-rich-content ol { margin: 0 0 1em 1.4em; padding: 0; }
.about-profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--line); }
.about-text-link, .about-all-courses { color: var(--red-dark); font-size: 12px; font-weight: 800; }
.about-featured { display: grid; gap: 13px; }
.about-featured .course-page-toolbar { margin-bottom: 2px; }
.about-course-card { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.about-course-image { height: 100%; min-height: 105px; overflow: hidden; border-radius: 8px; background: var(--soft); }
.about-course-image img { width: 100%; height: 100%; min-height: 105px; object-fit: cover; }
.about-course-card h3 { margin: 2px 0 5px; font-size: 13px; line-height: 1.4; }
.about-course-card h3 a { color: var(--ink); }
.about-course-card h3 a:hover { color: var(--red); }
.about-course-card p { margin: 0 0 9px; color: var(--red-dark); font-size: 12px; font-weight: 800; }
.about-course-card .button { min-height: 32px; padding-inline: 11px; font-size: 10px; }
.about-courses-empty { padding: 18px; border: 1px dashed #e7dadd; border-radius: 12px; background: #fffafa; }
.about-courses-empty p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.about-all-courses { justify-self: start; padding: 4px 2px; }
@media (max-width: 900px) {
  .editorial-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 18px; }
  .editorial-grid { gap: 13px; }
  .editorial-image { height: 170px; }
  .about-content-section { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
}
@media (max-width: 700px) {
  .editorial-layout, .editorial-detail-layout, .about-content-section { grid-template-columns: 1fr; padding-block: 28px 40px; }
  .editorial-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-sidebar .editorial-widget:first-child { grid-row: span 2; }
  .editorial-toolbar { align-items: flex-start; flex-direction: column; }
  .editorial-search { width: 100%; }
  .editorial-search input { width: auto; flex: 1; }
  .about-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-featured > .course-page-toolbar, .about-all-courses { grid-column: 1 / -1; }
  .about-featured > .about-courses-empty { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .editorial-grid { grid-template-columns: 1fr; gap: 14px; }
  .editorial-image { height: 205px; }
  .editorial-card-body { padding: 16px; }
  .editorial-sidebar { grid-template-columns: 1fr; }
  .editorial-sidebar .editorial-widget:first-child { grid-row: auto; }
  .editorial-article { padding: 16px; }
  .editorial-gallery > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-gallery img { height: 120px; }
  .result-search-section { padding-block: 26px 38px; }
  .result-search-card { padding: 22px 17px; }
  .result-captcha-row { grid-template-columns: minmax(0, 1fr) 36px; }
  .result-captcha-row input { grid-column: 1 / -1; }
  .about-content-section { gap: 20px; }
  .about-profile-card { padding: 20px 17px; }
  .about-profile-heading { align-items: flex-start; }
  .about-profile-heading h2 { font-size: 21px; }
  .about-rich-content { font-size: 13px; }
  .about-featured { grid-template-columns: 1fr; }
  .about-featured > .course-page-toolbar, .about-all-courses, .about-featured > .about-courses-empty { grid-column: auto; }
}

.software-page-hero { background: var(--soft); }
.software-catalog { padding-block: 42px 48px; }
.software-toolbar { align-items: center; margin-bottom: 24px; }
.software-toolbar .eyebrow { margin-bottom: 6px; }
.software-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.software-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #eee3e5; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px #25212808; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.software-card:hover { transform: translateY(-4px); border-color: #f3b8c1; box-shadow: 0 16px 32px #25212812; }
.software-card-top { position: relative; min-height: 156px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 11px; padding: 21px; overflow: hidden; background: linear-gradient(135deg, #fff4f5, #ffe4e8); }
.software-card-top::after { position: absolute; right: -34px; top: -52px; width: 150px; height: 150px; border: 1px solid #f21c3d22; border-radius: 50%; content: ""; box-shadow: 0 0 0 18px #f21c3d08, 0 0 0 38px #f21c3d06; }
.software-category { position: relative; z-index: 1; padding: 5px 9px; border: 1px solid #f3c6cd; border-radius: 999px; background: #fff; color: var(--red-dark); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.software-mark { position: absolute; top: 19px; right: 20px; color: #ef8d9b; font-family: ui-monospace, Consolas, monospace; font-size: 25px; font-weight: 700; }
.software-card-top h3 { position: relative; z-index: 1; max-width: 86%; margin: 0; color: var(--ink); font-size: 20px; line-height: 1.3; letter-spacing: -.03em; }
.software-card-body { display: flex; flex: 1; flex-direction: column; padding: 19px 20px 20px; }
.software-card-body > p { min-height: 68px; margin: 0; color: #6d6970; font-size: 13px; line-height: 1.65; }
.software-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 15px; color: #77737a; font-size: 11px; }
.software-meta span { display: inline-flex; align-items: center; gap: 6px; }
.software-meta i { color: var(--red); }
.software-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 17px; }
.software-status { display: inline-flex; align-items: center; gap: 7px; color: #6f6b72; font-size: 10px; font-weight: 700; }
.software-status > i { width: 7px; height: 7px; border-radius: 50%; background: #ef9e29; }
.software-status.is-live > i { background: #21a875; }
.software-card-action { flex: 0 0 auto; gap: 8px; }
.software-card-action span, .software-contact-button span { transition: transform .2s ease; }
.software-card-action:hover span, .software-contact-button:hover span { transform: translateX(3px); }
.software-empty { grid-column: 1 / -1; padding: 62px 20px; border: 1px dashed #e7dadd; border-radius: 14px; background: #fffafa; text-align: center; }
.software-empty h3 { margin: 0; font-size: 20px; }
.software-empty p { margin: 8px 0 0; color: var(--muted); }
.software-pagination { display: flex; justify-content: center; margin-top: 30px; }
.software-pagination .pagination { gap: 6px; }
.software-pagination .page-link { border-color: var(--line); border-radius: 7px; color: var(--ink); }
.software-pagination .page-item.active .page-link { border-color: var(--red); background: var(--red); color: #fff; }
.software-contact-section { padding: 0 24px 58px; }
.software-contact-card { max-width: 1220px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 30px 34px; border: 1px solid #f5d4da; border-radius: 18px; background: var(--soft); }
.software-contact-card .eyebrow { margin-bottom: 6px; }
.software-contact-card h2 { margin: 0; font-size: clamp(21px, 2.5vw, 30px); letter-spacing: -.035em; }
.software-contact-card p:not(.eyebrow) { margin: 7px 0 0; color: #6d6970; font-size: 13px; }
@media (max-width: 900px) { .software-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 560px) {
  .software-catalog { padding-block: 28px 36px; }
  .software-toolbar { align-items: flex-start; }
  .software-grid { grid-template-columns: 1fr; gap: 13px; }
  .software-card-top { min-height: 135px; padding: 18px; }
  .software-card-body { padding: 16px; }
  .software-card-body > p { min-height: auto; }
  .software-card-footer { align-items: flex-start; flex-direction: column; }
  .software-contact-section { padding: 0 16px 38px; }
  .software-contact-card { align-items: flex-start; flex-direction: column; padding: 22px; }
}

/* Keep course cards equal in each row while letting titles keep their full text. */
.home-modern .course-grid,
.home-modern .popular-track { grid-auto-rows: 1fr; align-items: stretch; }
.home-modern .course-grid > .course-card,
.home-modern .popular-track > .popular-card { height: 100%; display: flex; flex-direction: column; }
.home-modern .course-grid > .course-card > img { flex: 0 0 auto; }
.home-modern .popular-track > .popular-card > img { flex: 0 0 auto; }
.home-modern .course-grid .course-card-body,
.home-modern .popular-track .course-card-body { min-width: 0; display: flex; flex: 1 1 auto; flex-direction: column; }
.home-modern .course-grid .course-foot,
.home-modern .popular-track .course-foot { margin-top: auto; }
