/* ========================================
 * Support Hub - Chính sách & Hỗ trợ
 * ======================================== */

/* SVG icon alignment */
.nav-icon svg,
.hero-nav-pills svg,
.sh-card h3>svg,
.info-grid-item h4>svg,
.cc-icon svg,
.acc-icon svg,
.sh-accordion-btn>span>svg:first-child {
    vertical-align: -0.15em;
    flex-shrink: 0;
}

/* Hero */
.support-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 60px 0 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.support-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.support-hero .container {
    position: relative;
    z-index: 1;
}

.support-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.support-hero p {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.hero-search {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.hero-search input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 15px;
    backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s;
}

.hero-search input::placeholder {
    color: #64748b;
}

.hero-search input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.hero-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 20px;
    height: 20px;
}

/* Quick nav pills */
.hero-nav-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.hero-nav-pills a {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.hero-nav-pills a:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

/* Layout */
.support-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Sidebar */
.support-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.sidebar-nav a.active {
    background: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Main content */
.support-main {
    min-width: 0;
    overflow-x: hidden;
}

/* Responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border-radius: 12px;
}

.table-responsive .price-table {
    margin: 0;
    min-width: 500px;
}

.support-section {
    margin-bottom: 48px;
    scroll-margin-top: 100px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-header p {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0;
}

/* Cards */
.sh-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.sh-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sh-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-card p {
    color: #475569;
    line-height: 1.7;
    font-size: 14.5px;
    margin-bottom: 12px;
}

.sh-card p:last-child {
    margin-bottom: 0;
}

/* Highlight boxes */
.sh-highlight {
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.7;
}

.sh-highlight.green {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.sh-highlight.blue {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.sh-highlight.yellow {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.sh-highlight.red {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.sh-highlight.purple {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #6b21a8;
}

.sh-highlight b,
.sh-highlight strong {
    font-weight: 700;
}

/* Price comparison table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
    font-size: 14px;
}

.price-table thead th {
    background: #1e293b;
    color: #f8fafc;
    padding: 14px 16px;
    font-weight: 600;
    text-align: left;
}

.price-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.price-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.price-table .price-original {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 13px;
}

.price-table .price-taphoatech {
    color: #16a34a;
    font-weight: 700;
    font-size: 15px;
}

.price-table .save-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* Accordion / FAQ */
.sh-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.sh-accordion-btn {
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.sh-accordion-btn:hover {
    background: #f8fafc;
}

.sh-accordion-btn .acc-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sh-accordion-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s;
    color: #94a3b8;
}

.sh-accordion.open .sh-accordion-btn svg {
    transform: rotate(180deg);
}

.sh-accordion-body {
    display: none;
    padding: 0 20px 20px;
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
}

.sh-accordion.open .sh-accordion-body {
    display: block;
}

/* Step guide */
.step-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    counter-reset: step-counter;
}

.step-list li {
    position: relative;
    padding: 16px 16px 16px 56px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    counter-increment: step-counter;
}

.step-list li::before {
    content: 'B' counter(step-counter);
    position: absolute;
    left: 14px;
    top: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-list li a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.step-list li a:hover {
    text-decoration: underline;
}

/* Info grid (2 col) */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.info-grid-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.info-grid-item h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-grid-item p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Contact cards */
.contact-grid-hub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.contact-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.contact-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.contact-card .cc-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.contact-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.contact-card a {
    display: inline-block;
    padding: 8px 20px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.contact-card a:hover {
    background: #1d4ed8;
}

/* Dealer flow diagram */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.flow-step {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
}

.flow-arrow {
    color: #3b82f6;
    font-size: 18px;
    font-weight: 700;
}

/* Working hours badge */
.hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0;
}

/* Key badge */
.key-example {
    background: #1e293b;
    color: #10b981;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin: 12px 0;
    overflow-x: auto;
}

/* ========================================
 * DARK MODE
 * ======================================== */
body.dark-mode .support-layout {
    background: transparent;
}

body.dark-mode .sidebar-nav a {
    color: #94a3b8;
}

body.dark-mode .sidebar-nav a:hover {
    background: #253349;
    color: #e2e8f0;
}

body.dark-mode .sidebar-nav a.active {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-left-color: #3b82f6;
}

body.dark-mode .section-header {
    border-bottom-color: #334155;
}

body.dark-mode .section-header h2 {
    color: #f8fafc;
}

body.dark-mode .section-header p {
    color: #94a3b8;
}

body.dark-mode .sh-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .sh-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .sh-card h3 {
    color: #f8fafc;
}

body.dark-mode .sh-card p {
    color: #cbd5e1;
}

/* Highlight boxes dark */
body.dark-mode .sh-highlight.green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

body.dark-mode .sh-highlight.blue {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

body.dark-mode .sh-highlight.yellow {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.25);
    color: #fde68a;
}

body.dark-mode .sh-highlight.red {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

body.dark-mode .sh-highlight.purple {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}

/* Table dark */
body.dark-mode .price-table thead th {
    background: #0f172a;
}

body.dark-mode .price-table tbody td {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

body.dark-mode .price-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .price-table .price-taphoatech {
    color: #34d399;
}

body.dark-mode .price-table .save-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* Accordion dark */
body.dark-mode .sh-accordion {
    border-color: #334155;
}

body.dark-mode .sh-accordion-btn {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode .sh-accordion-btn:hover {
    background: #253349;
}

body.dark-mode .sh-accordion-body {
    color: #cbd5e1;
}

/* Steps dark */
body.dark-mode .step-list li {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .step-list li a {
    color: #60a5fa;
}

/* Info grid dark */
body.dark-mode .info-grid-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .info-grid-item h4 {
    color: #f8fafc;
}

body.dark-mode .info-grid-item p {
    color: #94a3b8;
}

/* Contact dark */
body.dark-mode .contact-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .contact-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .contact-card h4 {
    color: #f8fafc;
}

body.dark-mode .contact-card p {
    color: #94a3b8;
}

/* Flow dark */
body.dark-mode .flow-diagram {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .flow-step {
    background: #253349;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .key-example {
    background: #0f172a;
    border: 1px solid #334155;
}

/* ========================================
 * RESPONSIVE
 * ======================================== */
@media (max-width: 900px) {
    .support-layout {
        grid-template-columns: 1fr;
        padding: 20px 14px 60px;
        gap: 16px;
        overflow-x: hidden;
    }

    .support-sidebar {
        position: static;
        max-height: unset;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-nav {
        display: flex;
        gap: 4px;
        padding-bottom: 4px;
    }

    .sidebar-nav li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .sidebar-nav a {
        white-space: nowrap;
        padding: 8px 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px 8px 0 0;
        font-size: 13px;
    }

    .sidebar-nav a.active {
        border-left-color: transparent;
        border-bottom-color: #2563eb;
    }

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

    .contact-grid-hub {
        grid-template-columns: 1fr;
    }

    .support-hero h1 {
        font-size: 1.6rem;
    }

    /* Mobile card/content fixes */
    .sh-card {
        padding: 16px;
        border-radius: 10px;
    }

    .sh-highlight {
        padding: 14px 16px;
    }

    .sh-card p,
    .sh-highlight,
    .sh-accordion-body {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .section-header {
        gap: 10px;
        padding-bottom: 12px;
    }

    .section-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 10px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    /* Table responsive on mobile */
    .price-table {
        font-size: 13px;
    }

    .price-table thead th {
        padding: 10px 10px;
        font-size: 12px;
    }

    .price-table tbody td {
        padding: 10px 10px;
        font-size: 13px;
    }

    .price-table .price-taphoatech {
        font-size: 13px;
    }

    .price-table .price-original {
        font-size: 11px;
    }

    .price-table .save-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Accordion mobile */
    .sh-accordion-btn {
        padding: 14px 16px;
        font-size: 13.5px;
        gap: 8px;
    }

    .sh-accordion-body {
        padding: 0 16px 16px;
        font-size: 13px;
    }

    /* Step list mobile */
    .step-list li {
        padding: 14px 14px 14px 50px;
        font-size: 13px;
    }

    .step-list li::before {
        left: 10px;
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    /* Key example mobile */
    .key-example {
        font-size: 11px;
        padding: 10px 14px;
        word-break: break-all;
    }

    /* Info grid item mobile */
    .info-grid-item {
        padding: 14px;
    }

    .info-grid-item h4 {
        font-size: 13px;
    }

    .info-grid-item p {
        font-size: 12.5px;
    }

    /* Contact card mobile */
    .contact-card {
        padding: 16px;
    }

    /* Hero search mobile */
    .hero-search {
        max-width: 100%;
        padding: 0 8px;
    }

    .hero-search input {
        font-size: 14px;
        padding: 12px 16px 12px 42px;
    }

    .hero-nav-pills {
        gap: 6px;
    }

    .hero-nav-pills a {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* Hours badge mobile */
    .hours-badge {
        font-size: 13px;
        padding: 8px 14px;
    }
}

@media (max-width: 600px) {
    .support-layout {
        padding: 16px 10px 60px;
    }

    .support-hero {
        padding: 40px 0 30px;
    }

    .support-hero h1 {
        font-size: 1.35rem;
    }

    .support-hero p {
        font-size: 0.9rem;
        padding: 0 12px;
    }

    .flow-diagram {
        flex-direction: column;
        padding: 14px;
    }

    .flow-step {
        font-size: 12px;
        padding: 8px 12px;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .sh-card h3 {
        font-size: 0.95rem;
    }

    .sh-card {
        padding: 14px;
    }

    .sh-highlight {
        padding: 12px 14px;
        font-size: 13px;
    }
}