/* ========================================
   潮汕茶文化网站 - 主样式表
   优化版本 - 合并了所有页面的重复样式
   ======================================== */

/* ========================================
   基础重置和全局样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #015d3a;
    --primary-light: rgba(1, 93, 58, 0.5);
    --secondary-color: #4eab60;
    --background-light: #f8f8f8;
    --background-white: #ffffff;
    --text-dark: #333333;
    --text-black: #000000;
    --border-color: #90EE90;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --gradient-header: linear-gradient(45deg, 
        rgba(191, 255, 146, 0.5), 
        rgba(161, 225, 151, 0.5), 
        rgba(132, 194, 155, 0.5));
    --gradient-header-solid: linear-gradient(45deg, 
        rgb(191, 255, 146), 
        rgb(161, 225, 151), 
        rgb(132, 194, 155));
    --border-radius: 20px;
    --border-radius-small: 5px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: '隶书', SimSun, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    overflow-x: hidden;
}

/* ========================================
   排版样式
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h2 {
    font-size: 40px;
    color: var(--primary-color);
    border: 4px solid var(--primary-light);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    display: inline-block;
    margin: 20px 0;
}

h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin: 15px 0;
}

p {
    font-size: 25px;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

a {
    color: var(--text-black);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ========================================
   布局容器
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   头部样式
   ======================================== */
.header-placeholder {
    height: 80px;
    background: var(--gradient-header-solid);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--gradient-header);
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 10px var(--shadow-light);
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

/* ========================================
   导航菜单
   ======================================== */
.main-nav {
    flex: 1;
    margin: 0 20px;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 10px;
}

.nav-list > li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    font-size: 25px;
    color: var(--text-black);
    text-decoration: none;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
}

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--background-white);
    border-radius: var(--border-radius-small);
    box-shadow: 0 4px 15px var(--shadow-medium);
    z-index: 100;
    list-style: none;
    padding: 10px 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-link:hover {
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
}

/* ========================================
   搜索框
   ======================================== */
.search-box {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: var(--transition);
}

.search-form:hover {
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.search-input {
    height: 35px;
    width: 250px;
    padding: 0 15px;
    font-size: 20px;
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    width: 45px;
    height: 35px;
    background: white;
    border: none;
    border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--secondary-color);
    transition: var(--transition);
}

.search-btn:hover svg {
    fill: white;
}

/* ========================================
   主内容区域
   ======================================== */
.main {
    width: 95%;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    border: 6px solid var(--primary-light);
    box-shadow: 0 5px 20px var(--shadow-light);
}

/* ========================================
   轮播图样式
   ======================================== */
.swiper {
    width: 98%;
    height: 450px;
    margin: 10px auto;
    margin-bottom: 0;
    border: 6px solid var(--primary-light);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
}

.swiper-pagination-bullet {
    background: var(--secondary-color);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

/* ========================================
   列表页面样式
   ======================================== */
.tea-culture-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
    gap: 20px;
}

.tea-item {
    width: 35%;
    min-width: 300px;
    background: var(--background-white);
    padding: 20px;
    border-radius: var(--border-radius-small);
    box-shadow: 0 2px 10px var(--shadow-light);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.tea-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    border-color: var(--primary-light);
}

.tea-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
}

.tea-item:hover img {
    transform: scale(1.05);
}

.tea-item h2 {
    font-size: 32px;
    margin: 10px 0;
    border: none;
    padding: 0;
    display: block;
}

.tea-item a {
    font-size: 20px;
    color: var(--primary-color);
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.tea-item a:hover {
    text-decoration: underline;
}

/* ========================================
   文章内容样式
   ======================================== */
.article-content {
    margin-top: 30px;
}

.article-section {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--background-light);
    border-radius: var(--border-radius-small);
}

.article-section img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-small);
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: var(--transition);
}

.article-section img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

/* ========================================
   页脚样式
   ======================================== */
.site-footer {
    width: 98%;
    margin: 10px auto;
    margin-bottom: 0;
    border: 6px solid var(--primary-light);
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 300px;
}

.footer-section h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* 联系表单 */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    padding: 10px 15px;
    font-size: 18px;
    font-family: inherit;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 93, 58, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    padding: 12px 30px;
    font-size: 20px;
    font-family: inherit;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--primary-light);
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 18px;
    margin: 5px 0;
    text-indent: 0;
}

.footer-bottom a {
    color: var(--primary-color);
    font-weight: bold;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板和桌面端优化 */
@media (max-width: 1480px) {
    .search-box {
        display: none;
    }
}

@media (max-width: 1121px) {
    .main-nav {
        display: none;
    }
    
    .site-header {
        justify-content: center;
    }
    
    .logo {
        height: 60px;
    }
}

/* 平板端 */
@media (max-width: 1024px) {
    .tea-item {
        width: 45%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-section {
        min-width: 100%;
    }
}

/* 移动端 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 26px;
    }
    
    p {
        font-size: 20px;
    }
    
    .main {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .swiper {
        height: 300px;
    }
    
    .tea-item {
        width: 100%;
        min-width: auto;
    }
    
    .tea-culture-list {
        padding: 10px;
    }
    
    .nav-link {
        font-size: 20px;
        padding: 12px 15px;
    }
    
    .search-input {
        width: 150px;
        font-size: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
    
    .submit-btn {
        font-size: 18px;
        width: 100%;
    }
}

/* 小屏幕移动设备 */
@media (max-width: 480px) {
    .header-placeholder {
        height: 60px;
    }
    
    .site-header {
        height: 60px;
        padding: 0 10px;
    }
    
    .logo {
        height: 50px;
    }
    
    h2 {
        font-size: 28px;
        padding: 8px 15px;
    }
    
    p {
        font-size: 18px;
    }
    
    .main {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
    }
    
    .swiper {
        height: 250px;
    }
    
    .tea-item {
        padding: 15px;
    }
    
    .tea-item h2 {
        font-size: 26px;
    }
    
    .tea-item a {
        font-size: 18px;
    }
    
    .site-footer {
        width: 95%;
        padding: 20px 15px;
    }
    
    .footer-section h3 {
        font-size: 24px;
    }
    
    .footer-links a,
    .form-group label {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .footer-bottom p {
        font-size: 14px;
    }
}

/* ========================================
   辅助类
   ======================================== */

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 文本居中 */
.text-center {
    text-align: center;
}

/* 浮动 */
.float-left {
    float: left;
}

.float-right {
    float: right;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 阴影效果 */
.shadow-light {
    box-shadow: 0 2px 10px var(--shadow-light);
}

.shadow-medium {
    box-shadow: 0 5px 20px var(--shadow-medium);
}

.shadow-heavy {
    box-shadow: 0 10px 30px var(--shadow-heavy);
}

/* 过渡效果 */
.transition {
    transition: var(--transition);
}

/* 圆角 */
.rounded {
    border-radius: var(--border-radius);
}

.rounded-small {
    border-radius: var(--border-radius-small);
}

/* ========================================
   打印样式
   ======================================== */
@media print {
    .site-header,
    .site-footer,
    .search-box,
    .main-nav {
        display: none !important;
    }
    
    .main {
        width: 100%;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    
    body {
        background: white;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}

/* ========================================
   无障碍访问
   ======================================== */

/* 焦点样式 */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 跳过链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --text-dark: #000000;
        --border-color: #000000;
    }
    
    .tea-item,
    .main,
    .site-footer {
        border-width: 3px;
    }
}
