/* ===== Hdsf3 Mobile Responsive (max-width: 768px) ===== */

/* ----- Mobile Menu ----- */
.hdsf3-mobile-menu-toggle {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
  background: var(--color-primary, #8c1726);
  border: none;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
}

.hdsf3-mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}

.hdsf3-mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1098;
}

.hdsf3-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 82%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
  transition: right 0.3s ease;
  z-index: 1099;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hdsf3-mobile-menu.active {
  right: 0;
}

.hdsf3-mobile-menu__header {
  background: var(--color-primary, #a22135);
  color: #fff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hdsf3-mobile-menu__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.hdsf3-mobile-menu__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.hdsf3-mobile-menu__section {
  padding: 12px 0 4px;
}

.hdsf3-mobile-menu__section-title {
  padding: 8px 20px;
  font-size: 12px;
  color: #999;
  letter-spacing: 0.5px;
}

.hdsf3-mobile-menu__item {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  color: #231515;
  cursor: pointer;
  text-decoration: none;
}

.hdsf3-mobile-menu__item:active,
.hdsf3-mobile-menu__item:hover {
  background: rgba(162, 33, 53, 0.06);
  color: var(--color-primary, #a22135);
}

.hdsf3-mobile-menu__item--active {
  color: var(--color-primary, #a22135);
  font-weight: 500;
  background: rgba(162, 33, 53, 0.04);
}

.hdsf3-mobile-menu__group {
  border-bottom: 1px solid #f0f0f0;
}

.hdsf3-mobile-menu__group .hdsf3-mobile-menu__item--toggle {
  border-bottom: none;
}

.hdsf3-mobile-menu__item--toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
}

.hdsf3-mobile-menu__item--toggle span {
  flex: 1;
}

.hdsf3-mobile-menu__arrow {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(-45deg);
  transition: transform 0.25s ease, border-color 0.2s ease;
  margin-top: -2px;
}

.hdsf3-mobile-menu__group.is-open .hdsf3-mobile-menu__arrow {
  transform: rotate(45deg);
  margin-top: 2px;
  border-color: var(--color-primary, #a22135);
}

.hdsf3-mobile-menu__group.is-open .hdsf3-mobile-menu__item--toggle {
  color: var(--color-primary, #a22135);
  background: rgba(162, 33, 53, 0.04);
}

.hdsf3-mobile-menu__submenu {
  display: none;
  background: #fafafa;
  padding: 4px 0 8px;
}

.hdsf3-mobile-menu__group.is-open .hdsf3-mobile-menu__submenu {
  display: block;
}

.hdsf3-mobile-menu__subitem {
  display: block;
  padding: 12px 20px 12px 36px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.hdsf3-mobile-menu__subitem:last-child {
  border-bottom: none;
}

.hdsf3-mobile-menu__subitem:active,
.hdsf3-mobile-menu__subitem:hover {
  color: var(--color-primary, #a22135);
  background: rgba(162, 33, 53, 0.06);
}

@media screen and (min-width: 769px) {
  .hdsf3-mobile-menu-toggle,
  .hdsf3-mobile-menu,
  .hdsf3-mobile-menu-overlay {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --gutter: 16px;
    --section-gap: 24px;
  }

  .hdsf3-mobile-menu {
    display: block;
  }

  .hdsf3-mobile-menu-toggle {
    display: block;
  }

  /* ----- Header ----- */
  .top-bar {
    display: none;
  }

  .main-header__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .main-header__brand {
    flex: 1;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 0;
    gap: 20px;
  }

  .main-header__logo img {
    width: 148px;
  }

  .main-header__title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
    font-size: 17px;
    white-space: nowrap;
    line-height: 1.2;
  }

  .main-header__title::before {
    content: "";
    flex-shrink: 0;
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.45);
  }

  .main-nav {
    display: none;
  }

  .site-header .dowpdown-wrapper {
    display: none;
  }

  /* ----- Hero ----- */
  .hero {
    padding-top: 0;
    padding-bottom: 24px;
    overflow: hidden;
  }

  .hero .hero__inner.container {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    width: 100%;
  }

  .hero__inner {
    flex-direction: column;
    gap: 24px;
  }

  .hero__banner,
  .hero__sidebar {
    flex: none;
    width: 100%;
  }

  .hero__banner .hero__swiper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    box-shadow: none;
  }

  .hero__sidebar {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    box-sizing: border-box;
  }

  .notice-panel__title-cn,
  .section-title__cn {
    font-size: 22px;
    line-height: 30px;
  }

  .notice-panel__tabs {
    gap: 16px;
    flex-wrap: wrap;
  }

  .notice-panel__tabs .tabs__item {
    font-size: 18px;
    line-height: 26px;
  }

  .notice-panel__header {
    align-items: center;
    gap: 12px;
  }

  .notice-list__item {
    padding: 12px 8px;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }

  .notice-list__text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notice-list__date {
    flex-shrink: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  /* ----- Search ----- */
  .search-section {
    padding: 16px 0 28px;
    background-image: url("../images/newindex/img/background-light-ribbon.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 100%;
    min-height: 188px;
    box-sizing: border-box;
  }

  .search-section__inner {
    width: 100%;
  }

  .search-box {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 12px 12px;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(82, 150, 254, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .search-box__input {
    width: 100%;
    min-height: 64px;
    height: 64px;
    /* padding: 12px 12px; */
    font-size: 15px;
    line-height: 22px;
    border-radius: 8px;
    /* background: #f7f9fc; */
    box-sizing: border-box;
    color: var(--color-text);
    resize: none;
    overflow: auto;
    border: none;
    outline: none;
    max-height: none;
  }

  .search-box__input::placeholder {
    color: #9aa3b2;
  }

  .search-box__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 0;
  }

  .search-box__filters {
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
  }

  .search-box__filters::-webkit-scrollbar {
    display: none;
  }

  .search-box__filter-divider {
    display: none;
  }

  .search-box__filter {
    flex: 0 0 auto;
    justify-content: center;
    font-size: 11px;
    padding: 4px 8px;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
    border-radius: 14px;
    line-height: 1.2;
  }

  .search-box__filter img {
    width: 11px;
    height: 11px;
  }

  .search-box__btn {
    flex-shrink: 0;
    width: auto;
    min-width: 68px;
    height: 32px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 0;
    gap: 4px;
  }

  .search-box__btn img {
    width: 13px;
    height: 13px;
  }

  /* ----- Jobs ----- */
  .jobs-section {
    padding: 28px 0;
  }

  .jobs-section__inner {
    flex-direction: column;
    gap: 32px;
  }

  .jobs-section__main,
  .jobs-section__sidebar {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .section-header {
    margin-bottom: 16px;
  }

  .section-header__more {
    font-size: 14px;
  }

  .tabs {
    gap: 16px;
    margin-bottom: 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs__item {
    font-size: 15px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .jobs-grid {
    gap: 12px;
  }

  .job-card {
    flex: 0 0 100%;
    height: auto;
    min-height: 120px;
    transition: none;
  }

  .job-card:hover {
    border-color: var(--color-border-pink);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
  }

  .job-card__title {
    font-size: 17px;
    line-height: 24px;
  }

  .job-card__tags {
    flex-wrap: wrap;
  }

  .job-card__tag {
    font-size: 12px;
  }

  .job-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* ----- Calendar ----- */
  .calendar-widget {
    height: auto;
    min-height: 0;
  }

  .calendar-widget__body {
    min-height: 420px;
  }

  .calendar-widget .calendar_content {
    flex: 1;
    min-height: 360px;
  }

  .calendar-widget__table-wrap,
  .calendar-widget #hdsfCalendarTime {
    flex: 1;
    min-height: 320px;
  }

  .calendar-widget .calendar_table {
    min-height: 300px;
  }

  .calendar-widget .calendar_table th,
  .calendar-widget .calendar_table td {
    padding: 10px 2px;
    font-size: 14px;
  }

  .calendar-widget .calendar_nav th {
    font-size: 15px;
    padding: 12px 2px;
  }

  .calendar-widget .calendar_week th {
    font-size: 13px;
    padding: 8px 2px;
  }

  .calendar-widget .calendar_table td.has_event::before,
  .calendar-widget .calendar_table td.today::before {
    width: 28px;
    height: 28px;
  }

  .calendar-widget .calendar_legend {
    gap: 6px 10px;
    padding: 8px 10px;
  }

  .calendar-widget .calendar_legend-item {
    font-size: 11px;
  }

  .calendar-widget .calendarInfo {
    max-width: calc(100vw - 32px);
    min-width: 200px;
  }

  /* ----- Internship ----- */
  .internship-section {
    padding: 28px 0;
    padding-bottom: 0px;
  }

  .internship-section__inner {
    flex-direction: column;
    gap: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  .internship-section__left,
  .internship-section__right {
    flex: none;
    width: 100%;
  }

  .internship-section__left-inner {
    padding: 16px 0 0;
  }

  .internship-section__left .section-header,
  .internship-section__tabs {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .internship-section__tabs {
    gap: 12px;
  }

  .internship-section__left .tabs__item {
    font-size: 14px;
  }

  .internship-section__lists {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .internship-section__col,
  .company-list {
    width: 100%;
    max-width: 100%;
  }

  .internship-section__col + .internship-section__col {
    display: none;
  }

  .company-list__item {
    width: 100%;
    padding: 14px var(--gutter);
    margin: 0;
    gap: 10px;
    box-sizing: border-box;
  }

  .company-list__category {
    font-size: 13px;
  }

  .company-list__name {
    font-size: 13px;
  }

  .company-list__date {
    font-size: 12px;
  }

  .internship-section__right-inner {
    display: flex;
    flex-direction: column;
    padding: 16px;
    min-height: 520px;
    box-sizing: border-box;
  }

  .internship-section__right .section-header {
    flex-shrink: 0;
  }

  .activity-list {
    flex: 1;
    min-height: 400px;
  }

  /* ----- Activity Cards ----- */
  .activity-card {
    min-height: 96px;
    align-items: center;
  }

  .activity-card__thumb {
    width: 90px;
    height: 90px;
    align-self: center;
  }

  .activity-card__title {
    font-size: 16px;
    line-height: 22px;
  }

  .activity-card__subtitle,
  .activity-card__location {
    font-size: 13px;
  }

  .activity-card__body {
    justify-content: center;
    padding: 8px 12px 8px 0;
  }

  .activity-card__location,
  .activity-card__date {
    align-items: center;
  }

  /* ----- Policy & FAQ ----- */
  .policy-faq-section {
    padding: 28px 0;
  }

  .policy-faq-section__grid {
    flex-direction: column;
    gap: 32px;
  }

  .policy-faq-section__col {
    display: flex;
    flex-direction: column;
    min-height: 480px;
    box-sizing: border-box;
  }

  .policy-faq-section__col .section-header {
    flex-shrink: 0;
  }

  .policy-list,
  .faq-list {
    flex: 1;
    min-height: 360px;
  }

  .policy-list__item {
    flex-wrap: nowrap;
    padding: 12px 4px;
    gap: 8px;
    align-items: center;
  }

  .policy-list__title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
  }

  .policy-list__type {
    flex-shrink: 0;
    font-size: 14px;
  }

  .policy-list__date {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
  }

  .faq-item {
    padding: 14px 0px;
  }

  .faq-item__q {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 8px;
  }

  .faq-item__a {
    display: flex;
    font-size: 13px;
    line-height: 22px;
    padding-left: 28px;
    margin: 0;
  }

  .faq-item__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin: 1px 0 0;
  }

  .faq-item__text {
    flex: 1;
    min-width: 0;
  }

  /* ----- Service Strip & Partners ----- */
  .service-strip {
    padding: 28px 0;
    padding-top: 0;
  }

  .service-strip__logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .service-strip__logos img,
  .partner-section__banners img {
    width: calc(50% - 6px);
    height: 64px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .partner-section {
    padding: 24px 0;
  }

  .partner-section__banners {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  /* ----- Footer ----- */
  .site-footer {
    padding-top: 32px;
    text-align: center;
  }

  .site-footer__main {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-bottom: 24px;
  }

  .site-footer__contact,
  .site-footer__qrcode {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .site-footer__contact h3,
  .site-footer__qrcode h3 {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 12px;
  }

  .site-footer__info {
    align-items: center;
    width: 100%;
  }

  .site-footer__info-item {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
  }

  .site-footer__qrcode img {
    width: 96px;
    height: 96px;
    margin: 0 auto;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 12px;
    text-align: center;
  }

  .site-footer__support {
    justify-content: center;
    font-size: 13px;
  }

  .site-footer__copyright {
    font-size: 12px;
  }

  /* ----- Animation: reduce motion on small screens ----- */
  .viewport-animate {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media screen and (max-width: 480px) {
  .main-header__brand {
    gap: 16px;
  }

  .main-header__logo img {
    width: 120px;
  }

  .main-header__title {
    gap: 10px;
    font-size: 15px;
  }

  .main-header__title::before {
    height: 18px;
  }

  .search-box__filter {
    font-size: 10px;
    padding: 3px 6px;
    gap: 3px;
  }

  .search-box__filter img {
    width: 10px;
    height: 10px;
  }

  .search-box__btn {
    min-width: 60px;
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 4px;
  }

  .search-box__input {
    min-height: 58px;
    height: 58px;
  }

  .service-strip__logos img,
  .partner-section__banners img {
    height: 56px;
  }
}
