/*
Theme Name: Tin Giá Xe by Chiến Đẹp Trai
Theme URI: https://tingiaxe.com
Author: Chiến Đẹp Trai
Author URI: https://tingiaxe.com
Description: Theme WordPress chuyên biệt cho Tin Giá Xe - Tra cứu giá xe, chi phí lăn bánh và công cụ hỗ trợ. Thiết kế premium với Inter font, gradient effects và responsive layout.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tingiaxe
Tags: custom-menu, featured-images, responsive-layout, translation-ready
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
*/

/* Base Resets */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #F8FAFC;
    color: #111827;
}

/* Focus & Accessibility */
*:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: #2563EB;
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .875rem;
    z-index: 9999;
    transition: top .2s ease-in-out;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}
.skip-link:focus-visible {
    top: 1rem;
}

/* Search Scrollbar */
.search-scroll::-webkit-scrollbar {
    width: 5px;
}
.search-scroll::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 4px;
}
.search-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
.search-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Shared Header System */
.site-header {
    background-color: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226,232,240,.85);
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: .875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2563EB, #06B6D4);
    box-shadow: 0 1px 2px rgba(15,23,42,.12);
    transition: transform .2s ease;
}
.brand-link:hover .brand-mark {
    transform: scale(1.05);
}
.nav-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #F8FAFC;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 999px;
}
.nav-link {
    font-size: 14px;
    font-weight: 650;
    padding: 7px 14px;
    border-radius: 999px;
    color: #334155;
    transition: all .2s ease;
}
.nav-link:hover {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.nav-link.is-active {
    background: #FFFFFF;
    color: #2563EB;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15,23,42,.08);
}

/* Shared Footer System */
.site-footer {
    position: relative;
    border-top: 1px solid #E5E7EB;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.055), transparent 24rem),
        radial-gradient(circle at top right, rgba(6,182,212,.055), transparent 22rem),
        linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    color: #334155;
}
.footer-gradient-line {
    height: 3px;
    background: linear-gradient(90deg, #2563EB, #06B6D4);
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.875rem 1rem 1.25rem;
}
.footer-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.35rem;
    align-items: start;
}
@media (min-width: 768px) {
    .footer-main-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 1.75rem;
    }
    .footer-brand-column {
        grid-column: 1 / -1;
        max-width: 620px;
    }
}
@media (min-width: 1024px) {
    .footer-inner {
        padding: 2.5rem 1.25rem 1.375rem;
    }
    .footer-main-grid {
        grid-template-columns: 1.55fr .75fr .85fr .85fr .65fr;
        gap: 2rem;
    }
    .footer-brand-column {
        grid-column: auto;
        max-width: none;
    }
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #0F172A;
    text-decoration: none;
}
.footer-brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 900;
    background: linear-gradient(135deg, #2563EB, #06B6D4);
    box-shadow: 0 8px 20px rgba(37,99,235,.18);
}
.footer-brand-text {
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.035em;
}
.footer-description {
    margin-top: 1rem;
    color: #475569;
    font-size: .875rem;
    line-height: 1.75;
}
.footer-disclaimer {
    margin-top: 1rem;
    max-width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    background: rgba(255,255,255,.86);
    box-shadow: 0 4px 12px rgba(15,23,42,.03);
    padding: .75rem .875rem;
    color: #475569;
    font-size: .875rem;
    line-height: 1.5;
}
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
}
.footer-social-link {
    width: 2.375rem;
    height: 2.375rem;
    border: 1px solid #E5E7EB;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #FFFFFF;
    text-decoration: none;
    transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease;
}
.footer-social-link:hover {
    transform: translateY(-2px);
    color: #2563EB;
    border-color: rgba(37,99,235,.25);
    background: #EFF6FF;
}
.footer-nav-column {
    min-width: 0;
}
.footer-heading {
    margin: 0 0 .875rem;
    color: #0F172A;
    font-size: .8125rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.footer-link-list {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    color: #475569;
    font-size: .875rem;
    line-height: 1.45;
    padding: .35rem 0;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}
.footer-link:hover {
    color: #2563EB;
    transform: translateX(2px);
}
.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: 1.75rem;
    padding-top: 1.1rem;
    border-top: 1px solid #E5E7EB;
    color: #64748B;
    font-size: .875rem;
}
.footer-bottom a {
    color: #475569;
    text-decoration: none;
    transition: color .18s ease;
}
.footer-bottom a:hover {
    color: #2563EB;
}
@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
@media (prefers-reduced-motion: reduce) {
    .brand-mark,
    .footer-social-link,
    .footer-link {
        transition: none;
        transform: none;
    }
    .brand-link:hover .brand-mark,
    .footer-social-link:hover,
    .footer-link:hover {
        transform: none;
    }
}
/* --- PREMIUM UI SYSTEM --- */
.site-shell {
    background: 
        radial-gradient(circle at top left, rgba(37,99,235,.04), transparent 28rem),
        radial-gradient(circle at top right, rgba(6,182,212,.04), transparent 24rem),
        #F8FAFC;
}

.top-gradient-bar {
    height: 3px;
    background: linear-gradient(90deg, #2563EB, #06B6D4);
}

.text-gradient {
    background: linear-gradient(90deg, #2563EB, #06B6D4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.soft-gradient {
    background: 
        radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 35%),
        radial-gradient(circle at top right, rgba(6,182,212,.10), transparent 32%),
        linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
}

.premium-card {
    border: 1px solid #E5E7EB;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFF 100%);
    box-shadow: 0 1px 2px rgba(17,24,39,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    display: flex;
    flex-direction: column;
}

/* Interactive Cards Only */
a.premium-card:hover, button.premium-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37,99,235,.28);
    box-shadow: 0 10px 24px rgba(17,24,39,.08);
    z-index: 10;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .875rem;
    color: #2563EB;
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(6,182,212,.12));
    flex-shrink: 0;
}
.icon-badge svg {
    width: 1.25rem;
    height: 1.25rem;
}

.feature-card {
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #2563EB, #06B6D4);
}

.motion-safe-fade {
    animation: fadeUp .32s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .motion-safe-fade { animation: none; }
    .premium-card { transition: none; }
    .premium-card:hover { transform: none; box-shadow: 0 1px 2px rgba(17,24,39,.04); border-color: #2563EB; }
}

/* WordPress specific overrides */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Single post content styling */
.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0F172A;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #374151;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #374151;
}

.entry-content a {
    color: #2563EB;
    text-decoration: underline;
    text-decoration-color: rgba(37,99,235,0.3);
    text-underline-offset: 2px;
}

.entry-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

.entry-content img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.entry-content blockquote {
    border-left: 3px solid #2563EB;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: #475569;
    font-style: italic;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.entry-content th, .entry-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    text-align: left;
}

.entry-content th {
    background: #F8FAFC;
    font-weight: 600;
    color: #0F172A;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #E5E7EB;
    transition: all 0.15s;
}

.pagination .page-numbers:hover {
    border-color: #2563EB;
    color: #2563EB;
    background: #EFF6FF;
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #2563EB, #06B6D4);
    color: #fff;
    border-color: transparent;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
}

.comment-author img {
    border-radius: 50%;
}

/* Nav active state */
.nav-link.active {
    background: #2563EB;
    color: #fff;
}

.mobile-nav-link.active {
    background: #EFF6FF;
    color: #2563EB;
}
