/* North American Chinese Calligraphers Association */

:root {
    --paper: #fffdf8;
    --ivory: #f8f3ea;
    --warm: #efe5d5;
    --ink: #221f1b;
    --text: #534b43;
    --muted: #806f5e;
    --red: #9b3528;
    --red-dark: #76261e;
    --green: #1f6f43;
    --green-dark: #15502f;
    --green-soft: #edf8f0;
    --green-line: #8bc39d;
    --blue: #245f9f;
    --blue-soft: #edf4fb;
    --orange: #a1491d;
    --orange-soft: #fff4e8;
    --line: #ded2c1;
}

html {
    font-size: 14px;
    min-height: 100%;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

main {
    width: 100%;
}

.navbar {
    background: rgba(255, 253, 248, 0.98) !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 14px 0;
}

.navbar .container-fluid {
    padding-left: 28px;
    padding-right: 28px;
}

.navbar-brand,
.content-header h1,
.section-heading h2,
.home-intro h2,
.event-card h3,
.content-body h2,
.content-body h3,
.article-card h3,
.contact-card h3,
.culture-grid h3,
.about-hero h1,
.section-title-block h2,
.principle-item h3,
.principle-item h4,
.program-list li {
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

.navbar-brand {
    color: var(--ink) !important;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.nav-link {
    color: #2c2824 !important;
    font-size: 15px;
    margin: 0 3px;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--red) !important;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 13px;
    margin-left: 8px;
    border: 1px solid rgba(155, 53, 40, 0.55);
    background: #fffaf1;
    color: var(--red) !important;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.language-switch:hover,
.language-switch:focus {
    background: var(--red);
    border-color: var(--red);
    color: #fff !important;
    text-decoration: none;
}

.hero-section {
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(rgba(31, 24, 18, 0.68), rgba(31, 24, 18, 0.76)),
        url("/images/home/hero-calligraphy.jpg") center center / cover no-repeat,
        #2d2721;
}

.hero-overlay {
    width: 100%;
    padding: 92px 20px;
}

.hero-content {
    max-width: 1020px;
    margin: 0 auto;
}

.hero-kicker {
    margin-bottom: 22px;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.92;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: 58px;
    line-height: 1.16;
    font-weight: 500;
}

.hero-content h2 {
    max-width: 820px;
    margin: 0 auto 22px;
    font-size: 22px;
    line-height: 1.55;
    font-weight: 300;
}

.hero-theme {
    margin-bottom: 28px;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: 25px;
    line-height: 1.45;
}

.hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-bottom: 32px;
    font-size: 17px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 35px;
}

.countdown > div {
    width: 95px;
    padding: 16px 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
}

.countdown strong {
    display: block;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 500;
}

.countdown span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-button {
    display: inline-block;
    padding: 13px 28px;
    border: 1px solid currentColor;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-button:hover {
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.home-learn-more {
    color: var(--red);
}

.home-learn-more:hover {
    background: var(--red);
    color: #fff;
}

.home-intro,
.event-highlights {
    padding: 84px 20px;
}

.home-intro {
    background: var(--ivory);
    text-align: center;
}

.home-intro .container {
    max-width: 880px;
}

.home-intro h2,
.section-heading h2 {
    margin-bottom: 24px;
    color: var(--ink);
    font-size: 38px;
    font-weight: 500;
}

.home-intro p,
.event-card p,
.content-body p,
.article-card p,
.contact-card p,
.culture-grid p {
    color: var(--text);
    font-size: 17px;
    line-height: 1.85;
}

.event-highlights {
    background: var(--paper);
}

.section-heading {
    margin-bottom: 44px;
    text-align: center;
}

.section-heading span,
.content-header p,
.section-title-block span {
    color: var(--red);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.event-grid,
.article-grid,
.culture-grid,
.contact-grid {
    display: grid;
    gap: 26px;
}

.event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1120px;
    margin: 0 auto;
}

.event-card,
.article-card,
.contact-card,
.culture-grid article,
.feature-strip > div {
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.82);
}

.event-card,
.article-card,
.culture-grid article {
    padding: 32px 28px;
}

.event-card h3,
.article-card h3,
.culture-grid h3,
.contact-card h3 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 24px;
    font-weight: 500;
}

.event-card a {
    color: var(--red);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(155, 53, 40, 0.35);
}

.event-card a:hover {
    color: var(--red-dark);
}

.content-page,
.about-page {
    background: linear-gradient(180deg, var(--paper) 0%, var(--ivory) 48%, var(--paper) 100%);
    color: var(--ink);
}

.content-page {
    min-height: 620px;
    padding: 92px 0 110px;
}

.content-container,
.about-container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.content-header {
    max-width: 900px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.content-header h1 {
    margin: 0;
    color: var(--ink);
    font-size: 48px;
    line-height: 1.2;
    font-weight: 500;
}

.content-header span {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.65;
}

.content-body {
    display: grid;
    gap: 38px;
    max-width: 880px;
    margin-top: 48px;
}

.wide-content {
    max-width: 100%;
}

.content-body section {
    padding-left: 24px;
    border-left: 3px solid rgba(155, 53, 40, 0.32);
}

.content-body h2 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 500;
}

.content-body h3 {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 500;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 36px;
    border: 1px solid var(--line);
    background: var(--line);
}

.feature-strip > div {
    padding: 24px;
}

.feature-strip strong,
.feature-strip span {
    display: block;
}

.feature-strip strong {
    margin-bottom: 8px;
    color: var(--red);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.feature-strip span {
    color: var(--text);
    line-height: 1.6;
}

.refined-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.refined-list li {
    position: relative;
    padding-left: 22px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}

.refined-list li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 7px;
    height: 7px;
    background: var(--red);
}

.symposium-panel,
.program-feature {
    background: rgba(255, 253, 248, 0.72);
}

.article-grid,
.culture-grid,
.contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
}

.contact-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.contact-title {
    color: var(--red) !important;
}

.contact-card a {
    color: var(--red);
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 34px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.8);
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.submission-section {
    margin-top: 10px;
}

.submission-form {
    margin-top: 28px;
    padding: 30px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.78);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.full-field {
    grid-column: 1 / -1;
}

.form-field label {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: 17px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
    padding: 11px 12px;
}

.form-field textarea {
    resize: vertical;
}

.form-field small,
.form-field span,
.validation-summary {
    color: var(--red);
    font-size: 14px;
}

.admin-warning {
    margin-top: 18px;
    padding: 16px 18px;
    border-left: 3px solid var(--red);
    background: rgba(155, 53, 40, 0.08);
    color: var(--ink);
    line-height: 1.7;
}

.contact-success,
.form-success {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid var(--green-line);
    border-left: 4px solid var(--green);
    background: var(--green-soft);
    color: var(--green-dark);
    line-height: 1.7;
}

.contact-error {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(155, 53, 40, 0.28);
    border-left: 4px solid var(--red);
    background: rgba(155, 53, 40, 0.08);
    color: var(--red-dark);
    line-height: 1.7;
}

.contact-error:empty {
    display: none;
}

.form-submit {
    margin-top: 24px;
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
    padding: 12px 26px;
    font: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.form-submit:hover,
.form-submit:focus {
    background: transparent;
    color: var(--red);
}

.inbox-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 28px;
    border: 1px solid var(--line);
    background: var(--line);
}

.inbox-counts div {
    padding: 24px;
    background: var(--paper);
}

.inbox-counts strong {
    display: block;
    color: var(--red);
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: 34px;
    font-weight: 500;
}

.inbox-counts span {
    color: var(--text);
}

.inbox-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--paper);
}

