/*
Theme Name: HK College
Author: Local Development Team
Version: 1.0.0
Text Domain: hk-college
*/

:root {
  --ink: #17212b;
  --muted: #65717c;
  --blue: #003865;
  --blue-deep: #002847;
  --red: #a61f2b;
  --gold: #bd913f;
  --line: #dce2e7;
  --paper: #fff;
  --wash: #f3f6f8;
  --width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 16px; line-height: 1.7; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.site-shell { width: min(calc(100% - 40px), var(--width)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; z-index: 1000; padding: 8px 14px; background: #fff; }
.skip-link:focus { top: 8px; left: 8px; }

.utility-bar { min-height: 34px; color: #d7e2eb; background: var(--blue-deep); font-size: 13px; }
.utility-bar .site-shell { display: flex; justify-content: flex-end; align-items: center; min-height: 34px; gap: 22px; }
.utility-bar a { color: #fff; }
.site-header { border-bottom: 4px solid var(--red); background: #fff; }
.brand-row { display: flex; min-height: 108px; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand-logo { width: min(390px, 55vw); max-height: 74px; object-fit: contain; object-position: left center; }
.brand-logo--2 { width: auto; max-width: min(390px, 35vw); }
.brand-logo-text { display: inline-flex; min-height: 74px; align-items: center; color: var(--blue); font-family: var(--hk-header-logo-font-family, inherit); font-size: 20px; font-weight: 600; letter-spacing: var(--hk-header-logo-letter-spacing, 0); line-height: 1.3; white-space: break-spaces; }
.brand-logo-text--1 { font-size: 24px; }
.brand-name { color: var(--blue); font-family: Georgia, "Times New Roman", serif; font-size: 26px; line-height: 1.15; }
.brand-name small { display: block; margin-top: 5px; color: var(--muted); font-family: Arial, sans-serif; font-size: 11px; letter-spacing: 0; }
.header-search { display: flex; width: 270px; border-bottom: 1px solid #8b969f; }
.header-search input { min-width: 0; flex: 1; border: 0; padding: 9px 4px; outline: 0; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
.icon-button svg { width: 21px; height: 21px; }
.nav-band { background: var(--blue); }
.nav-layout { display: flex; min-height: 54px; align-items: stretch; }
.primary-nav { flex: 1; }
.primary-nav ul { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
.primary-nav li { min-width: 126px; }
.primary-nav a { height: 100%; display: grid; place-items: center; padding: 0 24px; color: #fff; font-weight: 600; }
.primary-nav .current-menu-item > a, .primary-nav a:hover { background: var(--red); color: #fff; }
.menu-toggle { display: none; margin-left: auto; color: #fff; }

.hero { position: relative; min-height: clamp(340px, 42vw, 540px); overflow: hidden; background: #d9e0e4; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; display: flex; transform: translateX(-50%); gap: 9px; }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.hero-dot.is-active { background: #fff; }

.section { padding: 64px 0; }
.section--wash { background: var(--wash); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0 0 -1px; padding: 0 0 13px; border-bottom: 3px solid var(--red); color: var(--blue); font-family: Georgia, "Microsoft YaHei", serif; font-size: 30px; font-weight: 600; letter-spacing: 0; }
.section-heading a { margin-bottom: 13px; font-size: 14px; font-weight: 600; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story { min-width: 0; border: 1px solid var(--line); background: #fff; }
.story-media { aspect-ratio: 16 / 9; overflow: hidden; background: #e8ecef; }
.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.story:hover .story-media img { transform: scale(1.025); }
.story-body { padding: 20px; }
.story-meta { color: var(--red); font-size: 13px; font-weight: 600; }
.story h3 { margin: 7px 0 9px; color: var(--ink); font-size: 18px; line-height: 1.45; letter-spacing: 0; }
.story p { margin: 0; color: var(--muted); font-size: 14px; }
.content-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.content-tile { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-deep); }
.content-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .25s, transform .25s; }
.content-tile:hover img { opacity: .62; transform: scale(1.03); }
.content-tile span { position: absolute; inset: auto 0 0; padding: 34px 18px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); font-weight: 600; }
.program-band { color: #fff; background: var(--blue); }
.program-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.program-layout h2 { margin: 0 0 6px; font-size: 29px; letter-spacing: 0; }
.program-layout p { margin: 0; color: #dbe7ef; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 22px; border: 1px solid currentColor; border-radius: 2px; cursor: pointer; font-weight: 600; }
.button--primary { border-color: var(--red); color: #fff; background: var(--red); }
.button--light { border-color: #fff; color: var(--blue); background: #fff; }

.page-banner { padding: 46px 0 42px; color: #fff; background: var(--blue); }
.page-banner h1 { margin: 0; font-family: Georgia, "Microsoft YaHei", serif; font-size: clamp(30px, 4vw, 46px); font-weight: 500; letter-spacing: 0; }
.breadcrumbs { margin-top: 8px; color: #cbd9e3; font-size: 13px; }
.breadcrumbs a { color: #fff; }
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 52px; padding-top: 52px; padding-bottom: 72px; }
.page-layout--single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.entry-content { min-width: 0; }
.entry-content, .entry-content * { overflow-wrap: anywhere; }
.entry-content * { max-width: 100%; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { color: var(--blue); letter-spacing: 0; }
.entry-content h2 { margin-top: 42px; font-size: 27px; }
.entry-content h3 { margin-top: 30px; font-size: 21px; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content img { margin: 22px auto; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--line); }
.entry-content iframe { max-width: 100%; }
.sidebar-panel { align-self: start; border-top: 4px solid var(--red); background: var(--wash); padding: 24px; }
.sidebar-panel h2 { margin: 0 0 16px; color: var(--blue); font-size: 20px; }
.sidebar-panel ul { margin: 0; padding: 0; list-style: none; }
.sidebar-panel li { border-top: 1px solid var(--line); }
.sidebar-panel li:first-child { border-top: 0; }
.sidebar-panel a { display: block; padding: 10px 0; }
.search-results { display: grid; gap: 18px; }
.search-result { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.search-result h2 { margin: 0 0 4px; font-size: 21px; }
.empty-state { padding: 35px; background: var(--wash); }

.inquiry-form { display: grid; gap: 14px; }
.inquiry-form label { display: grid; gap: 5px; color: var(--ink); font-size: 14px; font-weight: 600; }
.inquiry-form input, .inquiry-form textarea, .inquiry-form select { width: 100%; min-height: 43px; border: 1px solid #b7c0c7; border-radius: 2px; padding: 8px 10px; background: #fff; }
.inquiry-form textarea { resize: vertical; }
.inquiry-hp { position: absolute; left: -10000px; }
.form-notice { margin-bottom: 16px; padding: 11px 14px; }
.form-notice--success { border-left: 4px solid #258542; background: #e8f5eb; }

.site-footer { color: #dbe4eb; background: #182a38; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 50px; padding-top: 50px; padding-bottom: 42px; }
.site-footer h2 { margin: 0 0 13px; color: #fff; font-size: 17px; letter-spacing: 0; }
.site-footer p { margin: 0; font-size: 14px; }
.site-footer a { color: #fff; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 6px 0; }
.copyright { padding: 17px 0; border-top: 1px solid #344753; color: #aab9c3; font-size: 12px; }

@media (max-width: 900px) {
  .header-search { display: none; }
  .brand-row { min-height: 84px; }
  .menu-toggle { display: inline-grid; }
  .nav-layout { min-height: 50px; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav li { width: 100%; }
  .primary-nav a { min-height: 48px; justify-content: start; }
  .nav-layout { flex-wrap: wrap; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar-panel { order: -1; }
}

@media (max-width: 600px) {
  .site-shell { width: min(calc(100% - 28px), var(--width)); }
  .utility-bar { display: none; }
  .brand-logo { width: min(310px, 82vw); max-height: 62px; }
  .brand-name { font-size: 20px; }
  .hero { min-height: 245px; }
  .section { padding: 42px 0; }
  .section-heading h2 { font-size: 24px; }
  .news-grid { grid-template-columns: 1fr; }
  .content-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .content-tile span { padding: 25px 11px 10px; font-size: 14px; }
  .program-layout { grid-template-columns: 1fr; gap: 20px; }
  .page-banner { padding: 30px 0; }
  .page-layout { gap: 28px; padding-top: 32px; padding-bottom: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
