/* 
 * 云南震序律师事务所网站 - 关于我们页面响应式样式
 */

@media screen and (max-width: 768px) {
    /* 统一所有段落的标题样式 */
    section .container h2,
    .section-header h2 {
        text-align: center !important;
        font-size: 28px !important;
        margin-bottom: 5px !important;
        font-weight: bold !important;
        letter-spacing: 1px !important;
    }
    
    /* 显示移动端换行 */
    .mobile-only {
        display: block !important;
    }
    
    /* 统一所有段落的英文标题样式 */
    section .container > div:first-child p,
    .section-header p {
        text-align: center !important;
        font-size: 16px !important;
        letter-spacing: 1px !important;
        margin-bottom: 25px !important;
        text-indent: 0 !important;
    }
    
    /* 副标题样式 */
    section .container h3,
    .section-header h3 {
        text-align: center !important;
        font-size: 24px !important;
        letter-spacing: 3px !important;
        margin-bottom: 10px !important;
        font-weight: bold !important;
        line-height: 1.2 !important;
    }

    /* 内容块标题居中 */
    .content-blocks h4 {
        color: #002B70 !important;
        font-size: 24px !important;
        font-weight: bold !important;
        margin-bottom: 15px !important;
        text-align: center !important;
        letter-spacing: 1px !important;
    }

    /* 正文段落样式 */
    .content-blocks p {
        font-size: 14px !important;
        line-height: 1.8 !important;
        text-indent: 2em !important;
        margin-bottom: 15px !important;
    }
    
    /* 通用容器适配 */
    .container {
        width: 100% !important;
    }

    /* 内容块边距和段落样式适配 */
    .content-blocks {
        padding: 0 10px !important;
    }
    .content-blocks p:not(.section-header p),
    .intro-block p,
    .service-block p,
    .experience-block p,
    .team-block p,
    .mission-block p {
        text-align: justify !important;
        text-indent: 2em !important;
        margin: 0 0 15px 0 !important;
        font-size: 14px !important;
        line-height: 1.8 !important;
        letter-spacing: 1px !important;
        font-weight: 500 !important;
    }
    
    /* 标题英文不缩进 */
    .section-header p,
    .banner-text p {
        text-indent: 0 !important;
    }
    
    /* 顶部banner适配 */
    .about-banner {
        height: 600px !important;
        margin-top: 60px !important;
        position: relative !important;
    }
    .about-banner::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)) !important;  /* 使用渐变遮罩 */
    }
    .about-banner .banner-text {
        text-align: center !important;
        padding: 0 15px !important;
        position: absolute !important;
        top: 45%; /* Start point for vertical centering */
        left: 0;
        width: 100%;
        z-index: 2 !important;
        transform: translateY(-50%); 
        /* transform-origin: initial; /* No longer needed without scale */
    }

    /* Adjust H1 styles for mobile (applies to all H1s by default) */
    .banner-text h1 {
        font-size: 36px !important; 
        line-height: 1.4 !important; 
        margin-bottom: 20px !important; 
    }

    /* Specifically make the first H1 larger */
    .banner-text h1:first-of-type {
        font-size: 48px !important; /* Increased size for the first H1 only */
    }

    /* Adjust P styles for mobile */
    .banner-text p {
        font-size: 14px !important; 
        line-height: 1.8 !important; 
        margin-bottom: 8px !important; 
        text-shadow: 2px 2px 6px rgba(0,0,0,0.8) !important;
        font-weight: 500 !important;
    }

    /* Show mobile break on mobile */
    .banner-text .mobile-break {
        display: block !important;
    }

    /* 震序所训部分适配 */
    .mission-section {
        height: auto !important;
        padding: 40px 0 !important; /* Add vertical padding */
    }
    .mission-section .container {
        padding: 0 10px !important; 
    }
    .mission-section .row {
        flex-direction: column !important;
        height: auto !important;
        margin: 0 !important;
    }
    
    /* Ensure columns take full width and center content */
    .mission-section .col-md-6 {
        width: 90% !important;
        margin-bottom: 30px; /* Add space below the first image */
        padding: 0 !important; /* Reset padding if needed */
        text-align: center; /* Center the image block */
    }
    .mission-section .col-md-6:last-child {
        margin-bottom: 0 !important;
    }

    /* Style BOTH images within the columns */
    .mission-section .col-md-6 img {
        max-width: 90% !important; /* Ensure images are responsive */
        height: auto !important; /* Maintain aspect ratio */
        margin: 0 auto !important; /* Center images horizontally */
        display: inline-block !important; /* Allow text-align center to work */
        /* Removed max-height constraint */
    }

    /* 关于震序介绍部分适配 */
    .about-intro-section {
        height: auto !important;
        padding: 40px 0 !important; /* Keep section padding */
    }
    
    /* Reduce container top padding specifically for mobile */
    .about-intro-section .container {
        padding-top: 0 !important; /* Remove container top padding on mobile */
    }
    
    .about-intro-section .section-header {
        margin-bottom: 20px !important; 
    }
    .about-intro-section .honors {
        text-align: center !important;
        padding: 0 10px !important;
        margin-top: 0 !important;  /* 移除负边距 */
    }
    .about-intro-section .honors h3 {
        font-size: 24px !important;
        font-weight: bold !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
        letter-spacing: 2px !important;
        text-align: center !important;
        color: #F4AD03 !important;
    }
    .about-intro-section .honors h3:last-child {
        margin-bottom: 15px !important;
    }

    /* 震序荣誉证书展示部分适配 */

    .honor-section .container {
        height: 100%;
        padding-top: 0px;
    }


    .honor-section {
        height: auto !important;
        padding: 40px 0 !important;
    }
    
    /* 荣誉部分样式 - 简化优化后的选择器 */
    /* 主标题样式 */
    .honor-section h2,
    .honor-section h2 span,
    .service-unit-section h2,
    .service-unit-section h2 span {
        font-size: 28px !important;
        font-weight: bold !important;
        text-align: center !important;
        letter-spacing: 1px !important;
        margin-bottom: 0px !important; /* Remove space below H2 */
        line-height: 1.3 !important; /* Ensure reasonable line height */
    }
    
    /* 副标题样式 */
    .honor-section h3,
    .honor-section h3 span,
    .service-unit-section h3,
    .service-unit-section h3 span {
        font-size: 16px !important;
        font-weight: bold !important;
        text-align: center !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 5px !important;
        line-height: 1.3 !important;
        /* color: #ffffff !important; /* Honor section only? Keep service unit yellow */
    }
    
    /* 英文标题样式 */
    .honor-section h2 + p, 
    /* Assuming SERVICE UNIT is P after H2. If not, adjust selector */
    .service-unit-section .section-header > p:first-of-type 
     {
        font-size: 16px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        letter-spacing: 0.5px !important;
        margin-top: 4px !important; /* Small space above */
        margin-bottom: 20px !important; /* Increased space below */
        font-weight: normal !important;
        text-indent: 0 !important;
        margin-top: 0 !important; /* Ensure close to H2 above */
        /* color might need adjustment per section */
    }

    /* H3 / H4 (Yellow Chinese Title) */
    .honor-section h3,
    .honor-section h3 span,
    .service-unit-section h4 span[style*="font-size: 48px"] 
     {
        font-size: 16px !important;
        font-weight: bold !important; /* Re-apply bold if needed */
        text-align: center !important;
        letter-spacing: 0.5px !important;
        /* margin-bottom is handled by the container H4 rule below */
        line-height: 1.3 !important;
    }
    /* Ensure H4 container has the reduced margin */
     .service-unit-section h4:has(> span[style*="font-size: 48px"]) {
         margin-bottom: 0px !important; /* Remove space below H4 */
         /* Also apply H3 styles if H4 should look like H3 */
         font-size: 16px !important; 
         font-weight: bold !important; 
         line-height: 1.3 !important;
     }
     /* Need separate rule for honor h3 margin */
     .honor-section h3 {
          margin-bottom: 0px !important; /* Remove space below H3 */
          line-height: 1.3 !important; 
     }


    /* P (Second English subtitle directly after Yellow Chinese H3/H4) */
    .honor-section h3 + p, 
    .service-unit-section h4 + p 
     {
        font-size: 16px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        letter-spacing: 0.5px !important;
        margin-top: 4px !important; /* Small space above */
        margin-bottom: 25px !important; /* Further increased space below */
        font-weight: normal !important;
        text-indent: 0 !important;
        line-height: 1.4 !important; 
    }

    /* Ensure last p or h4 in service unit header has more space before logos */
    .service-unit-section .section-header > p:last-of-type,
    .service-unit-section h4:last-of-type /* Assuming H4 is the last title element */
     {
         margin-bottom: 15px !important; /* Space before logos */
    }
    
    /* 确保所有内联样式都被覆盖 */
    .honor-section [style] {
        font-size: inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
        letter-spacing: inherit !important;
        text-align: center !important;
    }
    .certificates-grid { /* Keep existing grid styles */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }

    
    
    /* Ensure logo style remains untouched */
    .logo-showcase {
        margin-top: 30px !important;
        padding: 0 10px !important;
    }
    
    /* Logo visibility control */
    .service-logo-desktop {
        display: none !important; /* Hide desktop logo on mobile */
    }
    .service-logo-mobile {
        display: block !important; /* Show mobile logo on mobile */
        max-width: 100%; /* Ensure mobile logo is responsive */
        height: auto;
        margin: 0 auto; /* Center mobile logo */
    }

    /* 滚动箭头适配 */
    .scroll-down {
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* 为 H2 添加字间距 */
    h2 {
        letter-spacing: 1px !important;
    }

    /* Set fixed height and vertical centering for service unit section header - Keep this block */
    .service-unit-section .section-header { 
        /* Removed fixed height and flex centering to allow natural flow */
        /* height: 160px !important; */ 
        /* display: flex !important; */
        /* flex-direction: column !important; */
        /* justify-content: center !important; */
        text-align: center !important; 
        margin-bottom: 0px !important; /* Resetting this as individual elements have margins */
    }

    /* --- Service Unit Section Title Scaling & Spacing - REMOVING THESE SPECIFIC RULES --- */
    /* Removed .service-unit-section h2 rules */
    /* Removed .service-unit-section .section-header > p:first-of-type rules */
    /* Removed .service-unit-section h3 rules */
    /* Removed .service-unit-section h3 + p rules */
    
    /* ... other existing styles like .honor-section ... */
    
    /* 为 H2 添加字间距 (This general rule might conflict, let general H2 rule handle it) */
    /* h2 {
        letter-spacing: 1px !important;
    } */

    /* Force override inline style for the specific yellow span */
    /* Targets a span with style attribute containing 'font-size: 48px' inside h4 */
    .service-unit-section h4 span[style*="font-size: 48px"] { 
        font-size: 28px !important; /* Override inline style */
        line-height: 1.3 !important; /* Apply consistent line-height */
        letter-spacing: 0.5px !important; /* Apply consistent letter-spacing */
        /* color: #F4AD03 !important; */ /* Keep inline color for now */
    }

    /* Adjust margin-bottom for the h4 containing this span if needed */
     .service-unit-section h4:has(> span[style*="font-size: 48px"]) {
         margin-bottom: 5px !important; /* Ensure consistent margin */
     }
     
    /* Ensure last h4 (if it's this one) has more space before logos */
    .service-unit-section h4:last-of-type:has(> span[style*="font-size: 48px"]) {
        margin-bottom: 15px !important; /* Space before logos */
    }

    /* Override inline padding-top for service unit container */
    .service-unit-section .container {
        padding-top: 30px !important; /* Override potential inline style */
        /* height: auto !important; /* Consider resetting height too */
    }

    /* 荣誉模态框响应式样式调整 */
    .honor-modal {
        padding-top: 20px; /* 移动端顶部内边距稍小 */
    }
    
    .honor-modal-container {
        max-width: 95%;
    }
    
    .honor-modal-image {
        max-width: 100%;
        max-height: 75vh; /* 移动端进一步减小高度 */
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    }
    
    .honor-modal-close {
        top: -30px;
        right: -10px;
        font-size: 28px;
    }
    
    /* 证书图片网格响应式 */
    .certificates-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 移动端每行2张图片 */
        grid-gap: 15px;
        padding: 0 10px;
    }
    
    .certificate-img {
        width: 100%;
        height: auto;
    }
}
