/* 芦笙乐器网站 - 移动端专用样式 (H5) */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --font-heading: 'Noto Serif SC', serif;
    --font-body: 'Noto Sans SC', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: #333;
    background-color: #fff;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    max-width: 100vw;
}

/* 移动端导航栏 */
.navbar {
    background-color: var(--primary-color) !important;
    padding: 0.8rem 1rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}
.navbar-collapse {
    background-color: var(--primary-color);
    border-radius: 0 0 10px 10px;
    padding: 1rem;
}
.nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.2rem 0;
    text-align: center;
    transition: background-color 0.3s;
}
.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.15);
}

/* 移动端英雄区域 */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('../images/index-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    margin-top: 60px;
}
.hero-section h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
.hero-section .lead {
    font-size: 1.1rem;
    max-width: 100%;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}
.hero-section .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    margin: 0.5rem;
    display: inline-block;
    width: 90%;
    max-width: 280px;
}
.hero-section .btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.hero-section .btn-outline-light {
    border-width: 2px;
}

/* 内容区域 */
section {
    padding: 3rem 1rem;
}
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}
h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* 卡片 */
.card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:active {
    transform: scale(0.98);
}
.card-body {
    padding: 1.5rem;
}
.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* 图集 */
#gallery .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 产品介绍 */
#products .row {
    flex-direction: column-reverse;
}
#products img {
    border-radius: 16px;
    margin-bottom: 2rem;
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    padding: 3rem 1rem;
    color: white;
}
footer h4 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
footer p, footer li {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}
footer a {
    color: #ccc;
    text-decoration: none;
}
footer a:hover {
    color: white;
    text-decoration: underline;
}
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.3s;
}
.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* 微信二维码 */
.qr-code {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.qr-code h5 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.qr-code img {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    border: 3px solid white;
}
.qr-code .d-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.qr-code p {
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* 表格（详情页） */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}
.table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem;
}
.table td {
    padding: 1rem;
}

/* 价格卡片 */
.card-header {
    padding: 1.2rem;
    font-size: 1.3rem;
    font-weight: 700;
}
.price .h2 {
    font-size: 2.2rem;
    font-weight: 800;
}
.card-header.bg-primary {
    background-color: var(--secondary-color) !important;
}
.card-header.bg-warning {
    background-color: #ffc107 !important;
}
.card-header.bg-dark {
    background-color: var(--primary-color) !important;
}

/* 常见问题 */
.accordion-button {
    font-weight: 600;
    padding: 1.2rem;
}
.accordion-body {
    padding: 1.2rem;
    line-height: 1.6;
}

/* 辅助类 */
.mt-6 {
    margin-top: 4rem;
}
.text-center {
    text-align: center;
}

/* 详情页英雄区域 */
.hero-section-subpage {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)),
                url('../images/16.jpg');
    background-size: cover;
    background-position: center;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 60px;
    padding: 1rem;
}
.hero-section-subpage h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.2rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.hero-section-subpage .lead {
    font-size: 1.1rem;
    max-width: 100%;
}

/* 移动端特定优化 */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-section {
        min-height: 500px;
        height: 80vh;
    }
    h2 {
        font-size: 1.8rem;
    }
    .card-title {
        font-size: 1.3rem;
    }
    .price .h2 {
        font-size: 2rem;
    }
}

/* 防止横屏时元素过宽 */
@media (min-width: 768px) {
    body {
        max-width: 768px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0,0,0,0.05);
    }
    .navbar {
        max-width: 768px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
    footer {
        max-width: 768px;
        margin: 0 auto;
        /* 移除 left 和 transform，避免偏移 */
    }
    footer .container {
        max-width: 768px;
        margin: 0 auto;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 乐器演奏视频样式 */
.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
}
.video-container.landscape {
    aspect-ratio: 16 / 9;
}
.video-container.portrait {
    aspect-ratio: 9 / 16;
}
.video-container video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.video-container p {
    font-size: 0.9rem;
    color: #666;
}

/* 图片库样式 */
.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.03);
}

#landscape-gallery .card,
#portrait-gallery .card {
    border: none;
    background-color: transparent;
}

#landscape-gallery .card-title,
#portrait-gallery .card-title {
    color: #555;
    font-weight: 500;
}

.craft-innovation-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .gallery-img {
        height: 150px;
    }
}