:root {
    --sage: #5e6f53;
    --sage-light: #a9b89a;
    --olive: #7d8e6a;
    --cream: #f6f2ea;
    --gold: #d6b573;
    --nav-deep: #2f4a36;
    --nav-accent: #d6b573;
    --ink: #263126;
    --muted: #6b7566;
    --line: #e6dfd2;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(41, 52, 38, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans HK", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.7;
}

.top-contact-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px max(20px, calc((100vw - 1180px) / 2));
    color: rgba(255, 255, 255, 0.9);
    background: var(--sage);
    font-size: 13px;
}

.logo-masthead {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 128px;
    overflow: hidden;
    background:
        linear-gradient(150deg, rgba(94, 111, 83, 0.1) 0 25%, transparent 25% 100%),
        linear-gradient(28deg, transparent 0 54%, rgba(169, 184, 154, 0.2) 54% 72%, transparent 72% 100%),
        repeating-linear-gradient(135deg, transparent 0 9px, rgba(94, 111, 83, 0.08) 9px 11px),
        var(--white);
    border-bottom: 1px solid rgba(94, 111, 83, 0.1);
}

.logo-masthead::before {
    content: "";
    position: absolute;
    left: -4vw;
    bottom: -30px;
    width: 38vw;
    height: 95px;
    background: rgba(169, 184, 154, 0.25);
    clip-path: polygon(0 20%, 100% 0, 78% 100%, 0 100%);
}

.logo-masthead::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 28vw;
    height: 100%;
    background: linear-gradient(120deg, transparent 0 44%, rgba(214, 181, 115, 0.2) 44% 100%);
    opacity: 0.8;
}

.top-contact-bar div {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-contact-bar a:hover {
    color: var(--gold);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 54px;
    padding: 0 max(18px, calc((100vw - 1180px) / 2));
    color: var(--white);
    background: var(--nav-deep);
    border-bottom: 0;
    box-shadow: 0 8px 22px rgba(38, 49, 38, 0.16);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.masthead-brand {
    position: relative;
    z-index: 2;
    justify-content: center;
    min-width: 0;
    padding: 12px 20px;
}

.masthead-brand .brand-mark,
.masthead-brand img {
    width: 72px;
    height: 72px;
}

.masthead-brand .brand-mark {
    font-size: 34px;
}

.masthead-brand strong {
    color: var(--sage);
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: 0.08em;
    line-height: 1.05;
}

.masthead-brand small {
    color: var(--olive);
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.masthead-slogan {
    position: absolute;
    right: max(22px, calc((100vw - 1180px) / 2));
    top: 18px;
    z-index: 3;
    display: grid;
    color: rgba(94, 111, 83, 0.9);
    font-weight: 900;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.08;
    text-align: center;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--white);
    font-family: "Noto Serif TC", serif;
    font-size: 24px;
    background: var(--sage);
}

.brand strong {
    display: block;
    font-weight: 700;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 1 auto;
    min-height: 54px;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--white);
    background: rgba(214, 181, 115, 0.28);
}

.header-cta,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-cta,
.btn.primary {
    color: var(--white);
    background: var(--sage);
    box-shadow: 0 10px 25px rgba(94, 111, 83, 0.25);
}

.header-cta {
    min-height: 54px;
    margin-left: 0;
    padding: 0 24px;
    border-radius: 0;
    color: var(--ink);
    background: var(--nav-accent);
    box-shadow: none;
}

.btn.ghost {
    color: var(--sage);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(94, 111, 83, 0.2);
}

.btn.small {
    min-height: 38px;
    padding: 8px 16px;
    background: var(--gold);
    color: var(--ink);
}

.btn:hover,
.header-cta:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--sage);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    min-height: calc(100vh - 86px);
    padding: clamp(36px, 7vw, 92px) clamp(20px, 5vw, 84px) 42px;
}

.home-hero {
    position: relative;
    width: 100%;
    margin: 0;
    background: #eef3ec;
}

.home-slider {
    min-height: clamp(470px, 49vw, 650px);
}

