/* ========================================
   正心禅寺 - 统一样式
   ======================================== */

@import 'variables.css';

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== 容器 ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== 顶部横幅 ===== */
.top-bar {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    padding: 8px 0;
    text-align: center;
}

.top-bar .separator {
    margin: 0 10px;
    opacity: 0.5;
}

/* ===== 导航栏 ===== */
.navbar {
    background: var(--bg-primary);
    padding: 16px 0;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.navbar-scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 28px;
    color: var(--color-gold);
}

.navbar-brand span {
    font-size: 22px;
    font-weight: 500;
    font-family: var(--font-serif);
    color: var(--color-dark);
    margin-left: 10px;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 8px 18px !important;
    transition: all var(--transition-fast);
    border-radius: var(--radius-full);
}

.nav-link:hover {
    color: var(--color-gold) !important;
    background: rgba(201,168,124,0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 8px 0;
}

.dropdown-item {
    padding: 8px 20px;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(201,168,124,0.1);
    color: var(--color-gold);
}

/* ===== 主要内容 ===== */
.main-content {
    min-height: 500px;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-gold {
    background: var(--color-gold);
    color: var(--color-white);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--color-white);
}

.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}

.btn-outline-gold:hover {
    background: var(--color-gold);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ===== 卡片样式 ===== */
.card {
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ===== 表单样式 ===== */
.form-control {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201,168,124,0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ===== 加载动画 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    background: var(--bg-primary);
    padding: 30px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
}

/* ===== 模态框 ===== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 15px 25px;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-brand i {
    font-size: 32px;
    color: var(--color-gold);
}

.footer-brand span {
    font-size: 24px;
    font-weight: 500;
    font-family: var(--font-serif);
    color: var(--color-white);
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.7;
}

.footer-info p:first-child {
    font-size: 13px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 12px;
}

.footer-bottom p {
    margin-bottom: 8px;
    opacity: 0.6;
}

.license {
    font-size: 11px;
    color: var(--color-gold);
    opacity: 0.8;
}

/* 响应式 */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    
    .footer-brand i {
        font-size: 28px;
    }
    
    .footer-brand span {
        font-size: 20px;
    }
    
    .footer-info p {
        font-size: 12px;
    }
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--color-gold);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top:hover {
    background: var(--color-gold-dark);
    transform: translateY(-3px);
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.page-link:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-white);
}

.page-item.active .page-link {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-white);
}

/* ===== 状态标签 ===== */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-gold {
    background: var(--color-gold);
    color: var(--color-white);
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    :root {
        --container-padding: 15px;
    }
    
    .navbar-brand i {
        font-size: 22px;
    }
    
    .navbar-brand span {
        font-size: 18px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: 10px;
        padding: 5px 0;
    }
    
    .top-bar .separator {
        margin: 0 5px;
    }
}

/* ===== 主视觉 ===== */
.hero-section {
    position: relative;
    height: 550px;
    overflow: hidden;
}

.hero-swiper {
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
}

.hero-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 轮播文字区域 - 只在有文字时显示 */
.hero-caption {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10;
    pointer-events: none;
    animation: fadeInUp 0.6s ease;
}

.hero-caption h2 {
    font-size: 48px;
    font-weight: 500;
    font-family: var(--font-serif);
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.hero-caption p {
    font-size: 18px;
    opacity: 0.9;
    letter-spacing: 2px;
}

/* 无文字时的轮播图 - 无遮罩 */
.hero-swiper .swiper-slide .hero-caption:empty {
    display: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        height: 350px;
    }
    
    .hero-caption {
        bottom: 40px;
    }
    
    .hero-caption h2 {
        font-size: 24px;
        margin-bottom: 8px;
        letter-spacing: 2px;
    }
    
    .hero-caption p {
        font-size: 12px;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 250px;
    }
    
    .hero-caption {
        bottom: 20px;
    }
    
    .hero-caption h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .hero-caption p {
        font-size: 10px;
    }
}

/* 法会卡片样式 */
.event-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.event-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.event-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-gold);
    color: var(--color-white);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    min-width: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.event-date-badge .month {
    font-size: 12px;
    display: block;
    line-height: 1.2;
}

.event-date-badge .day {
    font-size: 18px;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}

.event-content {
    padding: 20px;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.event-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.event-meta i {
    width: 14px;
    color: var(--color-gold);
    margin-right: 4px;
}