/* ============================================
   灵境科技 - 响应式样式表
   ============================================ */

/* ---------- 大桌面 1400px+ ---------- */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    h1 { font-size: 3.8rem; }
    h2 { font-size: 2.8rem; }

    .hero h1 {
        font-size: 4rem;
    }

    .services-grid {
        gap: 38px;
    }
}

/* ---------- 桌面 1200px+ ---------- */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
}

/* ---------- 小桌面 / 平板 992px+ ---------- */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }

    .hero h1 {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .statistics-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
  }

    /* Footer */
    .site-footer .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 30px;
    }

    .about-content {
        gap: 40px;
    }
}

/* ---------- 平板 768px+ ---------- */
@media (min-width: 768px) and (max-width: 991px) {
    :root {
        --nav-height: 60px;
        --nav-height-scrolled: 50px;
    }

    .container {
        max-width: 720px;
    }

    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }

    .section-padding {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Navigation */
    .navbar-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        border-bottom: 1px solid rgba(37, 99, 235, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .navbar-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu a {
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .navbar-menu a::after {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 28px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
    }

    .hero-image-grid {
        max-width: 400px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .page-banner-space {
        padding: 110px 0 70px;
        min-height: 260px;
    }

    .page-banner-space .banner-content h1 {
        font-size: 2.2rem;
    }

    .page-banner-space .banner-content p {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-stats {
        gap: 40px;
        flex-wrap: wrap;
    }

    .hero-stat-item .stat-number {
        font-size: 2rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Statistics */
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stat-item .stat-number {
        font-size: 2.4rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .about-image .about-img-placeholder {
        aspect-ratio: 16/9;
    }

    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* News */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* FAQ */
    .faq-question {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .faq-answer p {
        padding: 0 20px 16px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-wrapper {
        padding: 28px;
    }

    .contact-info-wrapper {
        padding: 28px;
    }

    /* Footer */
    .site-footer .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .site-footer .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ---------- 手机 576px+ ---------- */
@media (min-width: 576px) and (max-width: 767px) {
    :root {
        --nav-height: 56px;
        --nav-height-scrolled: 48px;
    }

    .container {
        max-width: 540px;
        padding: 0 16px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.15rem; }

    .section-padding {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-header h2::after {
        width: 40px;
    }

    /* Navigation */
    .navbar-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px;
        gap: 2px;
        border-bottom: 1px solid rgba(37, 99, 235, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .navbar-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu a {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .navbar-menu a::after {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 24px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        max-height: none;
    }

    .hero-image-grid {
        max-width: 380px;
        margin: 0 auto;
        gap: 10px;
        max-height: none;
    }

    .hero-image-item {
        border-radius: 10px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 4px 16px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
        padding-top: 30px;
    }

    .hero-stat-item .stat-number {
        font-size: 1.8rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 28px 20px;
    }

    .service-card .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    /* Statistics */
    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-item {
        padding: 16px;
    }

    .stat-item .stat-number {
        font-size: 2rem;
    }

    .stat-item .stat-suffix {
        font-size: 1.1rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        order: -1;
    }

    .about-image .about-experience-badge {
        width: 80px;
        height: 80px;
        bottom: -5px;
        right: -5px;
    }

    .about-image .about-experience-badge span:first-child {
        font-size: 1.3rem;
    }

    .about-image .about-experience-badge span:last-child {
        font-size: 0.6rem;
    }

    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .team-card {
        padding: 24px 16px;
    }

    .team-card .team-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 30px;
    }

    .timeline-item {
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -27px;
        width: 10px;
        height: 10px;
    }

    /* News */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-card .news-card-image {
        height: 180px;
    }

    /* FAQ */
    .faq-list {
        gap: 8px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .faq-answer p {
        padding: 0 16px 14px;
        font-size: 0.85rem;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-form-wrapper {
        padding: 24px 20px;
    }

    .contact-info-wrapper {
        padding: 24px 20px;
    }

    .contact-info-item {
        gap: 12px;
    }

    .contact-info-item .contact-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
    }

    .contact-social {
        flex-wrap: wrap;
    }

    /* Footer */
    .site-footer {
        padding: 40px 0 0;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-bottom: 30px;
    }

    .site-footer .footer-brand {
        grid-column: 1;
    }

    .site-footer .footer-col h4 {
        margin-bottom: 12px;
    }

    .site-footer .footer-col ul li {
        margin-bottom: 8px;
    }

    .site-footer .site-footer .footer-social {
        flex-wrap: wrap;
    }

    .footer-bottom {
        padding: 16px 0;
    }

    /* Buttons */
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 14px 32px;
        font-size: 1rem;
    }

    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* ---------- 小手机 575px以下 ---------- */
@media (max-width: 575px) {
    :root {
        --nav-height: 54px;
        --nav-height-scrolled: 46px;
    }

    .container {
        padding: 0 14px;
    }

    .entity-info dl {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .entity-info dt {
        padding: 12px 0 4px;
        border-bottom: none;
    }

    .entity-info dd {
        padding: 4px 0 12px;
    }

    .page-banner-space {
        padding: 100px 0 60px;
        min-height: 220px;
    }

    .page-banner-space .banner-content h1 {
        font-size: 1.8rem;
    }

    .page-banner-space .banner-content p {
        font-size: 0.95rem;
    }

    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.05rem; }
    h4 { font-size: 0.95rem; }

    .section-padding {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 28px;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    /* Navigation */
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-brand .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .navbar-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 14px;
        gap: 2px;
        border-bottom: 1px solid rgba(37, 99, 235, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .navbar-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu a {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .navbar-menu a::after {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-toggle span {
        width: 22px;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 90px 0 50px;
    }

    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
    }

    .hero-image-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 320px;
        margin: 0 auto;
        gap: 10px;
    }

    .hero-image-item {
        border-radius: 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 4px 14px;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        margin-top: 32px;
        padding-top: 24px;
    }

    .hero-stat-item .stat-number {
        font-size: 1.6rem;
    }

    .hero-stat-item .stat-label {
        font-size: 0.8rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-card {
        padding: 24px 18px;
    }

    .service-card .service-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 14px;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    /* Statistics */
    .statistics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-item {
        padding: 14px 10px;
    }

    .stat-item .stat-number {
        font-size: 1.6rem;
    }

    .stat-item .stat-suffix {
        font-size: 0.95rem;
    }

    .stat-item .stat-label {
        font-size: 0.8rem;
    }

    .stat-item .stat-desc {
        font-size: 0.75rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-image {
        order: -1;
    }

    .about-image .about-experience-badge {
        width: 70px;
        height: 70px;
        bottom: -5px;
        right: -5px;
    }

    .about-image .about-experience-badge span:first-child {
        font-size: 1.1rem;
    }

    .about-image .about-experience-badge span:last-child {
        font-size: 0.5rem;
    }

    .about-text .about-features li {
        font-size: 0.85rem;
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .team-card {
        padding: 20px 12px;
    }

    .team-card .team-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }

    .team-card .team-role {
        font-size: 0.75rem;
    }

    .team-card .team-bio {
        font-size: 0.75rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 11px;
    }

    .timeline-item {
        padding-left: 16px;
        margin-bottom: 28px;
    }

    .timeline-item::before {
        left: -22px;
        width: 8px;
        height: 8px;
        border-width: 2px;
    }

    .timeline-item .timeline-date {
        font-size: 0.75rem;
    }

    .timeline-item p {
        font-size: 0.8rem;
    }

    /* News */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .news-card .news-card-image {
        height: 160px;
    }

    .news-card .news-body {
        padding: 16px;
    }

    .news-card .news-body h3 {
        font-size: 1rem;
    }

    .news-card .news-body p {
        font-size: 0.85rem;
    }

    /* FAQ */
    .faq-list {
        gap: 8px;
    }

    .faq-question {
        padding: 12px 14px;
        font-size: 0.85rem;
        gap: 10px;
    }

    .faq-question .faq-icon {
        width: 20px;
        height: 20px;
        font-size: 1rem;
    }

    .faq-answer p {
        padding: 0 14px 12px;
        font-size: 0.8rem;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-form-wrapper {
        padding: 20px 16px;
    }

    .contact-info-wrapper {
        padding: 20px 16px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .contact-info > p {
        margin-bottom: 20px;
    }

    .contact-info-item {
        gap: 10px;
        margin-bottom: 16px;
    }

    .contact-info-item .contact-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
    }

    .contact-info-item h4 {
        font-size: 0.9rem;
    }

    .contact-info-item p {
        font-size: 0.8rem;
    }

    .contact-social {
        flex-wrap: wrap;
        gap: 8px;
    }

    .contact-social a {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    /* Footer */
    .site-footer {
        padding: 32px 0 0;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 24px;
    }

    .site-footer .footer-brand .footer-logo {
        font-size: 1.2rem;
    }

    .site-footer .footer-brand p {
        font-size: 0.8rem;
        max-width: 100%;
    }

    .site-footer .footer-col h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .site-footer .footer-col ul li {
        margin-bottom: 6px;
    }

    .site-footer .footer-col ul li a {
        font-size: 0.8rem;
    }

    .site-footer .footer-social a {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .site-footer .footer-bottom p {
        font-size: 0.75rem;
    }

    /* Buttons */
    .btn {
        padding: 9px 20px;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 6px 16px;
        font-size: 0.8rem;
    }

    /* Back to top */
    .back-to-top {
        width: 36px;
        height: 36px;
        bottom: 16px;
        right: 16px;
        font-size: 0.9rem;
    }

    /* Animations - disable on mobile for performance */
    .hero-particle {
        display: none;
    }

    .hero-grid-bg {
        background-size: 40px 40px;
    }
}

/* ---------- 横屏手机 ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-stats {
        margin-top: 24px;
        padding-top: 16px;
    }
}

/* ---------- 打印样式 ---------- */
@media print {
    .navbar,
    .back-to-top,
    .hero-particles,
    .hero-grid-bg {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .section-padding {
        padding: 30px 0;
    }

    .service-card,
    .team-card,
    .news-card,
    .faq-item,
    .contact-form {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}