/* ========================================
   长春一六三漏水检测 - 主样式表
   百度SEO优化 + 响应式设计
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary: #0d47a1;
    --accent: #ff6d00;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #f5f7fa;
    --white: #fff;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: all 0.3s ease;
}
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ========== Top Bar ========== */
.top-bar {
    background: var(--secondary);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-contact { font-weight: 600; color: #fff; }

/* ========== Header ========== */
.header {
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 100;
}
.header .container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; padding-bottom: 12px;
}
.logo h1, .logo .logo-text {
    font-size: 24px; color: var(--primary); font-weight: 700; line-height: 1.2;
}
.logo .slogan {
    font-size: 12px; color: var(--text-light); margin-top: 2px;
}
.nav ul { display: flex; gap: 4px; }
.nav ul li a {
    display: block; padding: 8px 18px; color: var(--text); font-size: 15px;
    border-radius: 4px; font-weight: 500;
}
.nav ul li a:hover, .nav ul li a.active {
    color: var(--primary); background: var(--primary-light);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ========== Hero Banner ========== */
.hero {
    position: relative; background: linear-gradient(135deg, #0d47a1 0%, #1976d2 50%, #42a5f5 100%);
    min-height: 400px; display: flex; align-items: center; color: #fff;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; padding: 60px 0; }
.hero-content h2 {
    font-size: 36px; font-weight: 700; margin-bottom: 16px; line-height: 1.3; max-width: 700px;
}
.hero-content p {
    font-size: 18px; opacity: 0.9; margin-bottom: 30px; max-width: 600px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* ========== Hero Slider ========== */
.hero-slider {
    position: relative; height: 450px; overflow: hidden;
}
.hero-slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    display: none;
}
.hero-slide::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
}
.hero-slide.active { display: flex; align-items: center; justify-content: center; }
.hero-slide .hero-content { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.slider-prev, .slider-next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: rgba(255,255,255,0.2); border: none; color: #fff;
    width: 44px; height: 44px; border-radius: 50%; font-size: 18px;
    cursor: pointer; transition: var(--transition); display: flex;
    align-items: center; justify-content: center;
}
.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,0.4); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }
.slider-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; gap: 10px;
}
.slider-dots .dot {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4);
    cursor: pointer; transition: var(--transition);
}
.slider-dots .dot.active { background: #fff; }
.btn {
    display: inline-block; padding: 12px 30px; border-radius: 6px; font-size: 15px;
    font-weight: 500; cursor: pointer; transition: var(--transition); text-align: center; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #e65100; color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-danger { background: #d32f2f; color: #fff; }
.btn-danger:hover { background: #b71c1c; }
.btn-success { background: #2e7d32; color: #fff; }
.btn-success:hover { background: #1b5e20; }

/* ========== Section Common ========== */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h1, .section-header h2 {
    font-size: 30px; font-weight: 700; color: var(--text); margin-bottom: 12px; position: relative;
    display: inline-block;
}
.section-header h1::after, .section-header h2::after {
    content: ''; display: block; width: 50px; height: 3px; background: var(--primary);
    margin: 12px auto 0; border-radius: 2px;
}
.section-header p { color: var(--text-light); font-size: 15px; max-width: 600px; margin: 0 auto; }
.section-bg { background: var(--white); }

/* ========== Features on Home ========== */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
    text-align: center; background: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition);
    overflow: hidden;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.feature-card-img {
    width: 100%; height: 180px; overflow: hidden;
}
.feature-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.feature-card:hover .feature-card-img img { transform: scale(1.05); }
.feature-card-body { padding: 20px; }
.feature-card-body h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card-body p { color: var(--text-light); font-size: 14px; }

/* ========== About Preview ========== */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-preview .about-text h3 { font-size: 26px; margin-bottom: 16px; color: var(--text); }
.about-preview .about-text p { color: var(--text-light); margin-bottom: 12px; line-height: 1.9; }
.about-image { border-radius: var(--radius); overflow: hidden; min-height: 300px; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }

/* ========== Services Grid ========== */
.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.service-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(26,115,232,0.12); }
.service-card-img {
    width: 100%; height: 200px; overflow: hidden;
}
.service-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-body {
    padding: 20px 24px; flex: 1; display: flex; flex-direction: column;
}
.service-card-body h3 { font-size: 18px; margin-bottom: 10px; }
.service-card-body p { color: var(--text-light); font-size: 14px; flex: 1; }

/* ========== News List ========== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.news-card-img {
    width: 100%; height: 200px; overflow: hidden;
}
.news-card-img img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 16px; margin-bottom: 10px; line-height: 1.5; }
.news-card-body h3 a { color: var(--text); }
.news-card-body h3 a:hover { color: var(--primary); }
.news-card-body .meta { font-size: 12px; color: var(--text-lighter); margin-bottom: 8px; }
.news-card-body .meta span { margin-right: 12px; }
.news-card-body p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ========== Sidebar Layout (News/Services pages) ========== */
.page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }
.page-main { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.page-sidebar > * { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.page-sidebar h3 { font-size: 17px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.page-sidebar ul li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.page-sidebar ul li:last-child { border-bottom: none; }
.page-sidebar ul li a { color: var(--text); font-size: 14px; display: block; }
.page-sidebar ul li a:hover { color: var(--primary); }
.page-sidebar ul li .date { font-size: 12px; color: var(--text-lighter); display: block; }

/* ========== Breadcrumb ========== */
.breadcrumb {
    padding: 12px 0; font-size: 13px; color: var(--text-light);
    background: var(--white); border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-lighter); }

/* ========== Page Content ========== */
.page-content h1 { font-size: 26px; margin-bottom: 16px; }
.page-content h2 { font-size: 22px; margin: 24px 0 12px; }
.page-content h3 { font-size: 18px; margin: 20px 0 10px; }
.page-content p { margin-bottom: 14px; line-height: 1.9; }
.page-content img { margin: 16px 0; border-radius: var(--radius); }
.page-content ul, .page-content ol { padding-left: 20px; margin-bottom: 14px; }
.page-content ul li { list-style: disc; margin-bottom: 6px; }
.page-content ol li { list-style: decimal; margin-bottom: 6px; }

/* ========== News Detail ========== */
.news-detail-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.news-detail-header h1 { font-size: 24px; line-height: 1.4; }
.news-detail-header .meta { font-size: 13px; color: var(--text-lighter); margin-top: 10px; }
.news-detail-header .meta span { margin-right: 16px; }
.news-detail-nav { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 14px; }

/* ========== Contact Page ========== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-info { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info h2 { margin-bottom: 20px; }
.contact-info-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.contact-info-item .icon {
    width: 40px; height: 40px; background: var(--primary-light);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--primary); flex-shrink: 0; font-size: 16px;
}
.contact-info-item .info h4 { font-size: 15px; margin-bottom: 4px; }
.contact-info-item .info p { font-size: 14px; color: var(--text-light); }

.contact-form { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; font-family: inherit; transition: var(--transition);
    background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 50px 0; text-align: center; color: #fff;
}
.cta-section h2 { font-size: 28px; margin-bottom: 12px; }
.cta-section p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; }
.cta-section .btn { font-size: 16px; padding: 14px 36px; }

/* ========== Footer ========== */
.footer { background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-col h3 { color: #fff; font-size: 17px; margin-bottom: 16px; }
.footer-col p { font-size: 14px; line-height: 1.8; margin-bottom: 8px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-col i { margin-right: 6px; color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; margin-top: 40px; text-align: center; font-size: 13px; }

/* ========== Pagination ========== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 14px; border-radius: 4px; font-size: 14px; border: 1px solid var(--border); color: var(--text); }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========== Success/Error messages ========== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ========== Statistics Counter Section ========== */
.stats-section {
    background: var(--white);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.stat-card {
    text-align: center;
    padding: 45px 24px 35px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(180deg, rgba(26,115,232,0.04) 0%, transparent 100%);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(26,115,232,0.14);
}
.stat-card .stat-icon {
    font-size: 38px;
    color: var(--primary);
    margin-bottom: 18px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}
.stat-card .stat-number {
    font-size: 44px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.2;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}
.stat-card .stat-label {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========== Why Us ========== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { text-align: center; padding: 24px 20px; }
.why-card .icon {
    font-size: 36px; color: var(--primary); margin-bottom: 12px;
}
.why-card h4 { font-size: 16px; margin-bottom: 8px; }

/* ========== Admin Styles ========== */
.admin-login {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0d47a1, #1976d2);
}
.admin-login-box {
    background: #fff; padding: 40px; border-radius: 12px; width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.admin-login-box h1 { text-align: center; font-size: 22px; margin-bottom: 8px; color: var(--text); }
.admin-login-box .subtitle { text-align: center; font-size: 13px; color: var(--text-lighter); margin-bottom: 24px; }
.admin-login-box .btn { width: 100%; padding: 12px; font-size: 16px; }

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #1a1a2e; color: #fff; position: fixed;
    top: 0; left: 0; bottom: 0; overflow-y: auto;
}
.admin-sidebar .sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar .sidebar-header h2 { font-size: 17px; color: #fff; }
.admin-sidebar .sidebar-nav { padding: 12px 0; }
.admin-sidebar .sidebar-nav a {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    color: rgba(255,255,255,0.65); font-size: 14px; transition: var(--transition);
}
.admin-sidebar .sidebar-nav a:hover, .admin-sidebar .sidebar-nav a.active {
    background: rgba(255,255,255,0.08); color: #fff;
}
.admin-sidebar .sidebar-nav a i { width: 18px; text-align: center; }
.admin-main {
    margin-left: 220px; flex: 1; padding: 24px; background: #f0f2f5; min-height: 100vh;
}
.admin-main .page-title { font-size: 20px; margin-bottom: 20px; color: var(--text); }
.admin-card {
    background: #fff; border-radius: var(--radius); padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.admin-card h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg); font-weight: 600; color: var(--text); }
.admin-table tr:hover td { background: var(--primary-light); }
.admin-table .actions a { margin-right: 8px; font-size: 13px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat-card {
    background: #fff; padding: 20px; border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center;
}
.admin-stat-card .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.admin-stat-card .lbl { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.admin-toolbar input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; width: 200px; }

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-preview { grid-template-columns: 1fr; }
    .page-layout { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav ul { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; box-shadow: var(--shadow); }
    .nav.open ul { display: flex; }
    .nav ul li a { padding: 12px 20px; }
    .nav-toggle { display: flex; }
    .hero-content h2 { font-size: 26px; }
    .hero-content p { font-size: 15px; }
    .hero { min-height: 320px; }
    .hero-slider { height: 320px; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 24px; }
    .features-grid, .services-grid, .news-grid, .stats-grid, .why-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-sidebar { width: 180px; }
    .admin-main { margin-left: 180px; }
    .admin-dashboard-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
    .hero-slider { height: 250px; }
    .admin-sidebar { width: 60px; }
    .admin-sidebar .sidebar-header h2, .admin-sidebar .sidebar-nav a span { display: none; }
    .admin-sidebar .sidebar-nav a { justify-content: center; padding: 12px; }
    .admin-main { margin-left: 60px; }
}
