/**
 * 湖北泰和建设集团官网响应式样式文件
 * 适配不同屏幕尺寸的样式定义
 */

/* 平板设备样式 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* 移动设备样式 (最大宽度 768px) */
@media screen and (max-width: 768px) {
    /* 导航栏移动端样式 */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        display: block;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* 首页横幅移动端样式 */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    /* 通用区块移动端样式 */
    section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* 关于我们移动端样式 */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .company-info {
        padding: 1.5rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .info-item strong {
        min-width: auto;
    }
    
    /* 业务范围移动端样式 */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    /* 工程案例移动端样式 */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-placeholder {
        font-size: 3rem;
    }
    
    /* 新闻动态移动端样式 */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-card {
        padding: 1.5rem;
    }
    
    /* 联系我们移动端样式 */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 1.2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
    }
    
    /* 页脚移动端样式 */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* 小屏幕移动设备样式 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo h2 {
        font-size: 1.2rem;
    }
    
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .btn {
        width: 180px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .stat-item p {
        font-size: 0.9rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    .service-card,
    .news-card,
    .contact-item,
    .contact-form {
        padding: 1.2rem;
    }
    
    .company-info {
        padding: 1.2rem;
    }
    
    .project-image {
        height: 160px;
    }
    
    .project-placeholder {
        font-size: 2.5rem;
    }
    
    .contact-icon {
        font-size: 1.3rem;
    }
    
    .footer {
        padding: 1.5rem 0 0.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .social-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* 超小屏幕设备样式 (最大宽度 320px) */
@media screen and (max-width: 320px) {
    .nav-logo h2 {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .btn {
        width: 160px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .service-card h3,
    .news-card h3,
    .project-info h3 {
        font-size: 1.1rem;
    }
    
    .service-card,
    .news-card,
    .contact-item,
    .contact-form,
    .company-info {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-stats {
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 40px 0;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .footer-social {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    .hero {
        background: none;
        color: #000;
        padding: 20px 0;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .section-header h2 {
        color: #000;
        font-size: 18pt;
    }
    
    .service-card,
    .project-card,
    .news-card {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        page-break-inside: avoid;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .nav-link:hover,
    .section-header h2,
    .service-card h3,
    .project-info h3,
    .news-card h3,
    .contact-details h4 {
        color: #000;
    }
    
    .btn-primary {
        background: #000;
        border-color: #000;
    }
    
    .btn-secondary {
        border-color: #000;
        color: #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}