/* ============================================
   山东北科化学有限公司 - 响应式样式（全面优化）
   ============================================ */

/* 超大屏幕 */
@media (max-width: 1400px) {
    #heroCarousel .carousel-item {
        height: 75vh;
    }
}

/* 大屏幕 */
@media (max-width: 1199.98px) {
    #heroCarousel .carousel-caption h1 {
        font-size: 38px;
    }
}

/* ===== 中屏幕 (平板) ===== */
@media (max-width: 991.98px) {
    /* 导航栏 */
    .navbar .nav-link {
        padding: 12px 16px !important;
    }
    .navbar .nav-link::after {
        display: none;
    }
    .navbar .search-box {
        margin: 10px 0 15px 0 !important;
        width: 100%;
    }
    .navbar .search-box .form-control {
        width: 100%;
        font-size: 14px;
        padding: 10px 16px 10px 38px;
    }

    /* Hero */
    #heroCarousel .carousel-item {
        height: 60vh;
        min-height: 400px;
    }
    #heroCarousel .carousel-caption {
        left: 5%;
        right: 5%;
        text-align: center;
        max-width: 100%;
    }
    #heroCarousel .carousel-caption h1 {
        font-size: 30px;
        white-space: normal;
    }
    #heroCarousel .carousel-caption p {
        font-size: 16px;
        white-space: normal;
    }
    #heroCarousel .carousel-caption .btn {
        margin: 5px !important;
    }

    /* 视差区域 */
    .parallax-section {
        height: 280px;
    }
    .parallax-overlay {
        padding-left: 5%;
        justify-content: center;
    }
    .parallax-title {
        font-size: 28px;
        letter-spacing: 3px;
        text-align: center;
    }

    /* 通用 */
    .section-title h2 {
        font-size: 26px;
    }
    .page-header {
        padding: 80px 0 40px;
    }
    .page-header h1 {
        font-size: 28px;
    }
    .about-section .about-img {
        margin-bottom: 30px;
        height: 300px;
    }

    /* 产品详情 */
    .detail-feature-list {
        grid-template-columns: 1fr;
    }
    .detail-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    /* 新闻横向卡片 */
    .news-card-horizontal {
        flex-direction: column;
    }
    .news-card-horizontal .news-left-bar {
        width: 100%;
        min-width: 100%;
        height: 40px;
        font-size: 20px;
    }

    /* 首页新闻——平板端flex自动换行 */
}

