/* 响应式样式文件 */

/* 大屏幕 (桌面, 992px 及以上) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .carousel-caption h2 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
}

/* 中等屏幕 (平板横向, 768px 及以上) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* 导航栏调整 */
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: var(--shadow-sm);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .navbar-menu.active {
        max-height: 500px;
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-menu a:last-child {
        border-bottom: none;
    }
    
    .navbar-menu a::after {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .navbar-contact {
        display: none;
    }
    
    /* 轮播图调整 */
    .carousel {
        height: 500px;
    }
    
    .carousel-caption {
        padding: 1.5rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.75rem;
    }
    
    /* 网格调整 */
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* 按钮组调整 */
    .btn-group {
        flex-direction: column;
    }
    
    /* 页脚调整 */
    .footer .container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* 小屏幕 (平板纵向, 576px 及以上) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    /* 导航栏调整 */
    .navbar .container {
        padding: 0.75rem 1rem;
    }
    
    .navbar-logo span {
        font-size: 1.25rem;
    }
    
    /* 轮播图调整 */
    .carousel {
        height: 400px;
        margin-top: 60px;
    }
    
    .carousel-caption {
        padding: 1rem;
        width: 90%;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .carousel-caption p {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* 标题调整 */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* 网格调整 */
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* 卡片图片高度调整 */
    .card-img,
    .product-card-img,
    .news-card-img {
        height: 180px;
    }
    
    /* 部分内边距调整 */
    .section {
        padding: 3rem 0;
    }
    
    /* 页脚调整 */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* 联系信息调整 */
    .contact-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-info-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    /* 地图高度调整 */
    .map-container iframe {
        height: 300px;
    }
}

/* 超小屏幕 (手机, 575px 及以下) */
@media (max-width: 575px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* 导航栏调整 */
    .navbar .container {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-logo img {
        height: 30px;
    }
    
    .navbar-logo span {
        font-size: 1.125rem;
    }
    
    /* 轮播图调整 */
    .carousel {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 0.75rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.25rem;
    }
    
    .carousel-caption p {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .carousel-caption .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 标题调整 */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* 卡片图片高度调整 */
    .card-img,
    .product-card-img,
    .news-card-img {
        height: 150px;
    }
    
    /* 部分内边距调整 */
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    /* 卡片内边距调整 */
    .card-body,
    .product-card-body,
    .news-card-body {
        padding: 1.25rem;
    }
    
    /* 功能块内边距调整 */
    .feature {
        padding: 1.5rem;
    }
    
    /* 按钮调整 */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* 表单控件调整 */
    .form-control {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    /* 地图高度调整 */
    .map-container iframe {
        height: 250px;
    }
    
    /* 页脚调整 */
    .footer {
        padding: 1.5rem 0 0.75rem;
    }
    
    .footer-bottom p {
        font-size: 0.875rem;
    }
}

/* 超小屏幕 (手机小屏, 400px 及以下) */
@media (max-width: 399px) {
    /* 轮播图调整 */
    .carousel {
        height: 250px;
    }
    
    .carousel-caption {
        padding: 0.5rem;
    }
    
    .carousel-caption h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption p {
        display: none;
    }
    
    .carousel-caption .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    /* 导航栏logo仅显示图标 */
    .navbar-logo span {
        display: none;
    }
    
    /* 标题调整 */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    /* 卡片图片高度调整 */
    .card-img,
    .product-card-img,
    .news-card-img {
        height: 120px;
    }
    
    /* 技术卡片调整 */
    .tech-card {
        padding: 1.25rem;
    }
    
    .tech-card-icon {
        font-size: 2rem;
    }
    
    /* 联系信息调整 */
    .contact-info {
        margin-bottom: 1rem;
    }
    
    .contact-info-content h4 {
        font-size: 1rem;
    }
    
    .contact-info-content p {
        font-size: 0.875rem;
    }
}

/* 横屏模式调整 */
@media (max-height: 575px) and (orientation: landscape) {
    .carousel {
        height: 250px;
    }
    
    .carousel-caption {
        padding: 0.5rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* 打印样式 */
@media print {
    /* 隐藏不必要的元素 */
    .navbar,
    .carousel,
    .footer,
    .btn {
        display: none;
    }
    
    /* 调整页面样式 */
    body {
        font-size: 12pt;
        color: black;
        background-color: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    /* 调整链接样式 */
    a {
        color: black;
        text-decoration: underline;
    }
    
    /* 调整图片样式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 调整标题样式 */
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    /* 调整段落样式 */
    p {
        color: black;
        orphans: 3;
        widows: 3;
    }
    
    /* 调整表格样式 */
    table {
        border-collapse: collapse;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    th, td {
        border: 1px solid #000;
        padding: 0.5rem;
        text-align: left;
    }
    
    th {
        background-color: #f0f0f0;
    }
}