/*
 Theme Name:   ScoutVision Child
 Theme URI:    http://localhost:8080/
 Description:  ScoutVision 定制子主题
 Author:       ScoutVision Team
 Author URI:   http://localhost:8080/
 Template:     responsive
 Version:      1.0.0
*/

/* === Override parent theme === */
.site-header { z-index: 1000 !important; }

/* === Header === */
.sv-header { position: sticky; top: 0; z-index: 9999; background: #fff; border-bottom: 1px solid #eaeaea; }
body.mobile-menu-open .sv-header { position: absolute !important; }
.sv-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; flex-wrap: wrap; gap: 8px; }
.sv-logo a { display: flex; align-items: center; }
.sv-logo img { max-height: 48px; }
.sv-logo-text { font-size: 20px; font-weight: 700; color: #1B2A4A; }
.sv-nav-right { display: flex; align-items: center; gap: 24px; }

/* Language switcher */
.sv-lang-switcher { display: flex; gap: 6px; align-items: center; }
.sv-lang-switcher a { display: flex; align-items: center; gap: 4px; position: relative; padding: 4px 4px; border-radius: 4px; transition: background 0.2s; text-decoration: none !important; }
.sv-lang-switcher a:hover { background: #f3f4f6; }
.sv-lang-switcher a.current-lang { background: #1B2A4A; }
.sv-lang-switcher a.current-lang:hover { background: #243660; }
.sv-lang-switcher img { width: 16px; height: 11px; display: block; }
.sv-lang-switcher a > span { display: none; }
.sv-lang-switcher a:hover > span { display: inline-block; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; background: #1B2A4A; color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; z-index: 10000; }
.sv-lang-switcher a > span::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid #1B2A4A; }

/* Navigation */
.sv-main-nav { display: flex; align-items: center; }
.sv-main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; }
.sv-main-nav li { position: relative; }
.sv-main-nav a { padding: 8px 16px; color: #1A1A2E; font-size: 15px; display: block; transition: color 0.2s; }
.sv-main-nav a:hover { color: #2D6CDF; text-decoration: none; }
.sv-main-nav li.sv-menu-item.active > a { color: #2D6CDF; font-weight: 600; border-bottom: 2px solid #2D6CDF; }
.sv-main-nav .sub-menu { position: absolute; top: 100%; left: 0; background: #fff; border-radius: 8px; box-shadow: 0 4px 24px rgba(0,0,0,0.12); padding: 8px 0; min-width: 220px; display: none; z-index: 10000; }
.sv-main-nav li:hover > .sub-menu { display: block; }
.sv-main-nav .sub-menu a { padding: 10px 20px; font-size: 14px; }

/* === Tablet/Mobile (≤900px): collapse nav into hamburger === */
@media (max-width: 900px) {
    /* Header layout */
    .sv-header-inner { flex-wrap: nowrap; align-items: center; }
    .sv-logo { flex-shrink: 0; }
    .sv-logo img { max-height: 40px; }
    .sv-lang-switcher { flex-shrink: 0; }
    .sv-nav-right { gap: 12px; }
    .sv-nav-toggle { display: block !important; }

    /* Hide horizontal nav list + CTA by default */
    .sv-nav-right .sv-main-nav ul { display: none !important; }
    .sv-nav-right .sv-btn { display: none !important; }

    /* Mobile nav dropdown - show when active */
    .sv-nav-right.nav-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #1B2A4A;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 80px 20px 20px;
        gap: 16px;
        z-index: 99999;
        overflow-y: auto;
        display: flex !important;
    }
    .sv-nav-right.nav-open .sv-main-nav ul {
        display: flex !important;
        flex-direction: column;
        gap: 0;
    }
    .sv-nav-right.nav-open .sv-main-nav a {
        color: rgba(255,255,255,0.8);
        font-size: 17px;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .sv-nav-right.nav-open .sv-main-nav a:hover {
        color: #fff;
    }
    .sv-nav-right.nav-open .sv-main-nav li.sv-menu-item.active > a {
        color: #F59E0B;
        border-bottom-color: #F59E0B;
    }
    .sv-nav-right.nav-open .sv-btn {
        display: block !important;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
    .sv-nav-right.nav-open .sv-lang-switcher-mobile {
        display: flex !important;
        gap: 12px;
        justify-content: center;
        padding: 16px 0 8px;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 8px;
    }
}

/* Mobile nav dropdown override for small screens */
@media (max-width: 768px) {
    .sv-nav-right.nav-open { padding-top: 68px; }
    .product-subnav { top: 60px; }
}

/* Buttons */
.sv-btn { display: inline-block; padding: 12px 28px; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.2s; }
.sv-btn:hover { text-decoration: none; }
.sv-btn-primary { background: #F59E0B; color: #fff; }
.sv-btn-primary:hover { background: #d97706; }
.sv-btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.sv-btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.sv-btn-dark { background: #1B2A4A; color: #fff; }
.sv-btn-dark:hover { background: #13203f; }

/* Nav toggle (mobile) */
.sv-nav-toggle { display: none; background: none; border: none; font-size: 24px; color: #1A1A2E; cursor: pointer; }

/* === Hero === */
.hero { background: linear-gradient(135deg, #1B2A4A 0%, #2D4A7A 100%); color: #fff; padding: 100px 0; }
.hero-content { text-align: center; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 48px; font-weight: 700; margin: 0 0 20px; line-height: 1.2; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 20px; color: rgba(255,255,255,0.8); margin: 0 0 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === Trust Bar === */
.trust-bar { background: #f8f9fa; padding: 24px 0; border-bottom: 1px solid #eaeaea; }
.trust-items { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; color: #6B7280; font-size: 15px; font-weight: 500; }
.trust-icon { font-size: 20px; }

/* === Sections === */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 36px; font-weight: 700; color: #1B2A4A; margin: 0; }
.bg-light { background: #f8f9fa; }

/* === Product Grid === */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.product-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.product-card-img { height: 200px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 24px; }
.product-card-body h3 { font-size: 18px; margin: 0 0 12px; }
.product-card-body h3 a { color: #1A1A2E; }
.product-card-body h3 a:hover { color: #2D6CDF; }
.product-card-body p { color: #6B7280; font-size: 14px; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* === Features === */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.feature-card { background: #fff; border-radius: 12px; padding: 32px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; margin: 0 0 8px; color: #1B2A4A; }
.feature-card p { color: #6B7280; margin: 0; }

/* === Applications === */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app-card { background: #1B2A4A; color: #fff; border-radius: 12px; padding: 32px; display: block; transition: transform 0.2s, box-shadow 0.2s; }
.app-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(27,42,74,0.3); text-decoration: none; color: #fff; }
.app-card h3 { font-size: 20px; margin: 0 0 8px; }
.app-card p { color: rgba(255,255,255,0.7); margin: 0; font-size: 15px; }

/* === CTA Banner === */
.cta-banner { text-align: center; background: #1B2A4A; color: #fff; border-radius: 12px; padding: 60px 40px; }
.cta-banner h2 { font-size: 32px; margin: 0 0 12px; color: #fff; }
.cta-banner p { font-size: 18px; color: rgba(255,255,255,0.8); margin: 0 0 24px; }

/* === Blog Grid === */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.blog-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.blog-card-date { font-size: 13px; color: #9CA3AF; margin-bottom: 8px; }
.blog-card-body h3 { font-size: 17px; margin: 0 0 8px; }
.blog-card-body h3 a { color: #1A1A2E; }
.blog-card-body h3 a:hover { color: #2D6CDF; }
.blog-card-body p { color: #6B7280; font-size: 14px; margin: 0 0 12px; }

/* === Page Header === */
.page-header { background: #1B2A4A; color: #fff; padding: 48px 0; }
.page-header h1 { color: #fff; margin: 0 0 8px; font-size: 36px; }
.breadcrumb { font-size: 14px; color: rgba(255,255,255,0.7); }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: #fff; }

/* === Content === */
.content-area { padding: 48px 10px !important; }
.entry-content { margin-bottom: 56px; }
.entry-content h2 { margin-top: 36px; }
.entry-content h2 { text-align: center; }
.entry-content p { margin-bottom: 20px; }
.entry-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 40px 0; }
.entry-content img { border-radius: 8px; }

/* Responsive video / iframe container */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
    padding-top: 56.25%;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}
.entry-content iframe {
    width: 100%;
    max-width: 720px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
    border: none;
}
.entry-content .wp-block-embed {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 20px;
}
.entry-content a { color: #2D6CDF; }

/* Product section styling */
.product-section { text-align: center; }
.product-section .section-header { margin-bottom: 32px; }
.product-section .section-header h2 { font-size: 28px; color: #1B2A4A; }
.has-3-columns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}
.has-3-columns > .wp-block-column {
    flex: 0 0 calc(33.33% - 16px) !important;
    max-width: calc(33.33% - 16px) !important;
}
.has-1-columns {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}
.has-1-columns > .wp-block-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
.wp-block-column img { width: 100%; height: auto; border-radius: 12px; }
.wp-block-column h3 { font-size: 16px; text-align: center; margin: 12px 0 0; }
.wp-block-column h3 a { color: #1A1A2E; }
.wp-block-column h3 a:hover { color: #2D6CDF; }

/* === Sub-Navigation bar === */
.product-subnav {
    background: #1B2A4A;
    padding: 0;
    position: sticky;
    top: 73px;
    z-index: 99998;
}
.product-subnav .container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.product-subnav-tabs { display: flex; align-items: center; gap: 8px; padding: 14px 0; flex-wrap: wrap; }
.product-subnav-tabs a { color: rgba(255,255,255,0.8); font-size: 14px; text-decoration: none; padding: 6px 16px; border-radius: 4px; transition: all 0.2s; white-space: nowrap; }
.product-subnav-tabs a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.product-subnav-tabs a.active { color: #F59E0B; background: rgba(245,158,11,0.1); font-weight: 600; }

/* === Footer === */
.site-footer { background: #1B2A4A; color: rgba(255,255,255,0.7); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col a:hover { color: #F59E0B; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 14px; }

/* === Links === */
.btn-link { color: #2D6CDF; font-size: 14px; font-weight: 600; }
.btn-link:hover { color: #F59E0B; }

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .product-grid, .app-grid, .blog-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .trust-items { gap: 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .product-subnav-tabs { gap: 4px; }
    .product-subnav-tabs a { padding: 6px 10px; font-size: 13px; }
    .content-area { padding: 24px 20px; }
    .sv-nav-right.nav-open { padding-top: 68px; }
    .section { padding: 48px 0; }
    .section-header h2 { font-size: 28px; }
}