/* ===== 小屏幕 (手机 ~ 768px) ===== */
@media (max-width: 767.98px) {
    .top-bar {
        display: none;
    }

    /* 导航栏 */
    .navbar-brand {
        font-size: 16px;
    }
    .navbar-brand img {
        height: 32px;
    }
    .navbar-brand .brand-text span {
        font-size: 10px;
    }
    .navbar-toggler {
        padding: 4px 8px;
        font-size: 14px;
    }

    /* Hero */
    #heroCarousel .carousel-item {
        height: 50vh;
        min-height: 320px;
    }
    #heroCarousel .carousel-caption {
        top: 45%;
    }
    #heroCarousel .carousel-caption h1 {
        font-size: 22px;
        white-space: normal;
        margin-bottom: 10px;
    }
    #heroCarousel .carousel-caption p {
        font-size: 13px;
        white-space: normal;
        margin-bottom: 15px;
    }
    #heroCarousel .carousel-caption .btn {
        font-size: 13px;
        padding: 8px 18px;
        display: inline-block;
        margin: 3px !important;
    }
    #heroCarousel .carousel-indicators {
        bottom: 15px;
    }
    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        width: 30px;
    }

    /* 视差区域 */
    .parallax-section {
        height: 200px;
        background-attachment: scroll !important;
    }
    .parallax-overlay {
        padding-left: 0;
        justify-content: center;
    }
    .parallax-title {
        font-size: 22px;
        letter-spacing: 2px;
    }

    /* 分类卡片 */
    .category-card {
        padding: 20px 12px;
        min-height: auto;
    }
    .category-card h5 {
        white-space: normal;
        font-size: 14px;
    }
    .category-card .icon-wrap {
        width: 46px;
        height: 46px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    .category-card.cat-card-hori {
        padding: 8px 14px;
        min-height: auto;
    }
    .category-card.cat-card-hori h5 {
        font-size: 13px;
        white-space: nowrap;
    }
    .category-card.cat-card-hori .icon-wrap {
        width: 20px;
        height: 20px;
        font-size: 13px;
        margin-bottom: 0;
    }

    /* 筛选栏 */
    .filter-section {
        padding: 20px 0;
    }
    .filter-section .row > div {
        margin-bottom: 10px;
    }
    .filter-section .form-select,
    .filter-section .form-control {
        font-size: 14px;
        height: 38px;
    }
    .filter-section .input-group .btn {
        font-size: 14px;
        padding: 6px 14px;
    }

    /* 产品卡片 */
    .product-card .product-info {
        padding: 15px;
    }
    .product-card .product-info h5 {
        font-size: 14px;
    }
    .product-card .product-info .cas-number,
    .product-card .product-info .specs span {
        font-size: 11px;
    }
    .product-card .product-info .btn-wrap {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .product-card .product-info .btn-wrap .btn {
        width: 100%;
        font-size: 13px;
        padding: 8px 0;
        text-align: center;
    }
    .product-card .product-info .btn-wrap .btn.ms-1 {
        margin-left: 0 !important;
    }

    /* 产品详情 */
    .product-detail-wrap {
        padding: 18px;
    }
    .detail-product-name {
        font-size: 20px;
    }
    .detail-params th {
        width: 80px;
        font-size: 12px;
        padding: 6px 8px;
    }
    .detail-params td {
        font-size: 12px;
        padding: 6px 8px;
    }
    .detail-feature-list {
        grid-template-columns: 1fr;
    }
    .detail-section-title {
        font-size: 16px;
    }
    .structure-box {
        height: 200px;
    }

    /* 新闻卡片 */
    .news-card .news-body {
        padding: 16px;
    }
    .news-card .news-body h5 {
        font-size: 15px;
    }
    .news-card-horizontal .news-body {
        padding: 16px;
    }

    /* 首页新闻——手机端flex自动换行 */

    /* 新闻详情 */
    #newsDetail .article-header h1 {
        font-size: 20px;
    }
    #newsDetail .article-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    #newsDetail .article-sidebar {
        width: 100%;
        position: static;
    }
    #newsDetail .article-header .meta-info {
        gap: 10px;
        font-size: 12px;
    }

    /* 联系表单 */
    .contact-form-wrap {
        padding: 20px;
    }
    .contact-form-wrap .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    .contact-form-wrap .btn {
        width: 100%;
        padding: 12px;
    }
    .contact-info-card {
        padding: 20px;
    }

    /* 服务卡片 */
    .service-card {
        padding: 25px 20px;
    }
    .service-card .service-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .service-card h5 {
        font-size: 16px;
    }

    /* 优势 */
    .advantage-item {
        padding: 20px 10px;
    }
    .advantage-item .icon-box {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .advantage-item h5 {
        font-size: 15px;
    }

    /* 通用 */
    .section-title {
        margin-bottom: 25px;
    }
    .section-title h2 {
        font-size: 22px;
    }
    .section-title p {
        font-size: 14px;
    }
    .page-header {
        padding: 50px 0 25px;
    }
    .page-header h1 {
        font-size: 22px;
    }

    /* 页脚 */
    .footer {
        padding: 35px 0 0;
    }
    .footer h5 {
        margin-bottom: 12px;
        font-size: 16px;
        padding-bottom: 8px;
    }
    .footer p {
        font-size: 13px;
    }
    .footer .footer-links a {
        font-size: 13px;
    }
    .footer-bottom {
        margin-top: 25px;
        padding: 15px 0;
        font-size: 12px;
    }

    /* 返回顶部 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    /* 间距 */
    .categories-section,
    .products-section,
    .advantages-section,
    .news-section,
    .about-section,
    .services-section,
    .contact-section {
        padding: 40px 0;
    }

    .about-section .about-img {
        height: 220px;
    }
    .about-section .about-content h3 {
        font-size: 20px;
    }
}

