/* QWOS-style homepage — layout & theme */
:root {
  --red: #c41230;
  --red-dark: #9e0e26;
  --blue-deep: #0f2a52;
  --blue-cta: #1e5aa8;
  --blue-cta-hover: #164a8c;
  --yellow: #f5c400;
  --text: #1a1a1a;
  --muted: #666;
  --card-bg: #fff;
  --page-bg: #f3f4f6;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

/* ----- Header ----- */
.site-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 20;
}

.header-top {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 0 12px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand__name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.02em;
}

.brand__cn {
  color: #111;
  font-weight: 700;
}

.brand__years {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: var(--red);
  letter-spacing: -0.04em;
}

.header-search {
  max-width: 520px;
  width: 100%;
  margin-inline: auto;
}

.search-form {
  display: flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.search-form__scope {
  border: 0;
  border-right: 1px solid #eee;
  padding: 0 10px;
  font-size: 0.9rem;
  color: #333;
  background: #fafafa;
  min-width: 72px;
}

.search-form__input {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}

.search-form__submit {
  border: 0;
  background: #f5f5f5;
  padding: 0 14px;
  color: #555;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}

.search-form__submit:hover {
  background: #eee;
  color: var(--red);
}

.hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.hot-keywords a {
  color: var(--red);
}

.hot-keywords a:hover {
  text-decoration: underline;
}

.header-contact {
  text-align: right;
  font-size: 0.9rem;
  color: var(--muted);
}

.header-contact__group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 4px;
}

.header-contact__group--wechat {
  margin-bottom: 6px;
  position: relative;
  cursor: pointer;
}

.header-contact__wechat-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

.wechat-qrcode {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 156px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 40;
}

.wechat-qrcode img {
  width: 100%;
  height: auto;
  display: block;
}

.wechat-qrcode p {
  margin: 6px 0 0;
  font-size: 0.76rem;
  color: #4d4d4d;
  line-height: 1.4;
}

.header-contact__group--wechat:hover .wechat-qrcode {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-contact__phone {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.02em;
}

.header-contact__phone:hover {
  color: var(--red-dark);
}

.main-nav {
  background: var(--blue-cta);
}

.main-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(20px, 2.8vw, 32px);
  padding: 0;
}

.main-nav a {
  color: #fff;
  padding: 16px clamp(18px, 2.2vw, 26px);
  font-size: clamp(1.05rem, 1.15vw, 1.15rem);
  white-space: nowrap;
  transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(0, 0, 0, 0.12);
  outline: none;
}

.main-nav a.is-active {
  background: rgba(0, 0, 0, 0.18);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: min(38vh, 320px);
  display: flex;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(15, 42, 82, 0.35), transparent 45%),
    url("../assets/images/hero-portugal.jpg") center / cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero-card {
  max-width: 640px;
  padding: 28px 32px 24px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.hero-card__tag {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--yellow);
}

.hero-card__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
}

.hero-card__desc {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-card__features {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--yellow);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 2px;
}

.hero-card__features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-card__features .check {
  color: var(--red);
  font-weight: 900;
}

@media (max-width: 640px) {
  .hero-card__features {
    grid-template-columns: 1fr;
  }
}

/* ----- Feature cards ----- */
.feature-strip {
  padding: clamp(48px, 6vw, 72px) 0 clamp(44px, 5.2vw, 64px);
  margin-top: clamp(-40px, -4vw, -28px);
  position: relative;
  z-index: 2;
}

.feature-strip__title {
  margin: 0 0 clamp(24px, 3vw, 36px);
  text-align: center;
  color: #161f2d;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}

.feature-card {
  background: var(--card-bg);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.feature-card__art {
  height: clamp(168px, 22vw, 220px);
  min-height: 168px;
  background:
    linear-gradient(135deg, rgba(15, 42, 82, 0.52), rgba(30, 90, 168, 0.35)),
    url("../assets/images/feature-tech.jpg")
      center / cover no-repeat;
  position: relative;
}

.feature-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.22), transparent 55%);
}

.feature-card__art--edu {
  background:
    linear-gradient(135deg, rgba(15, 42, 82, 0.45), rgba(30, 90, 168, 0.3)),
    url("../assets/images/feature-edu.jpg")
      center / cover no-repeat;
}

.feature-card__art--home::after {
  border-radius: 0;
}