.home-slider .banner-slide {
    align-items: center;
    padding: clamp(32px, 6vw, 76px) max(28px, calc((100vw - 1180px) / 2));
    background-position: center;
}

.home-slider .banner-slide::before {
    background:
        linear-gradient(90deg, rgba(246, 242, 234, 0.92) 0 34%, rgba(246, 242, 234, 0.58) 34% 56%, rgba(246, 242, 234, 0.08) 56% 100%);
}

.home-slider .banner-slide::after {
    content: "";
    position: absolute;
    left: -4vw;
    right: 0;
    bottom: -1px;
    height: 34%;
    background:
        repeating-linear-gradient(170deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 9px),
        linear-gradient(100deg, var(--sage) 0 34%, var(--sage-light) 34% 100%);
    clip-path: polygon(0 32%, 52% 72%, 100% 22%, 100% 100%, 0 100%);
    opacity: 0.95;
}

.home-slider .slide-copy {
    position: relative;
    z-index: 3;
    max-width: 560px;
    padding: 34px 38px;
    color: var(--sage);
    background: rgba(255, 255, 255, 0.72);
    border-left: 7px solid var(--gold);
    box-shadow: 0 16px 38px rgba(38, 49, 38, 0.12);
}

.home-slider .banner-slide h1 {
    margin: 0 0 12px;
    font-family: "Noto Serif TC", serif;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.12;
    letter-spacing: 0;
}

.home-slider .banner-slide p:not(.eyebrow) {
    color: var(--ink);
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 700;
}

.home-share-strip {
    position: absolute;
    left: 0;
    top: 38%;
    z-index: 10;
    display: grid;
    box-shadow: 0 6px 16px rgba(38, 49, 38, 0.16);
}

.home-share-strip a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    background: var(--sage);
    font-weight: 900;
    text-transform: uppercase;
}

.home-share-strip a:nth-child(2) {
    background: #25d366;
}

.home-share-strip a:nth-child(3) {
    background: var(--olive);
}

.home-share-strip a:nth-child(4) {
    background: var(--gold);
    color: var(--ink);
}

.hero-copy h1,
.page-hero h1,
.section-heading h2,
.cta-band h2,
.article-layout h1 {
    margin: 0;
    font-family: "Noto Serif TC", serif;
    line-height: 1.18;
    letter-spacing: 0;
}

.hero-copy h1 {
    max-width: 720px;
    font-size: clamp(40px, 7vw, 78px);
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted);
    font-size: 19px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--olive);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-media {
    min-width: 0;
}

.banner-slider {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: 0;
    box-shadow: 0 8px 18px rgba(38, 49, 38, 0.16);
    background: var(--sage-light);
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 36px;
    color: var(--white);
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.banner-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(38, 49, 38, 0.05), rgba(38, 49, 38, 0.68));
}

.banner-slide.active {
    opacity: 1;
    transform: scale(1);
}

.banner-slide > div {
    position: relative;
    max-width: 520px;
}

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 6;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.slider-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(94, 111, 83, 0.28);
    cursor: pointer;
}

.slider-dots button.active {
    background: var(--sage);
}

.banner-slide h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
}

.banner-slide p {
    margin: 0 0 18px;
    font-size: 18px;
}

.feature-band,
.cms-content,
.blog-grid,
.contact-layout,
.article-layout,
.cta-band,
.home-course-section,
.home-news-section,
.school-source-section {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.feature-band,
.cms-content,
.blog-grid,
.contact-layout,
.article-layout,
.home-course-section,
.home-news-section,
.school-source-section {
    padding: 72px 0;
}

.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-title-row h2 {
    margin: 0;
    color: var(--sage);
    font-family: "Noto Serif TC", serif;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
}

.course-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.course-card {
    display: flex;
    flex-direction: column;
    min-height: 245px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(41, 52, 38, 0.08);
    overflow: hidden;
}

.course-card-media {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(124, 141, 107, 0.18), rgba(212, 175, 90, 0.18));
}

.course-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.course-card span {
    color: var(--gold);
    font-weight: 800;
}