/* ===== 超小屏幕 (手机竖屏 ~ 576px) ===== */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 15px;
    }
    .navbar-brand img {
        height: 28px;
    }
    .navbar-brand .brand-text span {
        font-size: 9px;
    }
    .navbar-toggler {
        padding: 4px 8px;
    }

    /* Hero */
    #heroCarousel .carousel-item {
        height: 45vh;
        min-height: 280px;
    }
    #heroCarousel .carousel-caption h1 {
        font-size: 18px;
        white-space: normal;
    }
    #heroCarousel .carousel-caption p {
        font-size: 12px;
        margin-bottom: 12px;
        white-space: normal;
    }
    #heroCarousel .carousel-caption .btn {
        font-size: 12px;
        padding: 6px 14px;
        display: block;
        width: 80%;
        margin: 6px auto !important;
        text-align: center;
    }
    #heroCarousel .carousel-indicators button {
        width: 8px;
        height: 8px;
    }

    /* 视差 */
    .parallax-section {
        height: 170px;
    }
    .parallax-title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    /* 分类卡片 */
    .category-card {
        padding: 16px 10px;
    }
    .category-card h5 {
        font-size: 13px;
    }
    .category-card p {
        font-size: 11px;
    }
    .category-card .icon-wrap {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 8px;
    }
    .category-card.cat-card-hori {
        padding: 8px 12px;
    }
    .category-card.cat-card-hori h5 {
        font-size: 12px;
    }
    .category-card.cat-card-hori p {
        display: none;
    }
    .category-card.cat-card-hori .icon-wrap {
        width: 18px;
        height: 18px;
        font-size: 12px;
        margin-bottom: 0;
    }

    /* 产品卡片 */
    .product-card .product-info {
        padding: 12px;
    }
    .product-card .product-info h5 {
        font-size: 13px;
    }
    .product-card .product-info .btn-wrap .btn {
        font-size: 12px;
        padding: 7px 0;
    }

    /* 筛选栏 */
    .filter-section .row > div {
        margin-bottom: 8px;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* 标题 */
    .section-title {
        margin-bottom: 25px;
    }
    .section-title h2 {
        font-size: 20px;
    }
    .section-title p {
        font-size: 13px;
    }

    .btn-primary-custom,
    .btn-accent {
        padding: 10px 22px;
        font-size: 14px;
    }

    /* 表单 */
    .contact-form-wrap {
        padding: 16px;
    }
    .contact-form-wrap label {
        font-size: 13px;
    }

    /* 关于 */
    .about-section .about-content h3 {
        font-size: 20px;
    }
    .about-section .about-content p {
        font-size: 14px;
    }

    /* 页脚 */
    .footer h5 {
        font-size: 15px;
    }
    .footer .contact-info li {
        font-size: 12px;
    }
    .footer .contact-info li i {
        width: 16px;
        margin-right: 6px;
        margin-top: 3px;
        font-size: 12px;
    }
    .footer-bottom {
        font-size: 11px;
    }

    /* 新闻详情 */
    #newsDetail .article-header h1 {
        font-size: 18px;
    }
    #newsDetail .article-footer {
        flex-direction: column;
        align-items: stretch;
    }
    #newsDetail .article-footer .btn-back {
        justify-content: center;
    }

    /* 产品详情 */
    .detail-product-name {
        font-size: 18px;
    }
    .detail-params th {
        width: 65px;
        font-size: 11px;
    }
    .detail-params td {
        font-size: 11px;
    }
    .structure-box {
        height: 180px;
    }

    .service-card {
        padding: 20px 15px;
    }
    .advantage-item {
        padding: 15px 8px;
    }

    .categories-section,
    .products-section,
    .advantages-section,
    .news-section,
    .about-section,
    .services-section,
    .contact-section {
        padding: 35px 0;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* ===== 新闻详情（平板及以下侧边栏下沉） ===== */
@media (max-width: 768px) {
    #newsDetail .article-wrapper {
        flex-direction: column;
        gap: 32px;
    }
    #newsDetail .article-sidebar {
        width: 100%;
        position: static;
    }
    #newsDetail .article-header h1 {
        font-size: 24px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    #heroCarousel {
        display: none !important;
    }
    body {
        font-size: 12pt;
    }
}
