/* ===================================
   柳林酒业官网 - 移动端优化样式
   专注于美学设计和用户体验
   =================================== */

/* ===================================
   全局移动端优化
   =================================== */
@media (max-width: 768px) {

    /* 防止iOS缩放 */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* 优化触摸区域 */
    button,
    a,
    .nav-dot {
        min-height: 44px;
        min-width: 44px;
    }

    /* 平滑滚动 */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
}

/* ===================================
   Hero区域移动端优化
   =================================== */
@media (max-width: 768px) {

    /* 隐藏桌面端导航 */
    .top-nav {
        display: none !important;
    }

    /* 隐藏视频控件 */
    .video-controls-group,
    .video-progress {
        display: none !important;
    }

    /* 隐藏桌面端视频容器 */
    .hero-video-container {
        display: none !important;
    }

    /* 移动端海报优化 */
    .mobile-video-poster {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        height: 100vh;
        background: linear-gradient(135deg, #1a5f5a 0%, #0d3d3a 100%);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
        width: 100%;
    }

    .mobile-video-poster::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('../images/tianqing20.jpg') center/cover no-repeat;
        opacity: 0.4;
        filter: blur(1px);
        z-index: 1;
    }

    .mobile-video-poster::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.2) 0%,
                rgba(0, 0, 0, 0.1) 50%,
                rgba(0, 0, 0, 0.3) 100%);
        z-index: 2;
    }

    .poster-brand {
        position: relative;
        z-index: 3;
        text-align: center;
        padding: 40px 24px;
        animation: fadeInUp 1s ease-out;
        width: 100%;
    }

    .poster-brand h2 {
        font-size: 42px;
        font-weight: 700;
        color: var(--white);
        letter-spacing: 12px;
        margin-bottom: 20px;
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        font-family: 'STSong', 'SimSun', serif;
    }

    .poster-brand p {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.95);
        letter-spacing: 6px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }

    /* 向下箭头优化 */
    .scroll-down-btn {
        bottom: 40px;
        width: 56px;
        height: 56px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        animation: bounce 2s infinite;
    }

    @keyframes bounce {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }

        40% {
            transform: translateY(-10px);
        }

        60% {
            transform: translateY(-5px);
        }
    }
}

/* ===================================
   导航菜单移动端优化
   =================================== */
@media (max-width: 768px) {

    /* 汉堡按钮 */
    .hamburger {
        display: flex !important;
        width: 40px;
        height: 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .hamburger:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }

    .hamburger span {
        width: 24px;
        height: 2px;
        background: var(--white);
        margin: 3px 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* 移动端导航菜单 */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: linear-gradient(180deg, #0d3d3a 0%, #1a5f5a 50%, #2a8f8a 100%);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding: 80px 0 40px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav.active {
        right: 0;
    }

    .mobile-nav a {
        display: block;
        padding: 18px 32px;
        color: var(--white);
        text-decoration: none;
        font-size: 17px;
        font-weight: 500;
        letter-spacing: 2px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .mobile-nav a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 0;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        transition: width 0.3s ease;
    }

    .mobile-nav a:hover::before,
    .mobile-nav a:active::before {
        width: 100%;
    }

    .mobile-nav a.active {
        background: rgba(255, 255, 255, 0.12);
        border-left: 4px solid var(--white);
        padding-left: 28px;
    }

    /* 遮罩层 */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* ===================================
   区块内容移动端优化
   =================================== */
@media (max-width: 768px) {

    /* 全屏区块 */
    .fullscreen-section {
        min-height: 100vh;
        padding: 60px 0;
    }

    /* 区块内容 */
    .section-content {
        grid-template-columns: 1fr !important;
        padding: 0 20px !important;
        gap: 32px !important;
    }

    /* 区块文字 */
    .section-text {
        text-align: center;
        order: 2;
    }

    .section-text h2 {
        font-size: 32px !important;
        margin-bottom: 16px !important;
        letter-spacing: 6px;
    }

    .section-text .subtitle {
        font-size: 14px !important;
        margin-bottom: 24px !important;
        letter-spacing: 3px;
    }

    .section-text p {
        font-size: 15px !important;
        line-height: 1.8 !important;
        margin-bottom: 16px !important;
    }

    /* 区块图片 */
    .section-image {
        order: 1;
        margin-bottom: 20px;
    }

    .section-image img {
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }
}

/* ===================================
   产品卡片移动端优化
   =================================== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 0 20px !important;
    }

    .product-card {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s ease;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    .product-image {
        height: 240px !important;
        background-size: cover;
        background-position: center;
    }

    .product-info {
        padding: 20px !important;
    }

    .product-info h3 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .product-info p {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
}

/* ===================================
   新闻卡片移动端优化
   =================================== */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 20px !important;
    }

    .news-card {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .news-card h3 {
        font-size: 18px !important;
        line-height: 1.6 !important;
    }

    .news-card p {
        font-size: 14px !important;
    }

    .news-date {
        font-size: 13px !important;
    }
}

/* ===================================
   表单移动端优化
   =================================== */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 15px;
        margin-bottom: 8px;
        display: block;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px !important;
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: var(--primary);
        background: rgba(255, 255, 255, 0.08);
        outline: none;
    }

    .submit-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 2px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .submit-btn:active {
        transform: scale(0.98);
    }
}