.course-card h3 {
    margin: 10px 0;
    color: var(--sage);
    font-size: 23px;
    line-height: 1.3;
}

.course-card p {
    color: var(--muted);
}

.course-card a {
    margin-top: auto;
    padding-top: 12px;
    color: var(--sage);
    font-weight: 800;
}

.home-cms {
    padding-top: 24px;
}

.news-list {
    display: grid;
    gap: 10px;
    border-top: 2px solid var(--sage-light);
}

.news-list article {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.news-list time {
    color: var(--olive);
    font-weight: 800;
}

.news-list a {
    color: var(--ink);
    font-weight: 700;
}

.school-source-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 40px;
    border-radius: 8px;
    background: rgba(169, 184, 154, 0.24);
}

.school-source-section h2 {
    margin: 0 0 12px;
    color: var(--sage);
    font-family: "Noto Serif TC", serif;
    font-size: clamp(28px, 4vw, 44px);
}

.school-source-section ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.school-source-section li {
    padding: 14px 16px;
    border: 1px solid rgba(94, 111, 83, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--sage);
    font-weight: 800;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading h2,
.cta-band h2,
.page-hero h1 {
    font-size: clamp(30px, 5vw, 52px);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-grid article,
.blog-card,
.contact-panel,
.contact-form,
.admin-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(41, 52, 38, 0.08);
}

.feature-grid article {
    padding: 26px;
}

.feature-grid span {
    color: var(--gold);
    font-weight: 700;
}

.feature-grid h3,
.blog-card h2,
.contact-panel h2 {
    margin: 8px 0;
    color: var(--sage);
}

.cms-content {
    color: #2f392e;
    font-size: 17px;
}

.cms-content h1,
.cms-content h2,
.cms-content h3 {
    color: var(--sage);
    font-family: "Noto Serif TC", serif;
    letter-spacing: 0;
}

.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    background: var(--white);
}

.cms-content th,
.cms-content td {
    padding: 14px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.page-hero {
    padding: clamp(54px, 8vw, 96px) clamp(20px, 5vw, 84px);
    background: linear-gradient(135deg, rgba(94, 111, 83, 0.14), rgba(214, 181, 115, 0.18));
}

.page-hero.compact {
    min-height: 310px;
    display: grid;
    align-content: center;
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.blog-card {
    overflow: hidden;
}

.blog-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.blog-card div {
    padding: 22px;
}

.blog-card h2 {
    font-size: 22px;
    line-height: 1.35;
}

.text-link {
    color: var(--sage);
    font-weight: 700;
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 22px;
    align-items: start;
}

.contact-panel,
.contact-form {
    padding: 28px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 6px;
    color: var(--sage);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
}

textarea {
    resize: vertical;
}

.notice {
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.notice.success {
    color: #24613f;
    background: #dff4e5;
}

.notice.error {
    color: #893232;
    background: #f7dddd;
}

.article-layout header {
    margin-bottom: 30px;
}

.article-layout header img {
    width: 100%;
    max-height: 520px;
    margin-top: 24px;
    border-radius: 8px;
    object-fit: cover;
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 72px;
    padding: 34px;
    border-radius: 8px;
    color: var(--white);
    background: var(--sage);
}

.cta-band p {
    max-width: 700px;
}

.site-footer {
    padding: 52px clamp(20px, 5vw, 84px) 24px;
    color: rgba(255, 255, 255, 0.82);
    background: #263126;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
    max-width: 1160px;
    margin: 0 auto;
}

.site-footer h2,
.site-footer h3 {
    color: var(--white);
}

.site-footer a {
    color: var(--gold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1160px;
    margin: 36px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    padding: 0;
    border-radius: 50%;
    color: var(--white);
    background: #25d366;
    box-shadow: 0 14px 30px rgba(37, 211, 102, 0.32);
    font-size: 0;
    font-weight: 800;
}

.whatsapp-float::before {
    content: "W";
    font-size: 20px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 26px;
    border: 1px dashed var(--sage-light);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}
