/* SaveMyDSE public marketing shell v2 — fixed full-width nav alignment */
* { margin: 0; padding: 0; box-sizing: border-box; }

body.public-site,
body[data-nav-active] {
    background: #E8F0E5;
    font-family: 'Inter', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
    color: #1F4A1F;
    line-height: 1.5;
    min-height: 100vh;
}

/* Page content containers (optional; pages may define their own) */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Nav/footer only — never affected by page .container overrides */
.site-shell-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

#public-nav-root {
    width: 100%;
}

#public-nav-root .site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #dbe7d8;
    position: relative;
    z-index: 200;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

#public-nav-root .site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    flex-wrap: nowrap;
    position: relative;
}

#public-nav-root .site-logo {
    color: #1f4a1f;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
    white-space: nowrap;
}

#public-nav-root .site-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: #f3f4f6;
    border: 1px solid #dbe7d8;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
}

#public-nav-root .site-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1f4a1f;
    transition: transform 0.25s, opacity 0.25s;
}

#public-nav-root .site-nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#public-nav-root .site-nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

#public-nav-root .site-nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#public-nav-root .site-menu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
}

#public-nav-root .site-menu li {
    list-style: none;
    flex-shrink: 0;
}

#public-nav-root .site-menu a {
    text-decoration: none;
    color: #374151;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: block;
    white-space: nowrap;
    font-weight: 500;
}

#public-nav-root .site-menu a:hover,
#public-nav-root .site-menu a.active {
    background: #f3f4f6;
    color: #1f4a1f;
}

#public-nav-root .site-header--slim .site-nav {
    min-height: 56px;
}

#public-nav-root .site-header--slim .site-logo {
    font-size: 1.25rem;
}

/* Shared page chrome */
.hero {
    background: linear-gradient(145deg, #FFFFFFCC 0%, #F9FFF9 100%);
    backdrop-filter: blur(8px);
    border-radius: 0 0 48px 48px;
    padding: 2.5rem 0 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid #C8E0C8;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1F4A1F;
    margin-bottom: 0.5rem;
}

.hero h1 i,
.hero h1 .badge-pill,
.hero h1 small {
    background: #F5A62320;
    padding: 0.2rem 0.8rem;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 8px;
    color: #B45F1B;
    font-style: normal;
}

.hero p {
    font-size: 1.05rem;
    color: #3A6B3A;
    max-width: 720px;
}

.hero.text-center {
    text-align: center;
}

.hero.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: white;
    border-radius: 32px;
    padding: 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #C8E0C8;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    border-left: 5px solid #F5A623;
    padding-left: 1rem;
    color: #1F4A1F;
}

.section-title i {
    margin-right: 8px;
    color: #F5A623;
}

#public-footer-root {
    width: 100%;
}

#public-footer-root .site-footer {
    width: 100%;
    background: #1F4A1F;
    color: #E8F0E5;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    opacity: 1;
}

#public-footer-root .site-footer a {
    color: #E8F0E5;
    text-decoration: none;
}

#public-footer-root .site-footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

#public-footer-root .footer-meta {
    margin-top: 6px;
    font-size: 0.88rem;
}

/* --- Public page typography (aligned with tuition / summer-courses) --- */
.page-main {
    padding: 1.25rem 0 0;
}

.page-card,
.content-section.page-card {
    background: #fff;
    border-radius: 32px;
    padding: 2rem 2.25rem 2.5rem;
    margin: 1.25rem auto 2.5rem;
    max-width: 920px;
    width: calc(100% - 2rem);
    border: 1px solid #C8E0C8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.page-title,
.content-section .page-title,
.content-section > .container > h1:first-child {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    color: #1F4A1F;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #C8E0C8;
}

.page-intro {
    font-size: 1rem;
    color: #4A6A4A;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.public-prose,
.content-body.public-prose {
    font-size: 1rem;
    line-height: 1.75;
    color: #2D2F36;
}

.public-prose h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    color: #1F4A1F;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #C8E0C8;
}

.public-prose h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1F4A1F;
    margin: 1.75rem 0 0.65rem;
    padding-left: 1rem;
    border-left: 5px solid #F5A623;
    line-height: 1.4;
}

