:root {
    --deep: #05323a;
    --reef: #069a9f;
    --reef-dark: #067277;
    --sun: #f5b44c;
    --coral: #eb6761;
    --ink: #173036;
    --muted: #61777c;
    --sand: #f7f3ea;
    --foam: #f4fbfb;
    --line: rgba(9, 47, 54, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    color: var(--ink);
    background: #ffffff;
    font-family: "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    min-width: 320px;
}

a {
    color: inherit;
    text-decoration: none;
}

h1:focus,
h2:focus,
h3:focus {
    outline: none;
}

img {
    display: block;
    width: 100%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.contact-strip {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 8px 24px;
    color: #ffffff;
    background: var(--deep);
    font-size: 0.86rem;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1180px;
    min-height: 78px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    margin-right: auto;
}

.brand-logo {
    height: 150px;
    width: auto;
}

/* 顶层导航容器 原有样式完全保留 */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #294a50;
    font-size: 0.94rem;
}

    /* 顶层ul横向排版，清除默认列表样式 */
    .nav-links > ul {
        display: flex;
        align-items: center;
        gap: 22px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        /* 顶层导航链接：flex布局，文字+箭头分流不折叠 */
        .nav-links > ul > li > a {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 0;
            border-bottom: 2px solid transparent;
            color: inherit;
            text-decoration: none;
            white-space: nowrap;
        }

            .nav-links > ul > li > a:hover {
                border-color: var(--sun);
            }

/* 所有包含子菜单的li相对定位 */
.dropdown {
    position: relative;
}

/* 下拉菜单通用样式+淡入动画 */
.dropdown-menu {
    display: none;
    position: absolute;
    margin: 0;
    padding: 12px 0;
    list-style: none;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

/* 二级菜单向下弹出 */
.nav-links > ul > li > .dropdown-menu {
    top: 100%;
    left: 0;
}

/* 三、四级侧边弹出 */
.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
}

/* 下拉子链接左右分布，防止文字挤压箭头 */
.dropdown-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 22px;
    color: #294a50;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    white-space: nowrap;
}

    .dropdown-menu li a:hover,
    .dropdown-menu li a:focus {
        background-color: #d4e8ea;
        color: #1a6b74;
        padding-left: 27px;
    }

/* hover显示子菜单 */
.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* ========== 缩小后的箭头样式 ========== */
/* 顶层向下箭头 */
.nav-links > ul > li.dropdown > a::after {
    content: "▼";
    font-size: 0.8rem; /* 改小字号 */
    font-weight: 600;
    opacity: 0.85;
    flex-shrink: 0; /* 禁止箭头被压缩，解决文字挤压折叠 */
}
/* 侧边向右箭头 */
.dropdown-menu .dropdown > a::after {
    content: "▶";
    font-size: 0.8rem; /* 同步缩小 */
    font-weight: 600;
    opacity: 0.85;
    flex-shrink: 0;
}

.nav-action,
.btn-primary,
.btn-ghost,
.booking-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-action,
.btn-primary,
.booking-form button {
    color: #ffffff;
    background: var(--coral);
    border: 0;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

/* ========== 手机端汉堡按钮（桌面隐藏） ========== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 3px;
        background: var(--deep);
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .main-nav.open .nav-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .main-nav.open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .main-nav.open .nav-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }



.hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: 680px;
    padding: 120px 24px 80px;
    overflow: hidden;
    color: #ffffff;
    background-image: url("kground.jpg");
    background-position: center;
    background-size: cover;
}

.happy-hero {
    background-image: url("kground.jpg");
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 31, 38, 0.85), rgba(3, 31, 38, 0.35) 58%, rgba(3, 31, 38, 0.08));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-width: 1180px;
    margin: 0 auto;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    color: var(--reef);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--sun);
}

.hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 1.02;
    font-weight: 900;
    outline: none;
}

.hero-copy {
    max-width: 680px;
    margin: 24px 0 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-card {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 56px;
    z-index: 1;
    width: min(280px, calc(100% - 48px));
    padding: 22px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

    .hero-card strong {
        display: block;
        color: var(--reef-dark);
        font-size: 3rem;
        line-height: 1;
    }

    .hero-card span {
        display: block;
        margin-top: 8px;
        color: var(--muted);
    }

.section,
.booking-section,
.site-footer {
    padding: 88px 24px;
}

.section-light {
    background: var(--foam);
}

.section-heading,
.news-grid,
.program-grid,
.reviews-panel,
.review-grid,
.booking-section,
.site-footer {
    max-width: 1180px;
    margin: 0 auto;
}

.section-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 34px;
}

    .section-heading h2,
    .split-content h2,
    .reviews-panel h2,
    .booking-section h2 {
        margin: 0;
        font-size: clamp(2rem, 4vw, 3.4rem);
        line-height: 1.12;
    }

    .section-heading p,
    .split-content p,
    .reviews-panel p,
    .booking-section p {
        max-width: 680px;
        margin: 0;
        color: var(--muted);
        font-size: 1.05rem;
        line-height: 1.8;
    }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.news-card,
.program-card,
.review-card,
.booking-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.news-card {
    overflow: hidden;
}

    .news-card img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .news-card div {
        padding: 22px;
    }

    .news-card span {
        color: var(--coral);
        font-size: 0.78rem;
        font-weight: 800;
    }

    .news-card h3,
    .program-card h3 {
        margin: 8px 0 12px;
        font-size: 1.24rem;
    }

    .news-card p,
    .program-card p,
    .review-card blockquote {
        color: var(--muted);
        line-height: 1.75;
    }

    .news-card a,
    .program-card a {
        color: var(--reef-dark);
        font-weight: 800;
    }

.service-grid,
.program-grid {
    display: grid;
    gap: 18px;
}

.service-grid {
    max-width: 1180px;
    margin: 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.program-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.program-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.program-card {
    min-height: 280px;
    padding: 28px;
}

.service-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

    .service-card span {
        display: inline-flex;
        margin-bottom: 18px;
        padding: 7px 10px;
        color: var(--reef-dark);
        background: rgba(6, 154, 159, 0.11);
        border-radius: 999px;
        font-size: 0.76rem;
        font-weight: 900;
    }

    .service-card h3 {
        margin: 0 0 12px;
        font-size: 1.34rem;
    }

    .service-card p {
        margin: 0;
        color: var(--muted);
        line-height: 1.75;
    }

.program-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--deep);
    background: var(--sun);
    border-radius: 50%;
    font-weight: 900;
}

.program-card-detailed {
    min-height: 430px;
}

    .program-card-detailed dl {
        display: grid;
        gap: 12px;
        margin: 22px 0 0;
    }

        .program-card-detailed dl div {
            padding-top: 12px;
            border-top: 1px solid var(--line);
        }

    .program-card-detailed dt {
        margin-bottom: 4px;
        color: var(--reef-dark);
        font-size: 0.78rem;
        font-weight: 900;
    }

    .program-card-detailed dd {
        margin: 0;
        color: #294a50;
        line-height: 1.6;
    }

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 590px);
    min-height: 620px;
    background: var(--sand);
}

.split-image {
    min-height: 420px;
    background-image: url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1400&q=85");
    background-position: center;
    background-size: cover;
}

.bnb-image {
    background-image: url("https://images.unsplash.com/photo-1519046904884-53103b34b206?auto=format&fit=crop&w=1400&q=85");
}

.split-content {
    align-self: center;
    padding: 72px clamp(24px, 6vw, 76px);
}

.check-list {
    display: grid;
    gap: 14px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

    .check-list li {
        position: relative;
        padding-left: 28px;
        color: #294a50;
    }

        .check-list li::before {
            position: absolute;
            left: 0;
            color: var(--coral);
            content: "+";
            font-weight: 900;
        }

.reviews-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.rating-box {
    min-width: 210px;
    padding: 24px;
    color: #ffffff;
    background: var(--deep);
    border-radius: 8px;
}

    .rating-box strong {
        display: block;
        color: var(--sun);
        font-size: 3rem;
        line-height: 1;
    }

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.review-card {
    margin: 0;
    padding: 24px;
}

    .review-card blockquote {
        margin: 0 0 18px;
    }

    .review-card figcaption {
        font-weight: 800;
    }

.booking-section {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
    gap: 42px;
    align-items: start;
}

.booking-form {
    display: grid;
    gap: 16px;
    padding: 26px;
}

    .booking-form label {
        display: grid;
        gap: 8px;
        color: #294a50;
        font-weight: 800;
    }

    .booking-form input,
    .booking-form select {
        width: 100%;
        min-height: 48px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        color: var(--ink);
        background: #ffffff;
    }

    .booking-form button {
        min-height: 52px;
        margin-top: 4px;
        cursor: pointer;
    }

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    color: #d7ecee;
    background: var(--deep);
}

    .site-footer h2 {
        margin: 0 0 12px;
        color: #ffffff;
    }

    .site-footer p {
        margin: 6px 0;
    }

.footer-links {
    display: grid;
    gap: 10px;
    min-width: 180px;
}

    .footer-links a {
        color: #ffffff;
    }

.site-list,
.notice-grid {
    display: grid;
    max-width: 1180px;
    margin: 0 auto;
    gap: 18px;
}

.site-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-card,
.notice-grid article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

    .site-card h3,
    .notice-grid h3 {
        margin: 0 0 12px;
        font-size: 1.3rem;
    }

    .site-card p,
    .notice-grid p {
        margin: 0;
        color: var(--muted);
        line-height: 1.75;
    }

    .site-card div {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
    }

    .site-card span {
        display: inline-flex;
        padding: 8px 11px;
        color: var(--deep);
        background: var(--sand);
        border-radius: 999px;
        font-size: 0.88rem;
        font-weight: 700;
    }

.notice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

@media (max-width: 980px) {
    .contact-strip {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        order: 1;
    }

    .main-nav {
        position: relative;
        flex-wrap: wrap;
        min-height: 64px;
        gap: 12px;
    }

    .nav-action {
        order: 2;
        margin-left: auto;
    }

    /* 展开面板：覆盖在 sticky header 之下，内部可滚动 */
    .nav-links {
        order: 3;
        flex-basis: 100%;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 64px);
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 0 12px;
        background: #ffffff;
        border-top: 1px solid var(--line);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
        z-index: 30;
    }

    .main-nav.open .nav-links {
        display: flex;
    }

    .nav-links > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-links > ul > li {
        border-bottom: 1px solid var(--line);
    }

        .nav-links > ul > li > a {
            padding: 14px 16px;
            white-space: normal;
        }

    /* ===== 宝塔式：下拉改为就地展开的树状层级，逐级缩进 ===== */
    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        box-shadow: none;
        padding: 0 0 0 16px;
        background: #f6fafa;
    }

    .dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 16px;
        white-space: normal;
    }

    /* 顶层箭头展开时翻转，提示已展开 */
    .nav-links > ul > li.dropdown.open > a::after {
        transform: rotate(180deg);
    }


    .news-grid,
    .service-grid,
    .program-grid,
    .site-list,
    .notice-grid,
    .review-grid,
    .booking-section,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 620px;
        padding-top: 96px;
    }

    .hero-card {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 36px auto 0;
    }

    .reviews-panel,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .brand {
        min-width: 0;
    }

    .brand-logo {
        width: 78vw;
        max-width: 320px;
        height: auto;
    }

    .nav-action {
        padding: 0 14px;
        font-size: 0.88rem;
    }

    .section,
    .booking-section,
    .site-footer {
        padding: 64px 18px;
    }

    .hero {
        min-height: 600px;
        padding: 86px 18px 56px;
    }

    .program-card {
        min-height: auto;
    }
}