.feature-card__art--home {
  background:
    linear-gradient(135deg, rgba(15, 42, 82, 0.45), rgba(30, 90, 168, 0.3)),
    url("../assets/images/feature-home.jpg")
      center / cover no-repeat;
}

.feature-card__art--wealth {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 42, 82, 0.45), rgba(30, 90, 168, 0.3)),
    url("../assets/images/feature-wealth.jpg")
      center / cover no-repeat;
}

.feature-card__art--wealth::before,
.feature-card__art--wealth::after {
  content: none;
}

.feature-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(18px, 2.2vw, 24px) clamp(20px, 2.5vw, 28px);
}

.feature-card__title {
  margin: 0;
  font-size: clamp(1.15rem, 1.35vw, 1.35rem);
  font-weight: 800;
  line-height: 1.3;
}

.feature-card__link {
  width: clamp(40px, 4.5vw, 44px);
  height: clamp(40px, 4.5vw, 44px);
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.feature-card__link:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ----- Core Advantages ----- */
.core-advantages {
  margin-top: clamp(-58px, -6vw, -40px);
  padding: clamp(26px, 3.6vw, 40px) 0 clamp(36px, 4.5vw, 52px);
  background: #f1f2f5;
}

.core-advantages__title {
  margin: 0 0 clamp(30px, 4vw, 44px);
  text-align: center;
  color: #1a2c4a;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.03em;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 30px);
}

.advantage-item {
  text-align: center;
  padding: 8px 12px 0;
}

.advantage-item__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  color: #214f93;
  background: radial-gradient(circle at 30% 30%, #fff, #e4ecf7 70%);
  box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(33, 79, 147, 0.15);
}

.advantage-item__title {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #101828;
  letter-spacing: 0.02em;
}

.advantage-item__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #4b5563;
}

@media (max-width: 960px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .advantages-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Case Showcase ----- */
.case-showcase {
  padding: 0 0 clamp(52px, 7vw, 82px);
  background: #f1f2f5;
}

.core-advantages + .case-showcase {
  margin-top: clamp(-8px, -0.8vw, 8px);
}

.case-showcase__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 22px);
  margin: 0 0 clamp(30px, 4vw, 44px);
  color: #1a2c4a;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.case-showcase__title-deco {
  flex: 1;
  max-width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8fa3bf 35%, #8fa3bf 65%, transparent);
  position: relative;
}

.case-showcase__title-deco::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4a35a;
  transform: translateY(-50%);
}

.case-showcase__title-deco:first-child::after {
  right: 0;
}

.case-showcase__title-deco:last-child::after {
  left: 0;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}

.case-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 44, 74, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 44, 74, 0.12);
}

.case-card__art {
  height: 168px;
  background:
    linear-gradient(135deg, rgba(20, 59, 120, 0.42), rgba(41, 111, 201, 0.25)),
    url("../assets/images/news-main.jpg")
      center / cover no-repeat;
}

.case-card__art--eu {
  background:
    linear-gradient(135deg, rgba(20, 59, 120, 0.42), rgba(41, 111, 201, 0.25)),
    url("../assets/images/news-eu.jpg")
      center / cover no-repeat;
}

.case-card__art--talent {
  background:
    linear-gradient(135deg, rgba(20, 59, 120, 0.42), rgba(41, 111, 201, 0.25)),
    url("../assets/images/news-talent.jpg")
      center / cover no-repeat;
}

.case-card__art--study {
  background:
    linear-gradient(135deg, rgba(20, 59, 120, 0.42), rgba(41, 111, 201, 0.25)),
    url("../assets/images/news-study.jpg")
      center / cover no-repeat;
}

.case-card__body {
  padding: clamp(16px, 2vw, 22px) clamp(18px, 2.2vw, 24px) clamp(20px, 2.5vw, 26px);
}

.case-card__tag {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #214f93;
  text-transform: uppercase;
}

.case-card__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #101828;
}

.case-card__desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #4b5563;
}

/* ----- Footer Panel ----- */
.site-footer-panel {
  background: #14171f;
  color: #d4d9e4;
  padding: clamp(48px, 7vw, 72px) 0 22px;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  justify-items: center;
}

.footer-col__title {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #b7c0d0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-subscribe__hint {
  margin: 0 0 14px;
  color: #b7c0d0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-subscribe {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
}

.footer-subscribe input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #f2f5fb;
  font-size: 0.95rem;
  padding: 10px 0;
  outline: none;
}

