/* ============================================
   VinNumber.net - Custom Template
   Clean, modern — white/gray bg, green accents
   ============================================ */

:root {
    --green: #2da44e;
    --green-dark: #218838;
    --green-light: #e8f5ec;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8f9fa;
    --white: #ffffff;
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --radius: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body { overflow-x: hidden;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.logo-main { color: var(--text); }
.logo-dot  { color: var(--green); }

.main-nav {
    display: flex;
    gap: 6px;
    flex: 1;
}
.main-nav a {
    color: var(--text);
    font-size: .92rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background .15s;
}
.main-nav a:hover { background: var(--bg); color: var(--green); }

.header-actions { display: flex; gap: 10px; }

.btn { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: var(--radius); font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .15s; }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-green { background: var(--green); color: #fff; border: none; }
.btn-green:hover { background: var(--green-dark); color: #fff; text-decoration: none; }

.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

/* ===== HERO ===== */
.hero {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 72px 0 60px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: .82rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 32px;
}

/* VIN Form */
.vin-form { max-width: 580px; margin: 0 auto 28px; }

.vin-input-wrap {
    display: flex;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--card-shadow);
    transition: border-color .15s;
}
.vin-input-wrap:focus-within { border-color: var(--green); }

.vin-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: var(--font);
    background: transparent;
    color: var(--text);
}
.vin-input::placeholder { color: #9ca3af; }

.vin-btn {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: .95rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.vin-btn:hover { background: var(--green-dark); }

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.stat {
    font-size: .88rem;
    color: var(--text-muted);
}
.stat strong { color: var(--text); font-weight: 700; display: block; font-size: 1rem; }

/* ===== PAGE HEADER ===== */
.page-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

/* ===== MAIN ===== */
.site-main { padding: 48px 0 64px; }

/* Home grid */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

.section-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--green);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.view-all {
    display: inline-block;
    margin-top: 16px;
    color: var(--green);
    font-size: .9rem;
    font-weight: 600;
}
.view-all:hover { text-decoration: underline; }

/* News cards on homepage */
.news-card {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.news-card:last-of-type { border-bottom: none; }
.news-card-img-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    overflow: hidden;
    border-radius: 8px;
}
.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}
.news-card-img-wrap:hover .news-card-img { transform: scale(1.05); }
.news-card-body { overflow-x: hidden; flex: 1; min-width: 0; }
.news-card-title {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 5px;
    text-decoration: none;
}
.news-card-title:hover { color: var(--green); }
.news-card-excerpt {
    font-size: .82rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 6px;
}
.read-more {
    font-size: .8rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* Article cards */
.article-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow .15s, border-color .15s;
    display: block;
    color: var(--text);
    text-decoration: none;
}
.article-card:hover {
    border-color: var(--green);
    box-shadow: 0 4px 12px rgba(45,164,78,.1);
    text-decoration: none;
}
.article-card-title {
    font-size: .97rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.article-card-excerpt {
    font-size: .86rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
}
.article-card-meta {
    font-size: .78rem;
    color: #9ca3af;
}
.article-card-read {
    font-size: .85rem;
    color: var(--green);
    font-weight: 600;
    float: right;
}

/* News list (right column) */
.news-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }
.news-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}
.news-item a {
    font-size: .92rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}
.news-item a:hover { color: var(--green); text-decoration: none; }

/* Guides strip */
.guides-strip { padding-top: 48px; border-top: 1px solid var(--border); }
.guide-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 4px;
}
.guide-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.guide-card:hover {
    border-color: var(--green);
    background: var(--green-light);
    text-decoration: none;
}
.guide-icon { font-size: 1.6rem; }

/* Inner page */
.inner-layout { max-width: 800px; }
.content-main {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 40px;
}
.content-main h1 { font-size: 1.8rem; margin-bottom: 20px; }
.content-main h2 { font-size: 1.4rem; margin: 24px 0 12px; }
.content-main p  { margin-bottom: 14px; color: var(--text-muted); }
.content-main a  { color: var(--green); }

/* ===== JOOMLA ARTICLE OVERRIDES ===== */
.items-row, .item-row { margin-bottom: 24px; }
.page-header h1, .com-content-article__title, .item-title a { color: var(--text); font-weight: 700; }
.category-list .article-list-item { padding: 16px 0; border-bottom: 1px solid var(--border); }

/* Category view */
.com-content-category__items .row { list-style: none; padding: 0; }

/* Article layout */
.com-content-article { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }

/* ===== FOOTER ===== */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand .site-logo { margin-bottom: 12px; display: inline-flex; }
.footer-brand .logo-main { color: #fff; }
.footer-brand p { font-size: .88rem; color: #6b7280; line-height: 1.5; max-width: 260px; }

.footer-links h4 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.footer-links a  { display: block; color: #9ca3af; font-size: .88rem; margin-bottom: 8px; text-decoration: none; }
.footer-links a:hover { color: var(--green); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 20px;
    text-align: center;
    font-size: .82rem;
    color: #6b7280;
}

/* ===== CATEGORY PAGE ===== */
.blog-items .item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.blog-items .item h2 a { color: var(--text); font-size: 1.2rem; font-weight: 700; }
.blog-items .item h2 a:hover { color: var(--green); text-decoration: none; }
.article-info-term { font-size: .8rem; color: #9ca3af; }

/* Pagination */
.pagination { display: flex; gap: 6px; list-style: none; padding: 20px 0; }
.pagination .page-link { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: .88rem; }
.pagination .active .page-link { background: var(--green); border-color: var(--green); color: #fff; }

/* ===== ALERTS / MESSAGES ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: var(--green-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .home-grid { grid-template-columns: 1fr; gap: 32px; }
    .guide-cards { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; max-width: 100%; }
    .vin-form { max-width: 100%; }
    .hero-stats { flex-wrap: wrap; gap: 16px; }
    /* Header mobile fix */
    .header-inner { gap: 8px; }
    .btn-outline { display: none; }
    .main-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        z-index: 99;
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { padding: 48px 0 40px; }
    .hero-title { font-size: 2rem; }
    .guide-cards { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .content-main { padding: 20px; }
}

/* ===== Language switcher ===== */
.lang-switcher {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-left: 8px;
}
.lang-btn {
    padding: 5px 10px;
    font-size: .75rem;
    font-weight: 700;
    color: #6b7280;
    text-decoration: none;
    background: transparent;
    transition: background .15s, color .15s;
}
.lang-btn:hover { background: #f3f4f6; color: var(--text); }
.lang-btn.active { background: var(--green); color: #fff; }


/* ============================================================
   News Portal Grid — category blog layout override
   Applies to /scams/ /news/ and all category blog views
   ============================================================ */

/* Hide the default Joomla blog structure wrappers */
.com-content-category-blog .page-header,
.com-content-category-blog h1.page-header,
.com-content-category-blog > .row > .col-12 > .blog > .cat-children { display: none; }

/* Main blog container → news grid */
.com-content-category-blog .blog-items,
.com-content-category-blog .items-leading,
.com-content-category-blog .items-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    max-width: 100% !important;
    float: none !important;
    width: 100% !important;
}

/* Each article wrapper → card */
.com-content-category-blog .blog-item,
.com-content-category-blog .items-leading .item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    transition: box-shadow .15s;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.com-content-category-blog .blog-item:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.07);
}

/* Intro image → card image */
.com-content-category-blog .blog-item .item-image,
.com-content-category-blog .blog-item figure {
    width: 100%;
    height: 170px;
    overflow: hidden;
    margin: 0 !important;
    display: block;
}
.com-content-category-blog .blog-item .item-image img,
.com-content-category-blog .blog-item figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.com-content-category-blog .blog-item:hover figure img,
.com-content-category-blog .blog-item:hover .item-image img {
    transform: scale(1.04);
}

/* Item content body */
.com-content-category-blog .blog-item .item-content {
    padding: 16px !important;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category badge above title */
.com-content-category-blog .blog-item .item-category,
.com-content-category-blog .blog-item .category-name {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--green);
    background: var(--green-light, #e8f5ec);
    padding: 3px 8px;
    border-radius: 100px;
    margin-bottom: 8px;
    text-decoration: none;
}

/* Title */
.com-content-category-blog .blog-item .page-header h2,
.com-content-category-blog .blog-item h2.item-title,
.com-content-category-blog .blog-item .item-title {
    font-size: .95rem !important;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
}
.com-content-category-blog .blog-item .page-header h2 a,
.com-content-category-blog .blog-item h2.item-title a,
.com-content-category-blog .blog-item .item-title a {
    color: var(--text) !important;
    text-decoration: none;
    font-size: .95rem;
}
.com-content-category-blog .blog-item .item-title a:hover { color: var(--green) !important; }

/* Intro text */
.com-content-category-blog .blog-item .item-content > .introtext,
.com-content-category-blog .blog-item p {
    font-size: .82rem !important;
    color: var(--text-muted) !important;
    line-height: 1.65 !important;
    margin: 0 0 12px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row (date, read more) */
.com-content-category-blog .blog-item .item-info,
.com-content-category-blog .blog-item .article-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.com-content-category-blog .blog-item .article-info .article-info-term,
.com-content-category-blog .blog-item dd.createdby,
.com-content-category-blog .blog-item .create,
.com-content-category-blog .blog-item dd.published time {
    font-size: .73rem !important;
    color: var(--text-muted) !important;
}
/* Hide author, hits, parent-category clutter */
.com-content-category-blog .blog-item .com-content-article-info__author,
.com-content-category-blog .blog-item .hits,
.com-content-category-blog .blog-item dd.hits { display: none !important; }

/* Read more link */
.com-content-category-blog .blog-item .readmore,
.com-content-category-blog .blog-item a.btn-outline-secondary {
    background: none !important;
    border: none !important;
    color: var(--green) !important;
    font-size: .78rem !important;
    font-weight: 600;
    padding: 0 !important;
    text-decoration: none;
    white-space: nowrap;
}
.com-content-category-blog .blog-item .readmore:hover { text-decoration: underline; }

/* Pagination */
.com-content-category-blog nav.com-content-category-blog__pagination {
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 900px) {
    .com-content-category-blog .blog-items,
    .com-content-category-blog .items-leading,
    .com-content-category-blog .items-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 560px) {
    .com-content-category-blog .blog-items,
    .com-content-category-blog .items-leading,
    .com-content-category-blog .items-row {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Pagination icons fix ===== */
.icon-angle-double-left:before { content: '«'; font-family: inherit; }
.icon-angle-left:before        { content: '‹'; font-family: inherit; }
.icon-angle-right:before       { content: '›'; font-family: inherit; }
.icon-angle-double-right:before{ content: '»'; font-family: inherit; }

.vn-pagination { display: flex; justify-content: center; padding: 8px 0; }
.vn-pagination .pagination { gap: 4px; }
.vn-pagination .page-link {
    min-width: 36px; height: 36px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 6px !important;
    border: 1px solid var(--border); color: var(--text); font-size: .9rem;
    padding: 0 10px; text-decoration: none; transition: background .15s, color .15s;
}
.vn-pagination .page-link:hover { background: #f3f4f6; }
.vn-pagination .active .page-link { background: var(--green); color: #fff; border-color: var(--green); }
.vn-pagination .disabled .page-link { opacity: .4; pointer-events: none; }