.inbox-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.inbox-table th,
.inbox-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-align: left;
    vertical-align: top;
}

.inbox-table th {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-weight: 500;
}

.inbox-table tbody tr {
    cursor: pointer;
}

.inbox-table tbody tr:hover {
    background: var(--ivory);
}

.status-pill {
    display: inline-block;
    border: 1px solid rgba(155, 53, 40, 0.36);
    background: var(--orange-soft);
    color: var(--orange);
    padding: 3px 9px;
    white-space: nowrap;
}

.status-new {
    border-color: rgba(161, 73, 29, 0.45);
    background: var(--orange-soft);
    color: var(--orange);
}

.status-review {
    border-color: rgba(36, 95, 159, 0.38);
    background: var(--blue-soft);
    color: var(--blue);
}

.status-completed {
    border-color: var(--green-line);
    background: var(--green-soft);
    color: var(--green-dark);
}

.admin-back-link,
.attachment-list a {
    color: var(--red);
}

.submission-detail {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px 24px;
    margin: 0;
}

.submission-detail dt {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
}

.submission-detail dd {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}

.message-text {
    white-space: pre-wrap;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.media-card {
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 26px;
}

.about-hero {
    padding: 105px 0 90px;
    background: linear-gradient(180deg, var(--paper) 0%, var(--ivory) 100%);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.about-kicker {
    margin: 0 0 18px;
    color: var(--red);
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: 20px;
    letter-spacing: 4px;
}

.about-hero h1 {
    max-width: 920px;
    margin: 0 auto;
    font-size: 52px;
    line-height: 1.18;
    font-weight: 500;
}

.about-acronym,
.about-hero-text {
    color: var(--muted);
}

.about-hero-text {
    max-width: 760px;
    margin: 28px auto 0;
    font-size: 19px;
    line-height: 1.85;
}

.about-section {
    padding: 86px 0;
}

.section-title-block {
    max-width: 820px;
    margin-bottom: 42px;
}

.section-title-block h2 {
    margin: 0;
    font-size: 40px;
    line-height: 1.28;
    font-weight: 500;
}

.intro-text {
    max-width: 860px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
}

.intro-text p,
.principle-item p,
.timeline-item p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.85;
}

.principles-list {
    display: grid;
    gap: 22px;
}

.principle-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 28px;
    padding: 32px 34px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.78);
}

