/* ==========================================================================
   Hotan City Microsite - Common Stylesheet (2026 Silk Road & Jade Edition)
   Defensive Display Architecture & White Jade Nephrite & Taklamakan Theme
   Color Palette:
     - Hetian Nephrite Jade Green (和田羊脂青玉碧): #0d9488 / #0f766e / #ccfbf1
     - Taklamakan Dune Gold (鸣沙金驼黄): #d97706 / #b45309 / #fef3c7
     - Atlas Silk Magenta (艾德莱斯绯红/玫瑰绛): #be185d / #9d174d / #fce7f3
     - Hotan Night Slate (于阗夜色玄青): #0f172a
     - Desert White / Oasis Ivory (羊脂白玉暖白): #fdfbf7
   ========================================================================== */

:root {
    --color-primary: #0d9488;        /* Nephrite Jade Green 羊脂青玉 */
    --color-primary-dark: #0f766e;   /* Deep Jade 碧玉 */
    --color-primary-light: #ccfbf1;  /* Translucent Pale Jade 莹玉淡绿 */
    --color-dune-gold: #d97706;      /* Taklamakan Gold 沙丘金 */
    --color-dune-dark: #b45309;      /* Desert Ochre 焦驼黄 */
    --color-dune-light: #fef3c7;     /* Dune Sun Tint 鸣沙浅黄 */
    --color-rose: #be185d;           /* Hotan Rose / Atlas Magenta 玫瑰茜红 */
    --color-rose-dark: #9d174d;      /* Mulberry Wine 桑葚紫绛 */
    --color-rose-light: #fce7f3;     /* Rose Blossom Petal 蔷薇淡粉 */
    --color-secondary: #0f172a;      /* Oasis Deep Night 幽夜玄青 */
    --color-light: #fdfbf7;          /* Silk Desert White 暖白 */
    --color-dark: #0f172a;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
    --shadow-jade: 0 8px 24px rgba(13, 148, 136, 0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: var(--color-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Defensive Display: Zero Blank Screen Guarantee */
.animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
}

/* Bilingual System (Chinese & English) */
html:not([lang="en"]):not(.lang-en) .en {
    display: none !important;
}
html:not([lang="en"]):not(.lang-en) .cn {
    display: inline;
}
html[lang="en"] .cn, html.lang-en .cn {
    display: none !important;
}
html[lang="en"] .en, html.lang-en .en {
    display: inline;
}

h1.cn, h2.cn, h3.cn, h4.cn, p.cn, div.cn, section.cn, span.block.cn {
    display: block !important;
}
html[lang="en"] h1.en, html[lang="en"] h2.en, html[lang="en"] h3.en, html[lang="en"] h4.en, html[lang="en"] p.en, html[lang="en"] div.en, html[lang="en"] span.block.en,
html.lang-en h1.en, html.lang-en h2.en, html.lang-en h3.en, html.lang-en h4.en, html.lang-en p.en, html.lang-en div.en, html.lang-en span.block.en {
    display: block !important;
}

/* Navbar Component */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.logo a i {
    font-size: 1.35rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: rgba(13, 148, 136, 0.25);
    border: 1px solid rgba(13, 148, 136, 0.4);
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.95rem;
}

.control-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.mobile-only {
    display: none;
}

.mobile-menu {
    display: none;
    background: #0f172a;
    border-bottom: 2px solid var(--color-primary);
    padding: 16px 24px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu a {
    color: #f1f5f9;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
}

.mobile-menu a.active,
.mobile-menu a:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 64px 24px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.65) 0%, rgba(15,23,42,0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    background: rgba(13, 148, 136, 0.92);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #f1f5f9;
    max-width: 820px;
    margin: 0 auto 28px;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.hero-badge-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Page Header (Subpages) */
.page-header {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #701a75 100%);
    color: #fff;
    padding: 50px 24px;
    text-align: center;
    position: relative;
    border-bottom: 4px solid var(--color-primary);
}

.page-header-content {
    max-width: 880px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    margin: 0 0 12px;
}

.page-header p {
    font-size: 1.05rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin: 0;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: #cbd5e1;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #5eead4;
}

.breadcrumb span.divider {
    color: #64748b;
}

/* Layout Containers */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 40px;
}

.section-tag {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
}

.section-desc {
    color: var(--color-text-muted);
    max-width: 720px;
    margin: 0 auto;
    font-size: 1rem;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Alert Boxes (Desert & Sandstorm) */
.heat-alert-box {
    background: linear-gradient(135deg, #f0fdfa 0%, #fffbeb 100%);
    border: 2px solid #99f6e4;
    border-left: 6px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
}

.heat-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.heat-alert-body {
    color: #334155;
    font-size: 0.98rem;
    line-height: 1.7;
}

.heat-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.heat-tip-card {
    background: rgba(255,255,255,0.85);
    border: 1px solid #99f6e4;
    border-radius: var(--radius-md);
    padding: 16px;
}

.heat-tip-card h5 {
    margin: 0 0 6px;
    color: var(--color-primary-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.heat-tip-card p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}

/* Grid & Cards for Routes & Landmarks */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 56px;
}

.city-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.city-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.card-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #1e293b;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.city-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(13, 148, 136, 0.92);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

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

.card-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-desc {
    font-size: 0.93rem;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 16px;
    flex: 1;
}

.card-info-table {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.84rem;
    color: #334155;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 4px;
}

.card-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-top: auto;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-jade);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Timeline Components (for history.html) */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 40px auto 60px;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 28px;
    width: 3px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 68px;
}

.timeline-dot {
    position: absolute;
    left: 18px;
    top: 4px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline-content {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.timeline-era {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.timeline-desc {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.7;
    margin: 0;
}

/* Curated Routes Section (for index.html) */
.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.route-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 26px 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.route-days-badge {
    align-self: flex-start;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.route-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.route-stops {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.88rem;
    color: #475569;
}

.route-stops li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-stops li i {
    color: var(--color-primary);
    font-size: 0.8rem;
}

/* Footer Section & Triple-Domain Network */
footer.main-footer {
    background: #090d16;
    color: #cbd5e1;
    padding: 56px 24px 28px;
    border-top: 4px solid var(--color-primary);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 14px;
}

.footer-domain-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.domain-pill {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.82rem;
    color: #f1f5f9;
    font-family: monospace;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.domain-pill i {
    color: #2dd4bf;
}

.footer-network-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-network-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.86rem;
    transition: var(--transition);
}

.footer-network-item a:hover {
    background: rgba(13, 148, 136, 0.2);
    border-color: rgba(13, 148, 136, 0.4);
    color: #fff;
}

.footer-network-tag {
    font-size: 0.74rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
}

.footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-nav-list a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.86rem;
    color: #64748b;
}

.footer-policy-links {
    display: flex;
    gap: 16px;
}

.footer-policy-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-policy-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Modals (hotanPolicyModal) */
.hotan-policy-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hotan-modal-dialog {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.hotan-modal-header {
    background: #0f172a;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hotan-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.hotan-modal-close {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.hotan-modal-close:hover {
    color: #fff;
}

.hotan-modal-body {
    padding: 24px 20px;
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
}

.hotan-modal-body p {
    margin: 0 0 12px;
}

.hotan-modal-body p:last-child {
    margin-bottom: 0;
}

.hotan-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 14px 20px;
    text-align: right;
}

.hotan-modal-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hotan-modal-btn:hover {
    background: var(--color-primary-dark);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .mobile-only {
        display: flex;
    }
    .navbar {
        padding: 12px 18px;
    }
    .hero-section {
        min-height: 460px;
        padding: 48px 16px;
    }
    .hero-title {
        font-size: 1.85rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .main-container {
        padding: 32px 16px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
}
