/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - Unified Navigation */
.header,
.site-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content,
.nav-container,
.navbar > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo,
.logo-link,
.nav-brand a {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu a,
.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-link:hover {
    color: #ffd700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector,
.language-dropdown {
    position: relative;
}

.language-btn,
.language-toggle,
.dropdown-toggle {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.language-btn:hover,
.language-toggle:hover,
.dropdown-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.language-dropdown .dropdown-menu,
.language-dropdown > div {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.language-dropdown .dropdown-menu.show,
.language-dropdown > div.show {
    display: block;
}

.language-option,
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.language-option:hover,
.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.language-option:last-child,
.dropdown-menu a:last-child {
    border-bottom: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    background: #8b0000;
    padding: 1rem;
}

.mobile-menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    color: #ffd700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.show {
        display: block;
    }
    
    .header-content,
    .nav-container,
    .navbar > .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(196, 30, 58, 0.8), rgba(139, 0, 0, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f0f0f0" width="1200" height="600"/><text x="600" y="300" text-anchor="middle" font-size="48" fill="%23ddd">中国国粹</text></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background: #ffd700;
    color: #333;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Featured Arts Section */
.featured-arts {
    padding: 5rem 0;
    background: #f8f9fa;
}

.featured-arts h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #c41e3a;
}

.arts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.art-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.art-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.art-image {
    height: 200px;
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.art-content {
    padding: 1.5rem;
}

.art-content h3 {
    margin-bottom: 1rem;
    color: #c41e3a;
}

.art-content h3 a {
    color: inherit;
    text-decoration: none;
}

.art-content h3 a:hover {
    text-decoration: underline;
}

.art-content p {
    margin-bottom: 1rem;
    color: #666;
}

.read-more {
    color: #c41e3a;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #8b0000;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #c41e3a;
}

.about > .container > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #666;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.feature h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* Footer Styles */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .arts-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

/* Performance Optimizations */
.art-card, .btn-primary {
    will-change: transform;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Detail Page Styles */
.art-detail {
    padding: 2rem 0;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #c41e3a;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.art-header {
    text-align: center;
    margin-bottom: 3rem;
}

.art-header h1 {
    font-size: 3rem;
    color: #c41e3a;
    margin-bottom: 1rem;
}

.art-subtitle {
    font-size: 1.3rem;
    color: #666;
    font-weight: 300;
}

.art-hero {
    margin-bottom: 3rem;
}

.placeholder-image.large {
    height: 400px;
    font-size: 3rem;
    border-radius: 15px;
}

.art-content {
    max-width: 900px;
    margin: 0 auto;
}

.art-content section {
    margin-bottom: 4rem;
}

.art-content h2 {
    font-size: 2.2rem;
    color: #c41e3a;
    margin-bottom: 2rem;
    border-bottom: 3px solid #ffd700;
    padding-bottom: 0.5rem;
}

.art-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.art-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #444;
}

/* Feature Grid for Detail Pages */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #c41e3a;
}

.feature-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #c41e3a;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #c41e3a;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #c41e3a;
}

.timeline-item h3 {
    color: #c41e3a;
    margin-bottom: 0.5rem;
}

/* Philosophy Content */
.philosophy-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.yin-yang {
    display: flex;
    justify-content: center;
}

.yin-yang .placeholder-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #333 50%, #fff 50%);
    color: #c41e3a;
    font-weight: bold;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.benefit-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

.benefit-item ul {
    list-style: none;
    padding: 0;
}

.benefit-item li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.benefit-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #c41e3a;
    font-weight: bold;
}

.benefit-item li:last-child {
    border-bottom: none;
}

/* Principles List */
.principles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.principle-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 4px solid #c41e3a;
}

.principle-item h3 {
    color: #c41e3a;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Treatment Grid */
.treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.treatment-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.treatment-item:hover {
    transform: translateY(-3px);
}

.treatment-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* Diagnosis Methods */
.diagnosis-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.method-item {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.method-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Theory Grid */
.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.theory-item {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.theory-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* Classics List */
.classics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.classic-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-left: 5px solid #c41e3a;
}

.classic-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Value Content */
.value-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.value-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tool-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.tool-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Related Arts */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.related-image {
    height: 150px;
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-image .placeholder-image {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.related-item h3 {
    padding: 1rem 1.5rem 0.5rem;
    color: #c41e3a;
    margin-bottom: 0.5rem;
}

.related-item p {
    padding: 0 1.5rem 1.5rem;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Responsive Design for Detail Pages */
@media (max-width: 768px) {
    .art-header h1 {
        font-size: 2.2rem;
    }
    
    .art-subtitle {
        font-size: 1.1rem;
    }
    
    .placeholder-image.large {
        height: 250px;
        font-size: 2rem;
    }
    
    .philosophy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .yin-yang .placeholder-image {
        width: 150px;
        height: 150px;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .art-content h2 {
        font-size: 1.8rem;
    }
    
    .feature-grid,
    .benefits-grid,
    .treatment-grid,
    .theory-grid,
    .classics-list,
    .value-content,
    .tools-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* More Arts Section */
.more-arts {
    padding: 5rem 0;
    background: white;
}

.more-arts h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #c41e3a;
}

/* Cultural Value Section */
.cultural-value {
    padding: 5rem 0;
    background: #f8f9fa;
}

.cultural-value h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #c41e3a;
}

.value-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.value-text h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.value-text p {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #444;
}

.value-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: #c41e3a;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
    .value-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stat {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .more-arts h2,
    .cultural-value h2 {
        font-size: 2rem;
    }
}

/* Hover effects for art cards in more arts section */
.more-arts .art-card {
    transition: all 0.3s ease;
}

.more-arts .art-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Animation for stats */
.stat {
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: scale(1.05);
}

/* Peking Opera Specific Styles */
.plays-grid,
.techniques-grid,
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.play-item,
.technique-item,
.artist-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #c41e3a;
}

.play-item h3,
.technique-item h3,
.artist-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.play-item p,
.technique-item p,
.artist-item p {
    color: #444;
    line-height: 1.6;
}

/* Hover effects */
.play-item:hover,
.technique-item:hover,
.artist-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* Responsive design for new sections */
@media (max-width: 768px) {
    .plays-grid,
    .techniques-grid,
    .artists-grid {
        grid-template-columns: 1fr;
    }
    
    .play-item,
    .technique-item,
    .artist-item {
        padding: 1.5rem;
    }
}

/* RTL (Right-to-Left) Language Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .container,
[dir="rtl"] .header-content,
[dir="rtl"] .nav-menu,
[dir="rtl"] .hero-cta,
[dir="rtl"] .feature-grid,
[dir="rtl"] .benefits-grid,
[dir="rtl"] .treatment-grid,
[dir="rtl"] .theory-grid,
[dir="rtl"] .classics-list,
[dir="rtl"] .value-content,
[dir="rtl"] .tools-grid,
[dir="rtl"] .related-grid {
    text-align: right;
}

[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .language-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .hero-subtitle,
[dir="rtl"] .art-description,
[dir="rtl"] .value-text p,
[dir="rtl"] .stat-label {
    text-align: right;
}

[dir="rtl"] .nav-menu {
    margin-right: 0;
    margin-left: auto;
}

/* RTL Mobile Responsive */
@media (max-width: 768px) {
    [dir="rtl"] .nav-menu {
        margin-left: 0;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 1rem;
    }
}