/* =========================================
   AutoSports AI Theme — Main Stylesheet
   ========================================= */

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.site-main  { flex: 1; padding: 32px 0; }

/* === HEADER === */
.site-header {
    background: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.site-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--accent); }

/* === NAV === */
.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav a {
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius);
    transition: background .2s, color .2s;
}
.main-nav a:hover,
.main-nav .current-menu-item a {
    background: rgba(255,255,255,.15);
    color: var(--white);
}

/* === BREAKING TICKER === */
.ticker-bar {
    background: var(--accent);
    color: var(--white);
    font-size: .82rem;
    font-weight: 600;
    padding: 6px 0;
    overflow: hidden;
}
.ticker-bar .ticker-label {
    background: var(--dark);
    padding: 0 12px;
    margin-right: 12px;
    display: inline-block;
}
.ticker-content { display: inline-block; white-space: nowrap; animation: ticker 40s linear infinite; }
@keyframes ticker { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

/* === HERO GRID === */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
@media (max-width: 768px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
    aspect-ratio: 16/9;
}
.hero-card .card-bg {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .6;
}
.hero-card .card-body {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-card .card-cat {
    background: var(--accent);
    color: var(--white);
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: inline-block;
    margin-bottom: 8px;
}
.hero-card h2 a { color: var(--white); font-size: 1.4rem; line-height: 1.3; }
.hero-card h2 a:hover { color: var(--accent); }
.hero-card .card-meta { color: rgba(255,255,255,.65); font-size: .8rem; margin-top: 8px; }

/* === SIDE CARDS === */
.side-cards { display: flex; flex-direction: column; gap: 14px; }
.side-card {
    display: flex;
    gap: 12px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 12px;
}
.side-card .thumb {
    width: 90px; height: 65px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.side-card .thumb-placeholder {
    width: 90px; height: 65px;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.4rem;
}
.side-card h3 { font-size: .88rem; line-height: 1.35; }
.side-card h3 a { color: var(--dark); }
.side-card h3 a:hover { color: var(--primary); }
.side-card .meta { font-size: .75rem; color: #9ca3af; margin-top: 4px; }

/* === MAIN CONTENT GRID === */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}
@media (max-width: 900px) { .content-layout { grid-template-columns: 1fr; } }

/* === ARTICLE CARDS === */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary);
    color: var(--primary);
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.article-card .card-image {
    height: 180px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 2.5rem;
    overflow: hidden;
}
.article-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card .card-content { padding: 16px; }
.card-category {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--accent);
    margin-bottom: 8px;
}
.article-card h3 { font-size: 1rem; line-height: 1.4; margin-bottom: 8px; }
.article-card h3 a { color: var(--dark); }
.article-card h3 a:hover { color: var(--primary); }
.article-card .excerpt { font-size: .85rem; color: #6b7280; line-height: 1.5; margin-bottom: 12px; }
.card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .78rem;
    color: #9ca3af;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.ai-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

/* === SINGLE ARTICLE === */
.single-article { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.article-header { padding: 32px 40px 24px; border-bottom: 1px solid var(--border); }
.article-header .cat-badge {
    background: var(--accent);
    color: white;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 3px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 16px;
}
.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: .85rem;
    color: #6b7280;
    flex-wrap: wrap;
}
.article-meta .ai-notice {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}
.article-featured-image { max-height: 450px; overflow: hidden; }
.article-featured-image img { width: 100%; height: 450px; object-fit: cover; }
.article-body {
    padding: 36px 40px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}
.article-body h2 {
    font-size: 1.4rem;
    margin: 32px 0 12px;
    color: var(--dark);
    padding-left: 14px;
    border-left: 4px solid var(--primary);
}
.article-body p { margin-bottom: 20px; }
.article-body blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    font-style: italic;
    color: var(--mid);
}
.article-tags { padding: 20px 40px; border-top: 1px solid var(--border); }
.article-tags span { font-size: .85rem; font-weight: 600; color: var(--mid); }
.article-tags a {
    display: inline-block;
    margin: 4px;
    padding: 4px 12px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--mid);
}
.article-tags a:hover { background: var(--primary); color: white; border-color: var(--primary); }
@media (max-width: 768px) {
    .article-header { padding: 20px; }
    .article-header h1 { font-size: 1.4rem; }
    .article-body { padding: 20px; }
    .article-tags { padding: 16px 20px; }
}

/* === SIDEBAR === */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}
.recent-posts-list { list-style: none; }
.recent-posts-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    line-height: 1.4;
}
.recent-posts-list li:last-child { border-bottom: none; padding-bottom: 0; }
.recent-posts-list a { color: var(--dark); }
.recent-posts-list a:hover { color: var(--primary); }
.recent-posts-list .post-date { color: #9ca3af; font-size: .78rem; margin-top: 3px; }

.categories-list { list-style: none; }
.categories-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}
.categories-list li:last-child { border-bottom: none; }
.categories-list a { color: var(--dark); }
.categories-list a:hover { color: var(--primary); }
.categories-list .count {
    background: var(--light);
    color: var(--mid);
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 999px;
}

/* === PAGINATION === */
.pagination {
    display: flex; gap: 8px; justify-content: center;
    padding: 32px 0 0;
}
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    border: 2px solid var(--border);
    color: var(--mid);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: white; border-color: var(--primary); }

/* === FOOTER === */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: .88rem; line-height: 1.6; }
.footer-heading { font-size: .9rem; font-weight: 700; color: white; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-links a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    flex-wrap: wrap;
    gap: 10px;
}
.ai-disclaimer {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: .75rem;
}

/* === MOBILE NAV === */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: white; margin: 5px 0; transition: .3s; }
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary); padding: 16px; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .header-inner { position: relative; }
}

/* === ARCHIVE === */
.archive-header {
    background: var(--primary);
    color: white;
    padding: 32px 40px;
    border-radius: var(--radius);
    margin-bottom: 28px;
}
.archive-header h1 { font-size: 1.8rem; }
.archive-header p { opacity: .8; margin-top: 6px; font-size: .9rem; }

/* === NO POSTS === */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.no-posts .icon { font-size: 3rem; margin-bottom: 16px; }
.no-posts h2 { color: var(--dark); margin-bottom: 8px; }
.no-posts p { color: #6b7280; }
