/* 
 * 创感科技企业网站响应式样式表
 * 作者: AI助手
 * 版本: 1.0
 * 日期: 2024-05-24
 */

/* ===== 大型设备（大型桌面，1200px及以上） ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-banner .carousel-item {
        height: 600px;
    }
    
    .carousel-caption {
        max-width: 600px;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
}

/* ===== 中型设备（桌面，992px及以上） ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-banner .carousel-item {
        height: 500px;
    }
    
    .carousel-caption {
        max-width: 550px;
        bottom: 15%;
    }
    
    .carousel-caption h1 {
        font-size: 2.25rem;
    }
    
    .navbar-light .navbar-nav .nav-link {
        padding: 1rem 0.75rem;
    }
}

/* ===== 小型设备（平板，768px及以上） ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .hero-banner .carousel-item {
        height: 450px;
    }
    
    .carousel-caption {
        max-width: 500px;
        bottom: 10%;
        padding: 1.5rem;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1.1rem;
    }
    
    .navbar-light .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .product-image img {
        height: 200px;
    }
    
    .case-card img, .news-card img {
        height: 180px;
    }
    
    .advantage-card, .culture-card {
        padding: 1.5rem;
    }
    
    .icon-box {
        width: 70px;
        height: 70px;
    }
    
    .timeline:before {
        left: 60px;
    }
    
    .timeline-badge {
        left: 60px;
        margin-left: 0;
    }
    
    .timeline-panel {
        width: calc(100% - 110px);
        float: right;
    }
    
    .timeline-item:nth-child(odd) .timeline-panel:after {
        content: '';
        position: absolute;
        top: 20px;
        left: -10px;
        width: 0;
        height: 0;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-right: 10px solid #fff;
        border-left: 0;
    }
}

/* ===== 超小型设备（手机，768px以下） ===== */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    .top-bar .contact-info span {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .top-bar .social-links {
        margin-top: 0.5rem;
    }
    
    .hero-banner .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        max-width: 100%;
        bottom: 5%;
        padding: 1rem;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .carousel-caption .btn {
        padding: 0.375rem 1rem;
        font-size: 0.875rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .product-list, .solution-list, .case-list, .news-list {
        flex-direction: column;
    }
    
    .product-item, .solution-item, .case-item, .news-item {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .product-image img {
        height: 180px;
    }
    
    .case-card img, .news-card img {
        height: 160px;
    }
    
    .advantage-card, .culture-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .icon-box {
        width: 60px;
        height: 60px;
    }
    
    .timeline:before {
        left: 40px;
    }
    
    .timeline-badge {
        left: 40px;
        margin-left: 0;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 0.875rem;
    }
    
    .timeline-panel {
        width: calc(100% - 70px);
        float: right;
        padding: 15px;
    }
    
    .timeline-title {
        font-size: 1.25rem;
    }
    
    .timeline-item:nth-child(odd) .timeline-panel:after {
        content: '';
        position: absolute;
        top: 15px;
        left: -10px;
        width: 0;
        height: 0;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-right: 10px solid #fff;
        border-left: 0;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    .contact-info-card {
        margin-bottom: 1rem;
    }
    
    .map-container {
        height: 300px;
        margin-top: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer h5 {
        margin-top: 1rem;
    }
}

/* ===== 极小型设备（小型手机，576px以下） ===== */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    .hero-banner .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        bottom: 35%;
        padding: 0.75rem;
    }
    
    .carousel-caption h1 {
        font-size: 1.25rem;
    }
    
    .carousel-caption p {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .product-image img {
        height: 160px;
    }
    
    .case-card img, .news-card img {
        height: 140px;
    }
    
    .advantage-card, .culture-card {
        padding: 1rem;
    }
    
    .icon-box {
        width: 50px;
        height: 50px;
    }
    
    .timeline-badge {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.75rem;
    }
    
    .timeline-panel {
        width: calc(100% - 50px);
        padding: 10px;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    .map-container {
        height: 250px;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .page-title h1 {
        font-size: 1.5rem;
    }
    
    .page-title .lead {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .navbar, .top-bar, .footer, #backToTop, .contact-cta {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background-color: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .section-title:after {
        display: none;
    }
    
    .product-card, .solution-card, .case-card, .news-card, .advantage-card, .culture-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .product-overlay {
        display: none;
    }
    
    .map-container {
        height: auto;
    }
    
    .map-container iframe {
        height: 200px;
    }
}

/* ===== 辅助响应式类 ===== */
.d-none-xs {
    display: block;
}

.d-block-xs {
    display: none;
}

@media (max-width: 575.98px) {
    .d-none-xs {
        display: none;
    }
    
    .d-block-xs {
        display: block;
    }
}

/* ===== 响应式表格 ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .table-responsive-sm {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== 响应式嵌入内容 ===== */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
}

.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.embed-responsive-21by9::before {
    padding-top: 42.857143%;
}

.embed-responsive-16by9::before {
    padding-top: 56.25%;
}

.embed-responsive-4by3::before {
    padding-top: 75%;
}

.embed-responsive-1by1::before {
    padding-top: 100%;
}

/* ===== 响应式字体大小 ===== */
html {
    font-size: 16px;
}

@media (max-width: 1199.98px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 991.98px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 13px;
    }
}

/* ===== 响应式间距 ===== */
@media (max-width: 767.98px) {
    .section-title {
        margin-bottom: 1.5rem;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mt-5 {
        margin-top: 2rem !important;
    }
}

/* ===== 响应式导航 ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-nav .dropdown-menu {
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background-color: rgba(0, 0, 0, 0.02);
    }
    
    .navbar-light .navbar-nav .nav-link.active:after {
        display: none;
    }
}