/* ============================================
   dxd.lv — Global Stylesheet
   ============================================ */

/* === 变量 === */
:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fef3c7;
    --bg-dark: #1a1a2e;
    --bg-darker: #0f0f23;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --container: 1200px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: #fafafa;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* === 布局 === */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 4rem 0; }
.bg-light { background: #f8f9fa; }

/* === Header === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text);
}

.logo-img img {
    max-width: 40px;
    max-height: 36px;
    width: auto;
    height: auto;
}

.logo-sub {
    font-weight: 400;
    color: var(--primary);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.footer-logo img {
    max-width: 32px;
    max-height: 28px;
    width: auto;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: #f3f4f6;
}

.nav-link.active {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .main-nav.open { display: flex; }
    .mobile-menu-btn { display: flex; }
}

/* === Footer === */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-cta span { font-size: 0.85rem; opacity: 0.7; }

.footer-links h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links a {
    display: block;
    font-size: 0.85rem;
    padding: 0.3rem 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 1; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #1a1a2e;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* === 卡片网格 === */
.dest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.dest-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: block;
}

.dest-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dest-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.dest-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.dest-cn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.dest-info {
    padding: 1.25rem;
}

.dest-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dest-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === 攻略卡片 === */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: block;
    border: 1px solid transparent;
}

.guide-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.15);
}

.guide-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.guide-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.guide-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-read {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* === 分类卡片 === */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: block;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.15);
}

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* === CTA === */
.cta-section { background: var(--bg-dark); }

.cta-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #fff;
}

@media (max-width: 768px) {
    .cta-box { grid-template-columns: 1fr; }
}

.cta-content { padding: 3rem; }

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.cta-image {
    height: 300px;
    overflow: hidden;
}

.cta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === 文章内容 === */
.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem;
    color: var(--text);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
}

.article-content p { margin-bottom: 1.25rem; }

.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    list-style: disc;
}

.article-content ol { list-style: decimal; }

.article-content li { margin-bottom: 0.5rem; }

.article-content strong { font-weight: 700; }

.article-content a {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content a:hover { color: #b45309; }

.article-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* 标题锚点 */
.heading-anchor {
    opacity: 0;
    margin-right: 0.5rem;
    color: var(--primary);
    font-weight: 400;
    transition: opacity 0.2s;
}

.article-content h2:hover .heading-anchor,
.article-content h3:hover .heading-anchor {
    opacity: 1;
}

/* 表格 */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.article-content th {
    background: var(--bg-dark);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.article-content tr:hover td { background: #f9fafb; }

/* === 图片画廊 === */
.photo-gallery { margin-top: 3rem; }

.photo-gallery h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

/* === FAQ === */
.faq-section { margin-top: 3rem; }

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.faq-list { display: flex; flex-direction: column; gap: 1rem; }

.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* === Section Headers === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.section-more {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.section-more:hover { text-decoration: underline; }

/* === Page Header === */
.page-header {
    background: var(--bg-dark);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* === Sidebar Card === */
.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* === 响应式 === */
@media (max-width: 600px) {
    .section { padding: 3rem 0; }
    .hero { min-height: 400px; }
    .hero-stats { gap: 1.5rem; }
    .dest-grid { grid-template-columns: 1fr; }
    .guide-grid { grid-template-columns: 1fr; }
    .cta-box { grid-template-columns: 1fr; }
    .cta-image { display: none; }
    .cta-content { padding: 2rem; }
    .article-content h2 { font-size: 1.4rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* === 工具类 === */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