.footer-subscribe input::placeholder {
  color: #8f9bb0;
}

.footer-subscribe button {
  border: 0;
  background: transparent;
  color: #d6deed;
  font-size: 1.45rem;
  line-height: 1;
  padding: 0 0 2px 8px;
}

.footer-subscribe button:hover {
  color: #fff;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.footer-socials a {
  color: #c9d2e3;
  font-size: 1.05rem;
}

.footer-socials a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: clamp(28px, 4vw, 38px);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.footer-copy {
  margin: 0;
  color: #9ea9bd;
  font-size: 0.84rem;
}

.footer-bottom__links {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-end;
  margin-left: auto;
}

.footer-bottom__links a {
  color: #aeb8ca;
  font-size: 0.84rem;
}

.footer-bottom__links a:hover {
  color: #fff;
}

/* ----- Docks ----- */
.dock {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
}

.dock--left {
  left: auto;
  right: 0;
  top: clamp(148px, 20vh, 190px);
  bottom: auto;
  transform: none;
}

.dock--left .dock-tab {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  flex-direction: row;
  letter-spacing: 0.08em;
  padding: 12px 18px;
  border-radius: 0 0 0 12px;
  box-shadow: -4px 4px 16px rgba(196, 18, 48, 0.28);
}

.dock--left .dock-tab:hover {
  transform: translateY(2px);
}

.dock--left .dock-tab__icon {
  font-size: 1.05rem;
}

.dock--right {
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(40, 40, 40, 0.92);
  border-radius: 8px 0 0 8px;
  padding: 0 6px 8px;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
}

.dock--right .dock-tab {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  flex-direction: row;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  border-radius: 8px 0 0 0;
  box-shadow: none;
  width: 100%;
  justify-content: center;
  margin-bottom: 6px;
}

.dock--right .dock-tab:hover {
  transform: none;
}

.dock-tab {
  border: 0;
  background: var(--red);
  color: #fff;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.2em;
  padding: 18px 8px;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 4px 0 12px rgba(196, 18, 48, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.dock-tab:hover {
  background: var(--red-dark);
  transform: translateX(2px);
}

.dock-tab__icon {
  writing-mode: horizontal-tb;
  font-size: 1.1rem;
}

.dock-item {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #eee;
  font-size: 1.15rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.dock-item:hover {
  background: rgba(196, 18, 48, 0.85);
  color: #fff;
}

/* ----- Modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: modal-in 0.35s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #eee;
}

.modal__logo {
  font-weight: 900;
  color: var(--red);
  font-size: 1.15rem;
}

.modal__logo small {
  color: #111;
  font-weight: 700;
  margin-left: 4px;
}

.modal__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #888;
  padding: 4px 8px;
  border-radius: 4px;
}

.modal__close:hover {
  background: #f0f0f0;
  color: #111;
}

.modal__body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 180px;
}

@media (max-width: 480px) {
  .modal__body {
    grid-template-columns: 1fr;
  }
}

.modal__copy {
  background: var(--blue-deep);
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.modal__sub {
  margin: 0;
  font-size: 1rem;
  opacity: 0.95;
}

.modal__note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  opacity: 0.7;
}

.modal__visual {
  background:
    linear-gradient(to left, rgba(15, 42, 82, 0.1), transparent),
    url("../assets/images/modal-ny.jpg") center / cover no-repeat;
  min-height: 160px;
}

.modal__actions {
  display: flex;
  gap: 12px;
  padding: 14px 16px 16px;
  background: #f7f7f7;
  justify-content: stretch;
}

.modal__actions .btn {
  flex: 1;
}

.btn {
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--blue-cta);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-cta-hover);
}

.btn--secondary {
  background: #2a6fbd;
  color: #fff;
}

.btn--secondary:hover {
  background: #245fa0;
}

/* ----- Responsive header (tablet) ----- */
@media (min-width: 769px) and (max-width: 900px) {
  .header-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand {
    justify-content: center;
  }

  .header-search {
    max-width: 100%;
  }

  .hot-keywords {
    justify-content: center;
  }

  .header-contact {
    text-align: center;
  }

  .header-contact__group {
    justify-content: center;
  }

  .main-nav__inner {
    justify-content: center;
    flex-wrap: wrap;
  }
}

body.modal-open {
  overflow: hidden;
}