/* ===================================
   页脚移动端优化
   =================================== */
@media (max-width: 768px) {
    .section-footer {
        padding: 20px 16px !important;
    }

    .footer-content {
        flex-direction: column !important;
        gap: 24px !important;
    }

    .footer-left,
    .footer-right {
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .footer-links a {
        font-size: 13px !important;
    }

    .footer-company h3 {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }

    .footer-company p {
        font-size: 12px !important;
        line-height: 1.6 !important;
    }

    .footer-certifications p {
        font-size: 11px !important;
    }

    .footer-right {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .social-item {
        text-align: center;
    }

    .qr-code-placeholder {
        width: 50px;
        height: 50px;
        margin: 0 auto 8px;
    }

    .social-item p {
        font-size: 12px !important;
    }
}

/* ===================================
   统计数字移动端优化
   =================================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .stat-item {
        padding: 20px !important;
    }

    .stat-number {
        font-size: 32px !important;
        margin-bottom: 8px !important;
    }

    .stat-label {
        font-size: 13px !important;
    }
}

/* ===================================
   时间轴移动端优化
   =================================== */
@media (max-width: 768px) {
    .timeline-container {
        padding: 0 20px;
    }

    .timeline-item {
        padding-left: 40px !important;
    }

    .timeline-dot {
        width: 16px !important;
        height: 16px !important;
        left: 12px !important;
    }

    .timeline-content h3 {
        font-size: 18px !important;
    }

    .timeline-content p {
        font-size: 14px !important;
    }
}

/* ===================================
   按钮通用移动端优化
   =================================== */
@media (max-width: 768px) {
    .btn {
        padding: 14px 28px !important;
        font-size: 15px !important;
        letter-spacing: 1px;
        border-radius: 8px;
    }

    .btn-primary {
        min-height: 48px;
    }
}

/* ===================================
   性能优化 - 减少动画
   =================================== */
@media (max-width: 768px) {
    .fade-in {
        transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    }

    .parallax-bg {
        background-attachment: scroll !important;
    }

    /* 减少阴影复杂度 */
    .card,
    .product-card,
    .news-card {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    }
}

/* ===================================
   横屏优化
   =================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-video-poster {
        min-height: 100vh;
    }

    .poster-brand h2 {
        font-size: 36px;
    }

    .fullscreen-section {
        min-height: auto;
        padding: 40px 0;
    }
}

/* ===================================
   超小屏幕优化 (< 480px)
   =================================== */
@media (max-width: 480px) {
    .poster-brand h2 {
        font-size: 32px;
        letter-spacing: 8px;
    }

    .poster-brand p {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .section-text h2 {
        font-size: 26px !important;
        letter-spacing: 4px;
    }

    .mobile-nav {
        width: 90%;
    }

    .mobile-nav a {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* ===================================
   侧边导航圆点移动端优化
   =================================== */
@media (max-width: 768px) {
    .section-side-nav {
        display: none !important;
    }
}