/* ========================================
   尧图网站定制 - 全局样式
   民族风：藏红 + 藏蓝 + 明黄
   ======================================== */

:root {
    --tibetan-red: #8B1538;
    --tibetan-blue: #1A3C6E;
    --tibetan-yellow: #F4A460;
    --light-cream: #FFF8F0;
    --dark-brown: #3D2817;
    --gradient-primary: linear-gradient(135deg, var(--tibetan-red) 0%, var(--tibetan-blue) 100%);
    --shadow-soft: 0 8px 32px rgba(139, 21, 56, 0.15);
    --shadow-hover: 0 12px 48px rgba(26, 60, 110, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-cream);
    color: var(--dark-brown);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   导航栏样式 - 优化版
   防止折行，支持横向滚动
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s ease;
    background: transparent;
    min-height: 70px;
}

.navbar.scrolled {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-soft);
    padding: 0.6rem 5%;
    min-height: 60px;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.navbar-brand img {
    height: 45px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 1;
    max-width: calc(100vw - 200px);
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--tibetan-yellow);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link:hover {
    color: var(--tibetan-yellow);
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   页脚样式
   ======================================== */

.footer {
    background: var(--gradient-primary);
    color: #fff;
    padding: 4rem 5% 2rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--tibetan-yellow);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--tibetan-yellow);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    line-height: 2;
    display: block;
}

.footer-section a:hover {
    color: var(--tibetan-yellow);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   通用动画
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 5%;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand img {
        height: 38px;
    }
    
    .nav-menu {
        position: fixed;
        top: 65px;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: calc(100vh - 65px);
        background: var(--gradient-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        transition: right 0.4s ease;
        gap: 1rem;
        max-width: none;
        overflow-x: hidden;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.8rem 1rem;
        border-radius: 10px;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand img {
        height: 32px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* ========================================
   圆形布局模块
   ======================================== */

.circle-module {
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: #fff;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.circle-module::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 164, 96, 0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.circle-module:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.circle-module-content {
    position: relative;
    z-index: 1;
}

.circle-module h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--tibetan-yellow);
}

.circle-module p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.circle-large {
    width: 400px;
    height: 400px;
}

.circle-medium {
    width: 300px;
    height: 300px;
}

.circle-small {
    width: 220px;
    height: 220px;
}

/* ========================================
   按钮样式
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--tibetan-yellow);
    color: var(--dark-brown);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(244, 164, 96, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid var(--tibetan-yellow);
}

.btn-secondary:hover {
    background: var(--tibetan-yellow);
    color: var(--dark-brown);
}

/* ========================================
   卡片样式
   ======================================== */

.card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    color: var(--tibetan-blue);
    margin-bottom: 0.8rem;
}

.card-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.85rem;
}

/* ========================================
   资讯列表样式
   ======================================== */

.news-section {
    padding: 5rem 5%;
    background: linear-gradient(180deg, var(--light-cream) 0%, #fff 100%);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--tibetan-blue);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--tibetan-yellow);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-info {
    padding: 1.5rem;
}

.news-date {
    color: var(--tibetan-red);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-headline {
    font-size: 1.1rem;
    color: var(--tibetan-blue);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-link {
    color: var(--tibetan-red);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.news-link:hover {
    gap: 0.8rem;
}
