:root {
    --header-height: 78px;
    --container-width: 1140px;
    --brand-blue: #0b1f3a;
    --accent: #ffd166;
}

body.has-sticky-header {
    scroll-behavior: smooth;
}

body.nav-open {
    overflow: hidden;
}

.site-header {
    background: var(--brand-blue);
    color: #fff;
    padding: 1.2rem 0;
    font-family: 'Inter', sans-serif;
    position: sticky;
    top: 0;
    z-index: 900;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    min-height: var(--header-height);
}

.site-header.is-stuck {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    background: rgba(11, 31, 58, 0.96);
    backdrop-filter: blur(6px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo a {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    letter-spacing: 0.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
}

.main-nav a.active::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.3rem;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.search-box {
    flex-shrink: 0;
}

.search-box form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.4rem 0.6rem;
    outline: none;
    font-size: 0.95rem;
    width: 220px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.search-box button {
    background: var(--accent);
    border: none;
    color: var(--brand-blue);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.hero-section {
    background: linear-gradient(135deg, var(--brand-blue), #1e3a8a);
    color: #fff;
    padding: 4rem 0 3rem;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.hero-content .badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.hero-content p {
    max-width: 520px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.5rem;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 0.8rem;
}

.hero-actions .btn-primary {
    background: #ffd166;
    color: #0b1f3a;
}

.hero-actions .btn-secondary {
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
}

.hero-visual .hero-card {
    background: rgba(255,255,255,0.08);
    padding: 1.5rem;
    border-radius: 1.2rem;
    max-width: 360px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.hero-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.hero-card p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.2rem;
}

.hero-card .stats {
    display: flex;
    gap: 1.5rem;
}

.hero-card .stats span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin: 3rem auto;
    font-family: 'Inter', sans-serif;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.section-header p {
    color: #6b7280;
    margin-bottom: 1.2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.6rem;
}

.featured-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15,23,42,0.08);
    display: flex;
    flex-direction: column;
}

.featured-card .card-image img,
.latest-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.featured-card .card-body {
    padding: 1.4rem;
}

.card-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #312e81;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.featured-card h3 a {
    text-decoration: none;
    color: #111827;
    font-size: 1.15rem;
}

.featured-card p {
    color: #6b7280;
    margin: 0.8rem 0;
    font-size: 0.95rem;
}

.card-link {
    font-weight: 600;
    text-decoration: none;
    color: #2563eb;
}

.latest-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.latest-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15,23,42,0.06);
    overflow: hidden;
}

.latest-thumb img {
    height: 100%;
    object-fit: cover;
}

.latest-info {
    padding: 1.4rem;
}

.latest-info h3 a {
    text-decoration: none;
    color: #111827;
}

.latest-info .meta {
    display: flex;
    gap: 0.8rem;
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0.6rem 0;
}

.latest-info p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.read-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.sidebar .widget {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(15,23,42,0.08);
    margin-bottom: 1.6rem;
}

.subscribe-widget input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.8rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.8rem;
}

.subscribe-widget button {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.8rem;
    background: #2563eb;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.category-widget ul,
.popular-widget ul,
.social {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-widget li,
.popular-widget li {
    margin-bottom: 0.6rem;
}

.category-widget a,
.popular-widget a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
}

.popular-widget span {
    display: block;
    color: #9ca3af;
    font-size: 0.85rem;
}

.ad-box {
    background: #f1f5f9;
    border-radius: 0.8rem;
    padding: 1rem;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-box.has-code {
    background: transparent;
    min-height: auto;
    padding: 0;
    box-shadow: none;
}

.ad-box .ad-container {
    width: 100%;
}

.site-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.84);
    padding: 2.4rem 0 1.5rem;
    font-family: 'Inter', sans-serif;
}

.minimal-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.minimal-footer .footer-links a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 500;
}

.minimal-footer .footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    font-size: 0.9rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tag-item:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

.tag-empty {
    color: #94a3b8;
    font-size: 0.85rem;
}

.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--brand-blue);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 850;
}

.scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #1e3a8a;
}

.placeholder-image,
.placeholder-thumb {
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 2rem 0 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: transparent;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination-link:hover {
    border-color: #60a5fa;
    color: #2563eb;
    background: rgba(96, 165, 250, 0.12);
}

.pagination-link.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.empty-state {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #475569;
}

.empty-state p {
    margin-bottom: 0.8rem;
}

@media (max-width: 1024px) {
    .search-box input {
        width: 160px;
    }
}

@media (max-width: 900px) {
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        margin-bottom: 0.8rem;
    }

    .hero-visual {
        width: 100%;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: flex;
    }

    .search-box {
        display: none;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        top: var(--header-height);
        background: rgba(11, 31, 58, 0.97);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.2rem;
        transform: translateY(-110%);
        transition: transform 0.3s ease;
    }

    body.nav-open .main-nav {
        transform: translateY(0);
    }

    body.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    body.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .latest-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .scroll-top {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
    }

    .hero-content h1 {
        font-size: 2.1rem;
    }
}


