/* 安心心理医院网站响应式设计 */

/* 超大屏幕 (超大桌面，1400px 及以上) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .display-4 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        min-height: 90vh;
    }
    
    .expert-avatar {
        width: 140px;
        height: 140px;
    }
}

/* 大屏幕 (大桌面，1200px 到 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .display-4 {
        font-size: 2.75rem;
    }
    
    .display-5 {
        font-size: 2.25rem;
    }
    
    .hero-section {
        min-height: 95vh;
    }
}

/* 中等屏幕 (桌面，992px 到 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 100vh;
    }
    
    .expert-avatar {
        width: 110px;
        height: 110px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 1.75rem !important;
    }
}

/* 小屏幕 (平板，768px 到 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    .display-5 {
        font-size: 1.875rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-height: 400px;
    }
    
    .expert-avatar {
        width: 100px;
        height: 100px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem !important;
    }
    
    .service-card {
        padding: 2rem !important;
    }
    
    .expert-card {
        padding: 2rem !important;
    }
    
    .case-card {
        margin-bottom: 2rem;
    }
    
    .award-card {
        padding: 2rem !important;
    }
    
    .partner-logo {
        height: 80px;
        padding: 0.75rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .services-section .row.g-4 {
        row-gap: 2rem !important;
    }
    
    .experts-section .carousel-item .row.g-4 {
        row-gap: 2rem !important;
    }
    
    .cases-section .row.g-4 {
        row-gap: 2rem !important;
    }
    
    .awards-section .row.g-4 {
        row-gap: 2rem !important;
    }
    
    .partners-section .row.g-4 {
        row-gap: 2rem !important;
    }
}

/* 超小屏幕 (手机，576px 到 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.375rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-height: 300px;
    }
    
    .stats-section .row.text-center {
        row-gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-item h3 {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 1rem !important;
    }
    
    .service-icon i {
        font-size: 1.25rem !important;
    }
    
    .expert-card {
        padding: 1.5rem !important;
    }
    
    .expert-avatar {
        width: 80px;
        height: 80px;
    }
    
    .case-card {
        margin-bottom: 1.5rem;
    }
    
    .case-image {
        height: 150px !important;
    }
    
    .award-card {
        padding: 1.5rem !important;
    }
    
    .award-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .partner-logo {
        height: 70px;
        padding: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius) !important;
        margin-bottom: 0.5rem;
    }
    
    .footer .row.g-4 {
        row-gap: 2rem !important;
    }
    
    .footer h5, .footer h6 {
        margin-bottom: 1rem;
    }
    
    .social-links {
        text-align: center;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.75rem;
    }
    
    .services-section .row.g-4 {
        row-gap: 1.5rem !important;
    }
    
    .experts-section .carousel-item .row.g-4 {
        row-gap: 1.5rem !important;
    }
    
    .cases-section .row.g-4 {
        row-gap: 1.5rem !important;
    }
    
    .awards-section .row.g-4 {
        row-gap: 1.5rem !important;
    }
    
    .partners-section .row.g-4 {
        row-gap: 1.5rem !important;
    }
}

/* 超小屏幕 (小手机，小于 576px) */
@media (max-width: 575px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-4 {
        font-size: 1.875rem;
    }
    
    .display-5 {
        font-size: 1.625rem;
    }
    
    .display-6 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-image {
        margin-top: 1.5rem;
    }
    
    .hero-image img {
        max-height: 250px;
    }
    
    .stats-section {
        padding: 2rem 0 !important;
    }
    
    .stats-section .row.text-center {
        row-gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .stat-item p {
        font-size: 1rem;
    }
    
    .services-section {
        padding: 2rem 0 !important;
    }
    
    .services-section .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .service-card {
        padding: 1.25rem !important;
        text-align: center;
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
        margin: 0 auto 0.75rem !important;
    }
    
    .service-icon i {
        font-size: 1.125rem !important;
    }
    
    .service-card h5 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: 0.875rem;
        margin-bottom: 1rem !important;
    }
    
    .experts-section {
        padding: 2rem 0 !important;
    }
    
    .experts-section .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .expert-card {
        padding: 1.25rem !important;
    }
    
    .expert-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem !important;
    }
    
    .expert-card h5 {
        font-size: 1.125rem;
    }
    
    .expert-card p {
        font-size: 0.875rem;
    }
    
    .cases-section {
        padding: 2rem 0 !important;
    }
    
    .cases-section .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .case-card {
        margin-bottom: 1rem;
    }
    
    .case-image {
        height: 120px !important;
    }
    
    .case-card h5 {
        font-size: 1.125rem;
    }
    
    .case-card p {
        font-size: 0.875rem;
    }
    
    .awards-section {
        padding: 2rem 0 !important;
    }
    
    .awards-section .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .award-card {
        padding: 1.25rem !important;
    }
    
    .award-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .award-card h6 {
        font-size: 1rem;
    }
    
    .partners-section {
        padding: 2rem 0 !important;
    }
    
    .partners-section .row.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .partner-logo {
        height: 60px;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .nav-link {
        padding: 0.5rem 0;
        font-size: 0.875rem;
        text-align: center;
    }
    
    .btn-lg {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius) !important;
        margin-bottom: 0.5rem;
    }
    
    .footer {
        padding: 2rem 0 !important;
    }
    
    .footer .row.g-4 {
        row-gap: 1.5rem !important;
    }
    
    .footer h5 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .footer h6 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .footer p, .footer a {
        font-size: 0.875rem;
    }
    
    .social-links {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        margin: 0 0.25rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-info p {
        margin-bottom: 0.5rem;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.5rem;
    }
    
    .services-section .row.g-4 {
        row-gap: 1rem !important;
    }
    
    .experts-section .carousel-item .row.g-4 {
        row-gap: 1rem !important;
    }
    
    .cases-section .row.g-4 {
        row-gap: 1rem !important;
    }
    
    .awards-section .row.g-4 {
        row-gap: 1rem !important;
    }
    
    .partners-section .row.g-4 {
        row-gap: 1rem !important;
    }
    
    .col-md-2-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* 特殊响应式处理 */

/* 横向模式 */
@media (max-width: 991px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-image img {
        max-height: 200px;
    }
}

/* 高分辨率屏幕 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .expert-avatar,
    .case-image,
    .award-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .service-card:hover,
    .expert-card:hover,
    .case-card:hover,
    .award-card:hover,
    .partner-logo:hover {
        transform: none;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn,
    .carousel-control-prev,
    .carousel-control-next,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000 !important;
        background: #fff !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .hero-section,
    .stats-section,
    .services-section,
    .experts-section,
    .cases-section,
    .awards-section,
    .partners-section {
        padding: 1rem 0 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .service-card,
    .expert-card,
    .case-card,
    .award-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
    
    .expert-avatar {
        border: 2px solid #000 !important;
    }
    
    .case-image {
        max-height: 100px !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    p {
        color: #000 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --light-color: #1e293b;
        --dark-color: #0f172a;
    }
    
    body {
        background-color: #0f172a;
        color: #f1f5f9;
    }
    
    .navbar {
        background-color: #1e293b !important;
    }
    
    .service-card,
    .expert-card,
    .case-card,
    .award-card,
    .partner-logo {
        background-color: #1e293b;
        border-color: #334155;
    }
    
    .bg-light {
        background-color: #1e293b !important;
    }
    
    .text-dark {
        color: #f1f5f9 !important;
    }
    
    .text-muted {
        color: #94a3b8 !important;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover,
    .expert-card:hover,
    .case-card:hover,
    .award-card:hover,
    .partner-logo:hover {
        transform: none !important;
        transition: none !important;
    }
    
    .carousel-item {
        transition: none !important;
    }
}