/* 智涯千问·LawMate 官网样式 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量 */
:root {
    --primary-color: #FF6D00;
    --secondary-color: #0d3570;
    --text-dark: #0f1b2c;
    --text-light: #6b7280;
    --bg-light: #f4f6fb;
    --bg-white: #ffffff;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

/* ==================== 版面1：项目介绍 ==================== */
.section-1 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0d3570 0%, #123a6b 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.section-1-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d3570 0%, #123a6b 100%);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    border: none;
    outline: none;
    filter: none;
    mix-blend-mode: normal;
    border-radius: 50%;
}

.section-1 h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.section-1 .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.section-1 .description {
    margin-bottom: 3rem;
    text-align: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.desc-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: nowrap;
}

.desc-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.desc-block-left {
    text-align: right;
    align-items: flex-end;
}

.desc-block-right {
    text-align: left;
    align-items: flex-start;
}

.desc-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
}

.desc-line-item {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 1);
    line-height: 1.8;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc-line-item strong {
    font-weight: 700;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 1);
}

.desc-divider-line {
    width: 1px;
    height: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    align-self: stretch;
    margin: 0 1rem;
}

.desc-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0rem;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.tag-button {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tag-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tag-divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator::before {
    content: '↓';
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==================== 版面2：入口区域 ==================== */
.section-2 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
}

.section-2-content {
    max-width: 1200px;
    width: 100%;
}

.section-2 h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 3rem;
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: stretch;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.entries-grid .entry-card:nth-child(4),
.entries-grid .entry-card:nth-child(5),
.entries-grid .entry-card:nth-child(6) {
    grid-column: span 1;
    max-width: 400px;
    margin: 0 auto;
}

.entry-card {
    background: var(--bg-white);
    border: none;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 380px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.entry-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.entry-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.entry-card h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
    line-height: 1.5;
    font-weight: 600;
}

.entry-card h3 .title-break {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.entry-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin: 1rem auto;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: white;
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 小程序二维码弹窗样式 */
.miniprogram-modal .modal-content {
    text-align: center;
}

.miniprogram-modal .qr-code {
    display: flex;
    width: 250px;
    height: 250px;
    margin: 1.5rem auto;
}

.miniprogram-modal h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.miniprogram-modal p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.entry-button {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    width: fit-content;
    flex-shrink: 0;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.entry-card:hover .entry-button {
    background: #ff8a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 109, 0, 0.3);
}

/* ==================== 底部版权 ==================== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-content a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-content a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==================== 弹窗样式 ==================== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item strong {
    color: var(--secondary-color);
    font-size: 1rem;
}

.contact-qr {
    width: 200px;
    height: 200px;
    margin: 0.5rem auto 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: white;
}

.contact-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== 滚动动画 ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 响应式 ==================== */
/* 平板设备 (768px - 1200px) */
@media (max-width: 1200px) and (min-width: 768px) {
    .entries-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .entries-grid .entry-card:nth-child(4),
    .entries-grid .entry-card:nth-child(5),
    .entries-grid .entry-card:nth-child(6) {
        max-width: 100%;
    }
}

/* 移动设备 (<= 768px) */
@media (max-width: 768px) {
    .section-1 h1 {
        font-size: 2rem;
    }

    .section-1 .subtitle {
        font-size: 1.2rem;
    }

    .desc-row {
        flex-direction: column;
        gap: 2rem;
    }

    .desc-block {
        max-width: 100%;
        text-align: center !important;
        align-items: center !important;
    }

    .desc-block-left .desc-text-wrapper,
    .desc-block-right .desc-text-wrapper {
        flex-direction: row;
        justify-content: center;
    }

    .desc-block-left .desc-text,
    .desc-block-right .desc-text {
        text-align: center !important;
    }

    .section-1 .description {
        font-size: 1rem;
    }

    .entries-grid {
        grid-template-columns: 1fr;
    }

    .entries-grid .entry-card:nth-child(4),
    .entries-grid .entry-card:nth-child(5),
    .entries-grid .entry-card:nth-child(6) {
        max-width: 100%;
        margin: 0;
    }

    .entry-card {
        min-height: auto;
    }

    .section-2 h2 {
        font-size: 2rem;
    }

    .footer-content p {
        font-size: 0.85rem;
    }
}