.principle-number,
.timeline-theme {
    color: var(--red) !important;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
}

.timeline-item {
    position: relative;
    padding: 34px 28px 0 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    width: 11px;
    height: 11px;
    background: var(--red);
}

.program-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    list-style: none;
    background: var(--line);
}

.program-list li {
    min-height: 112px;
    padding: 28px 26px;
    background: var(--paper);
    font-size: 20px;
    line-height: 1.45;
}

.footer {
    position: static !important;
    width: 100%;
    padding: 25px 20px;
    border-top: 1px solid var(--line);
    background: var(--ivory);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

body > .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

main.pb-3 {
    padding-bottom: 0 !important;
}

@media (max-width: 1199px) {
    .navbar .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .nav-link {
        margin: 0 2px;
        font-size: 14px;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 46px;
    }

    .event-grid,
    .article-grid,
    .culture-grid,
    .contact-grid,
    .feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-header h1 {
        font-size: 40px;
    }

    .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 42px;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        max-width: calc(100% - 65px);
        white-space: normal;
    }

    .navbar-nav {
        align-items: flex-start;
        padding-top: 12px;
    }

    .nav-link {
        margin: 0;
        padding: 8px 0 !important;
    }

    .language-switch {
        margin: 8px 0 5px;
    }

    .hero-section {
        min-height: 620px;
    }

    .hero-overlay {
        padding: 70px 18px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content h2,
    .hero-theme {
        font-size: 19px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 8px;
    }

    .countdown {
        flex-wrap: wrap;
        gap: 10px;
    }

    .countdown > div {
        width: 82px;
    }

    .home-intro,
    .event-highlights {
        padding: 60px 18px;
    }

    .home-intro h2,
    .section-heading h2 {
        font-size: 32px;
    }

    .event-grid,
    .article-grid,
    .culture-grid,
    .contact-grid,
    .feature-strip,
    .refined-list,
    .program-list,
    .form-grid,
    .inbox-counts,
    .submission-detail {
        grid-template-columns: 1fr;
    }

    .content-page {
        padding: 68px 0 78px;
    }

    .content-container,
    .about-container {
        width: min(100% - 32px, 1120px);
    }

    .content-header h1 {
        font-size: 33px;
    }

    .content-body section {
        padding-left: 18px;
    }

    .contact-card {
        grid-template-columns: 1fr;
    }

    .about-hero h1 {
        font-size: 34px;
    }

    .principle-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 28px 24px;
    }

    .timeline {
        grid-template-columns: 1fr;
        border-top: 0;
        border-left: 1px solid var(--line);
    }

    .timeline-item {
        padding: 0 0 34px 28px;
    }

    .timeline-item::before {
        top: 6px;
        left: -6px;
    }
}

@media (max-width: 480px) {
    .hero-content h1,
    .content-header h1 {
        font-size: 29px;
    }

    .hero-kicker {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .countdown > div {
        width: 72px;
        padding: 13px 5px;
    }

    .countdown strong {
        font-size: 24px;
    }
}