.public-prose h2:first-of-type {
    margin-top: 0;
}

.public-prose h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F4A1F;
    margin: 1.25rem 0 0.5rem;
}

.public-prose p {
    margin-bottom: 1em;
    color: #2D2F36;
}

.public-prose .lead {
    font-size: 1.06rem;
    color: #3A6B3A;
    line-height: 1.8;
}

.public-prose strong,
.public-prose b {
    color: #1F4A1F;
    font-weight: 700;
}

.public-prose a {
    color: #1F4A1F;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.public-prose a:hover {
    color: #B45F1B;
}

.public-prose ul,
.public-prose ol {
    margin: 0.75em 0 1em 1.35em;
    color: #2D2F36;
}

.public-prose li {
    margin-bottom: 0.45em;
}

.public-prose .highlight-box {
    background: #FEFAF2;
    border-left: 4px solid #F5A623;
    padding: 1rem 1.25rem;
    margin: 1.35rem 0;
    border-radius: 0 16px 16px 0;
    font-size: 1rem;
    line-height: 1.75;
    color: #2D2F36;
}

.public-prose .tagline {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #B45F1B;
    margin-top: 1.25rem;
    line-height: 1.7;
}

.public-prose .approach-list,
.public-prose .team-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.public-prose .approach-list li,
.public-prose .team-list li {
    margin-bottom: 1.1em;
    padding-bottom: 1.1em;
    border-bottom: 1px solid #E8F0E5;
    font-size: 1rem;
    line-height: 1.75;
}

.public-prose .team-list li:last-child,
.public-prose .approach-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.public-prose .approach-list li strong,
.public-prose .team-list li strong {
    display: block;
    color: #1F4A1F;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 1.02rem;
}

.public-prose .closing-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #C8E0C8;
}

/* CMS / API HTML inside content-body */
.content-body.public-prose h1,
.content-body.public-prose h2,
.content-body.public-prose h3 {
    color: #1F4A1F;
}

.content-body.public-prose h2 {
    border-left: 5px solid #F5A623;
    padding-left: 1rem;
    margin-top: 1.5rem;
}

.content-body.public-prose table th {
    background: #E8F0E5;
    color: #1F4A1F;
}

.content-body.public-prose table th,
.content-body.public-prose table td {
    border-color: #C8E0C8;
}

/* Activities list page */
.page-heading {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #1F4A1F;
    text-align: center;
    margin-bottom: 1.5rem;
}

.activity-card h2 {
    color: #1F4A1F !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
}

.activity-meta {
    color: #4A6A4A !important;
    font-size: 0.92rem !important;
}

.activity-desc {
    color: #2D2F36 !important;
    font-size: 1rem !important;
}

.activity-desc h1,
.activity-desc h2,
.activity-desc h3 {
    color: #1F4A1F !important;
}

.activity-desc th {
    background: #E8F0E5 !important;
    color: #1F4A1F !important;
}

.activity-desc th,
.activity-desc td {
    border-color: #C8E0C8 !important;
}

.btn-enrol-green {
    display: inline-block;
    background: #1F4A1F;
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-enrol-green:hover {
    background: #2C7A2C;
}

@media (max-width: 768px) {
    .page-card,
    .content-section.page-card {
        padding: 1.5rem 1.25rem 1.75rem;
        width: calc(100% - 1rem);
        border-radius: 24px;
    }
}

/* Medium screens: allow horizontal scroll on menu instead of broken wrap */
@media (max-width: 1100px) and (min-width: 901px) {
    #public-nav-root .site-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        justify-content: flex-start;
        padding-bottom: 2px;
    }
}

@media (max-width: 900px) {
    #public-nav-root .site-nav-toggle {
        display: flex;
    }

    #public-nav-root .site-nav {
        flex-wrap: wrap;
    }

    #public-nav-root .site-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        padding: 12px 16px 16px;
        border-bottom: 1px solid #dbe7d8;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        gap: 0;
        overflow-x: visible;
        flex: none;
        width: 100%;
    }

    #public-nav-root .site-menu.is-open {
        display: flex;
    }

    #public-nav-root .site-menu a {
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    #public-nav-root .site-logo {
        font-size: 1.35rem;
    }
}
