/* ========================================
   垂钓指南 - 全局样式
   成都市慧行蓝海科技有限公司
   ======================================== */

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --primary-dark: #0e2f44;
    --accent: #e67e22;
    --accent-light: #f39c12;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --border: #e8ecef;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon { width: 36px; height: 36px; }

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

.main-nav a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.main-nav a:hover { background: var(--bg); color: var(--primary); }
.main-nav a.active { background: var(--primary); color: #fff; }

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

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

/* ====== Hero ====== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.75;
    margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

/* ====== Sections ====== */
.section { padding: 4rem 0; }

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

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.section-title.center { text-align: center; }

.view-all {
    font-weight: 600;
    color: var(--primary-light);
}

/* ====== Featured Cards ====== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.featured-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.featured-thumb {
    display: block;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-thumb-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}

.featured-info { padding: 1.25rem; }

.featured-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.featured-info h3 a { color: var(--text); }
.featured-info h3 a:hover { color: var(--primary-light); }

.featured-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== Two Column Layout ====== */
.two-col-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.latest-list { list-style: none; }

.latest-item {
    border-bottom: 1px solid var(--border);
}

.latest-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    color: var(--text);
}

.latest-item a:hover { color: var(--primary-light); }

.latest-date {
    font-size: 0.85rem;
    color: var(--text-light);
    flex-shrink: 0;
    margin-left: 1rem;
}

/* ====== Home Tags ====== */
.home-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.home-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
    transition: var(--transition);
}

.home-tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ====== Features ====== */
.features-section { background: var(--bg-card); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    background: var(--bg);
    transition: var(--transition);
}

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

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

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

/* ====== Content Layout (Guide + Article) ====== */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 1.5rem;
}

.main-content { min-width: 0; }

/* ====== Breadcrumb ====== */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary-light); }

/* ====== Page Title Bar ====== */
.page-title-bar {
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 1.5rem;
}

.page-title-bar h1 { font-size: 1.75rem; color: var(--primary); }
.page-title-bar p { color: var(--text-light); margin-top: 0.25rem; }

/* ====== Guide List Items ====== */
.guide-list-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.guide-list-item:hover { background: var(--bg); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: var(--radius-sm); }

.list-thumb {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.list-thumb img { width: 100%; height: 100%; object-fit: cover; }

.list-info { flex: 1; min-width: 0; }

.list-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.list-info h3 a { color: var(--text); }
.list-info h3 a:hover { color: var(--primary-light); }

.list-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.list-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.list-tags { display: flex; gap: 0.5rem; }

.list-tag {
    padding: 0.15rem 0.5rem;
    background: var(--bg);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.list-tag:hover { background: var(--primary); color: #fff; }

/* ====== Sidebar ====== */
.sidebar { position: sticky; top: 80px; align-self: start; }

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}

.widget-hot ul { list-style: none; }

.widget-hot li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}

.widget-hot li:last-child { border-bottom: none; }

.widget-hot li a { color: var(--text); line-height: 1.5; }
.widget-hot li a:hover { color: var(--primary-light); }

/* ====== Search ====== */
.search-form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.search-form:focus-within { border-color: var(--primary-light); }

.search-form input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-family: var(--font);
}

.search-form button {
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover { background: var(--primary-light); }

.search-form button svg { width: 18px; height: 18px; }

/* ====== Tag Cloud ====== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.7rem;
    background: var(--bg);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text);
    transition: var(--transition);
}

.tag-item span {
    background: var(--primary);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.tag-item:hover { background: var(--primary); color: #fff; }

/* ====== Article Page ====== */
.article-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.article-header { margin-bottom: 2rem; }

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.meta-author, .meta-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-author svg, .meta-date svg { width: 16px; height: 16px; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.article-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
    transition: var(--transition);
}

.article-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-image {
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.article-image img { width: 100%; border-radius: var(--radius-sm); }

.article-image figcaption {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--bg);
}

.article-body { line-height: 1.9; }
.article-body h2 { font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--primary); }
.article-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; color: var(--text); padding-left: 0.75rem; border-left: 3px solid var(--primary); }
.article-body p { margin-bottom: 1rem; text-align: justify; }
.article-body ul { margin: 1rem 0; padding-left: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { color: var(--primary); }
.article-body blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--bg); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ====== Related Articles ====== */
.related-articles {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.related-articles h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary); }

.related-articles ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.related-articles li a {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    transition: var(--transition);
}

.related-articles li a:hover { background: var(--primary); color: #fff; }

.back-link { margin-top: 2rem; }

/* ====== Pagination ====== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
}

.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.page-current {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.page-dots { color: var(--text-light); }

/* ====== Tools Page ====== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.tool-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.tool-icon { font-size: 1.75rem; }
.tool-header h3 { font-size: 1.1rem; }
.tool-desc { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }

.tool-body { margin-top: 1rem; }
.tool-body label { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; font-weight: 500; }
.tool-body select, .tool-body input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    margin-bottom: 0.75rem;
}

.tool-body button {
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.tool-body button:hover { background: var(--primary-light); }

.tool-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.7;
}

.tools-hero-img, .about-hero-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

/* ====== About Page ====== */
.about-content { max-width: 800px; }

.about-section { margin-bottom: 2.5rem; }
.about-section h2 { font-size: 1.4rem; color: var(--primary); margin-bottom: 1rem; }
.about-section p { margin-bottom: 1rem; line-height: 1.8; }
.about-section ul { padding-left: 1.5rem; }
.about-section li { margin-bottom: 0.5rem; line-height: 1.7; }

.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.info-table tr td:first-child { font-weight: 600; width: 120px; color: var(--text-light); }

/* ====== Footer ====== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.footer-col p { font-size: 0.9rem; line-height: 1.7; opacity: 0.8; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 0.3rem 0; font-size: 0.9rem; }
.footer-col a { color: rgba(255,255,255,0.8); }
.footer-col a:hover { color: var(--accent-light); }

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

.footer-bottom a { color: rgba(255,255,255,0.8); }
.footer-bottom a:hover { color: var(--accent-light); }

/* ====== Responsive ====== */
@media (max-width: 1024px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .two-col-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 1.75rem; }
    .hero-section { padding: 3rem 0; }
    .featured-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .guide-list-item { flex-direction: column; }
    .list-thumb { width: 100%; height: 200px; }
    .article-content { padding: 1.5rem; }
    .article-title { font-size: 1.4rem; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .main-nav.open { display: flex; }
    .mobile-menu-btn { display: flex; }
}
