/**
 * 黑龙江省无线电运动协会网站样式
 */

/* 基础样式 */
:root {
    --primary-color: #0066CC;
    --primary-dark: #0052A3;
    --secondary-color: #CC0000;
    --light-blue: #E6F2FF;
    --slogan-blue: #4A90E2;
    --slogan-dark: #2E5C8A;
    --white: #FFFFFF;
    --black: #000000;
    --gray: #666666;
    --gray-light: #999999;
    --border-gray: #E0E0E0;
    --bg-gray: #F5F5F5;
    
    --ease-signal: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-wave: cubic-bezier(0.45, 0, 0.55, 1);
    --ease-digital: cubic-bezier(0.87, 0, 0.13, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: "Microsoft YaHei", "SimHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-gray);
}

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

.logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(0, 102, 204, 0.2);
    }
}

.site-title {
    flex: 1;
    text-align: center;
    padding: 0 30px;
}

.title-cn {
    font-size: 36px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 8px;
    letter-spacing: 4px;
    animation: titleSlide 0.8s var(--ease-wave) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes titleSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-en {
    font-size: 20px;
    color: var(--primary-color);
    font-family: Arial, sans-serif;
    animation: titleFade 0.5s var(--ease-smooth) 0.6s forwards;
    opacity: 0;
    transform: translateX(-30px);
}

@keyframes titleFade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.antenna-icon {
    position: relative;
    width: 60px;
    height: 80px;
    animation: antennaBounce 0.4s var(--ease-elastic) 0.8s forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes antennaBounce {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.signal-waves {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.signal-waves span {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: signalWave 2s ease-out infinite;
}

.signal-waves span:nth-child(1) {
    animation-delay: 0s;
}

.signal-waves span:nth-child(2) {
    animation-delay: 0.6s;
}

.signal-waves span:nth-child(3) {
    animation-delay: 1.2s;
}

@keyframes signalWave {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translateX(-50%) scale(4);
        opacity: 0;
    }
}

/* 导航栏 */
.navbar {
    background: var(--primary-color);
    animation: navSlide 0.5s var(--ease-signal) forwards;
}

@keyframes navSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-menu {
    display: flex;
    justify-content: center;
    height: 50px;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 0 30px;
    line-height: 50px;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu li a:hover::before,
.nav-menu li.active a::before {
    width: 80%;
}

.nav-menu li a:hover {
    background: var(--primary-dark);
}

/* 轮播 + 新闻区域 */
.hero-section {
    padding: 30px 0;
    background: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
}

/* 轮播图 */
.carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: carouselIn 0.6s var(--ease-signal) forwards;
    opacity: 0;
    transform: scale(0.95);
}

@keyframes carouselIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.carousel-inner {
    position: relative;
    height: 350px;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s var(--ease-digital), transform 0.8s var(--ease-digital);
    transform: scale(0.95);
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
}

.carousel-caption h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.carousel-caption p {
    font-size: 14px;
    opacity: 0.9;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-indicators span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators span.active {
    width: 24px;
    background: var(--white);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel:hover .carousel-prev,
.carousel:hover .carousel-next {
    opacity: 1;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 新闻侧边栏 */
.news-sidebar {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 20px;
    animation: sidebarIn 0.5s var(--ease-smooth) 0.2s forwards;
    opacity: 0;
    transform: translateX(50px);
}

@keyframes sidebarIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-header {
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--black);
}

.news-list {
    animation: listCascade 0.4s var(--ease-wave) forwards;
}

.news-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-gray);
    opacity: 0;
    transform: translateY(20px);
    animation: listItemIn 0.4s var(--ease-wave) forwards;
}

.news-list li:nth-child(1) { animation-delay: 0.3s; }
.news-list li:nth-child(2) { animation-delay: 0.38s; }
.news-list li:nth-child(3) { animation-delay: 0.46s; }
.news-list li:nth-child(4) { animation-delay: 0.54s; }
.news-list li:nth-child(5) { animation-delay: 0.62s; }
.news-list li:nth-child(6) { animation-delay: 0.7s; }
.news-list li:nth-child(7) { animation-delay: 0.78s; }
.news-list li:nth-child(8) { animation-delay: 0.86s; }

@keyframes listItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list li a {
    display: flex;
    align-items: center;
    color: var(--black);
    transition: all 0.25s ease;
}

.news-list li a::before {
    content: '•';
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 16px;
}

.news-list li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    background: var(--bg-gray);
    margin: -10px -15px;
    padding: 10px 15px;
    border-left: 3px solid var(--primary-color);
}

/* 标语横幅 */
.slogan-banner {
    background: linear-gradient(135deg, var(--slogan-blue) 0%, var(--slogan-dark) 100%);
    background-size: 200% 200%;
    animation: gradientFlow 10s ease infinite;
    padding: 25px 0;
    overflow: hidden;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.slogan-text {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.slogan-text span {
    font-size: 24px;
    font-weight: bold;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: sloganPop 0.4s var(--ease-elastic) forwards;
    opacity: 0;
    transform: scale(0);
}

.slogan-text span:nth-child(1) { animation-delay: 0.1s; }
.slogan-text span:nth-child(2) { animation-delay: 0.15s; }
.slogan-text span:nth-child(3) { animation-delay: 0.2s; }
.slogan-text span:nth-child(4) { animation-delay: 0.25s; }
.slogan-text span:nth-child(5) { animation-delay: 0.3s; }
.slogan-text span:nth-child(6) { animation-delay: 0.35s; }

@keyframes sloganPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 三栏内容 */
.content-section {
    padding: 40px 0;
    background: var(--white);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.content-column {
    animation: columnSlide 0.6s var(--ease-signal) forwards;
    opacity: 0;
    transform: translateY(60px);
}

.content-column:nth-child(1) { animation-delay: 0s; }
.content-column:nth-child(2) { animation-delay: 0.15s; }
.content-column:nth-child(3) { animation-delay: 0.3s; }

@keyframes columnSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.column-header {
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.column-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    animation: borderGrow 0.8s var(--ease-smooth) forwards;
}

@keyframes borderGrow {
    to {
        width: 100%;
    }
}

.column-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--black);
}

.article-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-gray);
    opacity: 0;
    transform: translateX(-20px);
    animation: articleItemIn 0.4s var(--ease-wave) forwards;
}

.content-column:nth-child(1) .article-list li:nth-child(1) { animation-delay: 0.4s; }
.content-column:nth-child(1) .article-list li:nth-child(2) { animation-delay: 0.46s; }
.content-column:nth-child(1) .article-list li:nth-child(3) { animation-delay: 0.52s; }
.content-column:nth-child(1) .article-list li:nth-child(4) { animation-delay: 0.58s; }
.content-column:nth-child(1) .article-list li:nth-child(5) { animation-delay: 0.64s; }
.content-column:nth-child(1) .article-list li:nth-child(6) { animation-delay: 0.7s; }
.content-column:nth-child(1) .article-list li:nth-child(7) { animation-delay: 0.76s; }

.content-column:nth-child(2) .article-list li:nth-child(1) { animation-delay: 0.55s; }
.content-column:nth-child(2) .article-list li:nth-child(2) { animation-delay: 0.61s; }
.content-column:nth-child(2) .article-list li:nth-child(3) { animation-delay: 0.67s; }
.content-column:nth-child(2) .article-list li:nth-child(4) { animation-delay: 0.73s; }
.content-column:nth-child(2) .article-list li:nth-child(5) { animation-delay: 0.79s; }
.content-column:nth-child(2) .article-list li:nth-child(6) { animation-delay: 0.85s; }
.content-column:nth-child(2) .article-list li:nth-child(7) { animation-delay: 0.91s; }

.content-column:nth-child(3) .article-list li:nth-child(1) { animation-delay: 0.7s; }
.content-column:nth-child(3) .article-list li:nth-child(2) { animation-delay: 0.76s; }
.content-column:nth-child(3) .article-list li:nth-child(3) { animation-delay: 0.82s; }
.content-column:nth-child(3) .article-list li:nth-child(4) { animation-delay: 0.88s; }
.content-column:nth-child(3) .article-list li:nth-child(5) { animation-delay: 0.94s; }
.content-column:nth-child(3) .article-list li:nth-child(6) { animation-delay: 1s; }
.content-column:nth-child(3) .article-list li:nth-child(7) { animation-delay: 1.06s; }

@keyframes articleItemIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list li a {
    display: block;
    color: var(--black);
    transition: all 0.2s ease;
    padding: 5px 0;
}

.article-list li a:hover {
    color: var(--primary-color);
    transform: translateX(8px);
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
    margin-left: -13px;
}

/* 页脚 */
.footer {
    background: var(--bg-gray);
    border-top: 3px solid var(--primary-color);
    padding: 30px 0;
    animation: footerIn 0.5s var(--ease-smooth) forwards;
    opacity: 0;
}

@keyframes footerIn {
    to {
        opacity: 1;
    }
}

.footer-content {
    text-align: center;
    color: var(--gray);
    font-size: 13px;
}

.footer-content p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-inner {
        height: 280px;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slogan-text {
        gap: 30px;
    }
    
    .slogan-text span {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .logo img {
        width: 60px;
        height: 60px;
    }
    
    .title-cn {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .title-en {
        font-size: 14px;
    }
    
    .antenna-icon {
        display: none;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        height: auto;
    }
    
    .nav-menu li a {
        padding: 10px 15px;
        line-height: normal;
    }
    
    .carousel-inner {
        height: 200px;
    }
    
    .carousel-caption h3 {
        font-size: 14px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .slogan-text {
        gap: 15px;
    }
    
    .slogan-text span {
        font-size: 16px;
    }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}