@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

:root {
    --surface-container: #eeeeee;
    --surface-container-lowest: #ffffff;
    --surface-container-high: #e8e8e8;
    --surface-bright: #f9f9f9;
    --on-surface: #1a1c1c;
    --on-secondary-fixed: #1b1c1c;
    --secondary: #5f5e5e;
    --primary: #b02b34;
    --primary-container: #fb6265;
    --on-primary-container: #64000f;
    --outline-soft: #dddddd;
    --divider-soft: #eeeeee;
    --white: #ffffff;

    --container-max: 1280px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;

    --radius-sm: 4px;
    --radius-md: 8px;
}

* {
    box-sizing: border-box;
}

.blog-main {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    color: var(--on-surface);
    font-family: 'Inter', sans-serif;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
}

.hero-card {
    position: relative;
    margin-bottom: var(--space-xl);
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(27, 28, 28, 0.9), rgba(27, 28, 28, 0.4), transparent);
}

.hero-image {
    width: 100%;
    height: 500px;
    display: block;
    object-fit: cover;
    transition: transform 700ms ease;
}

.hero-image-frame .blog-image-default {
    height: 500px;
}

.hero-card:hover .hero-image {
    transform: scale(1.05);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    max-width: 768px;
    padding: var(--space-xl);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-primary {
    color: var(--on-primary-container);
    background: var(--primary-container);
}

.hero-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.hero-content h1 {
    margin: 0 0 var(--space-md);
    color: var(--white);
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.hero-content p {
    max-width: 672px;
    margin: 0 0 var(--space-lg);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 24px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    color: var(--white);
    background: var(--primary-container);
    font-size: 14px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 200ms ease;
}

.btn-primary:hover {
    background: var(--primary);
}

.blog-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-xl);
}

.blog-content {
    grid-column: span 8;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.blog-sidebar {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--surface-container-high);
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.section-header a {
    color: var(--primary);
    font-size: 14px;
    line-height: 16px;
    font-weight: 700;
    text-decoration: none;
}

.section-header a:hover {
    text-decoration: underline;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
}

.article-card,
.featured-article,
.sidebar-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-soft);
}

.article-card {
    overflow: hidden;
}

.article-image-link,
.featured-article {
    color: inherit;
    text-decoration: none;
}

.article-image-link {
    display: block;
}

.blog-image-frame {
    background: var(--surface-container-high);
}

.blog-image-default {
    width: 100%;
    min-height: 192px;
    background:
        linear-gradient(135deg, rgba(176, 43, 52, 0.18), rgba(26, 28, 28, 0.78)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 8px, transparent 8px 16px),
        var(--on-secondary-fixed);
    position: relative;
}

.blog-image-default::after {
    content: "MILENA AUTO PARTS";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
}

.article-card img,
.featured-article img {
    width: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 300ms ease, transform 300ms ease;
}

.article-card img {
    height: 192px;
}

.article-card:hover img,
.featured-article:hover img {
    filter: grayscale(0%);
}

.article-body {
    padding: var(--space-md);
}

.article-date,
.featured-category {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    text-transform: uppercase;
}

.article-date {
    color: var(--secondary);
}

.article-card h3,
.featured-article h3 {
    margin: 0 0 var(--space-sm);
    transition: color 200ms ease;
}

.article-card h3 a {
    color: inherit;
    text-decoration: none;
}

.article-card h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.article-card p,
.featured-article p {
    margin: 0;
    color: var(--secondary);
}

.article-card p {
    font-size: 14px;
    line-height: 20px;
}

.article-card:hover h3,
.featured-article:hover h3 {
    color: var(--primary);
}

.featured-article {
    display: flex;
    overflow: hidden;
}

.featured-image-wrap {
    width: 40%;
    overflow: hidden;
}

.featured-image-wrap img,
.featured-image-wrap .blog-image-default {
    height: 100%;
    min-height: 200px;
}

.featured-body {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-lg);
}

.featured-category {
    color: var(--primary);
    font-weight: 700;
}

.featured-article h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.featured-article p {
    margin-bottom: var(--space-md);
    font-size: 16px;
    line-height: 24px;
}

.sidebar-card {
    padding: var(--space-lg);
}

.sidebar-card h3,
.newsletter-card h3 {
    margin: 0 0 var(--space-md);
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-title-bordered {
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--outline-soft);
}

.search-box {
    position: relative;
}

.search-box input,
.newsletter-card input {
    width: 100%;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    outline: none;
}

.search-box input {
    padding: var(--space-sm) var(--space-xl) var(--space-sm) var(--space-md);
    border: 1px solid var(--outline-soft);
    color: var(--on-surface);
    background: var(--white);
    transition: border-color 200ms ease;
}

.search-box input:focus {
    border-color: var(--primary-container);
}

.search-box .material-symbols-outlined {
    position: absolute;
    top: 50%;
    right: var(--space-md);
    color: var(--secondary);
    transform: translateY(-50%);
}

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

.category-list li+li {
    border-top: 1px solid var(--divider-soft);
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-xs) 0;
    color: var(--on-surface);
    text-decoration: none;
    transition: color 200ms ease;
}

.category-list a:hover {
    color: var(--primary);
}

.category-list span {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

.category-list strong {
    padding: 4px var(--space-sm);
    border-radius: 999px;
    color: var(--on-surface);
    background: var(--surface-container);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.popular-item {
    display: flex;
    gap: var(--space-md);
    color: var(--on-surface);
    text-decoration: none;
}

.popular-item>span {
    color: var(--surface-container-high);
    font-size: 20px;
    line-height: 28px;
    font-weight: 900;
    transition: color 200ms ease;
}

.popular-item h4 {
    margin: 0;
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
    transition: color 200ms ease;
}

.popular-item small {
    color: var(--secondary);
    font-size: 12px;
    line-height: 16px;
}

.popular-item:hover>span {
    color: var(--primary-container);
}

.popular-item:hover h4 {
    color: var(--primary);
}

.empty-copy {
    margin: 0;
    color: var(--secondary);
    font-size: 14px;
    line-height: 20px;
}

.blog-empty-state {
    grid-column: 1 / -1;
    padding: var(--space-lg);
    border: 1px solid var(--outline-soft);
    background: var(--surface-container-lowest);
}

.blog-empty-state .blog-image-default {
    margin-bottom: var(--space-md);
}

.blog-empty-state h3 {
    margin: 0 0 var(--space-sm);
    font-size: 20px;
    line-height: 28px;
}

.blog-empty-state p {
    margin: 0;
    color: var(--secondary);
    font-size: 14px;
    line-height: 20px;
}

.newsletter-card {
    padding: var(--space-lg);
    color: var(--white);
    background: var(--on-secondary-fixed);
}

.newsletter-icon {
    display: inline-block;
    margin-bottom: var(--space-md);
    color: var(--primary-container);
    font-size: 40px;
}

.newsletter-card h3 {
    margin-bottom: var(--space-sm);
    font-size: 20px;
    line-height: 28px;
}

.newsletter-card p {
    margin: 0 0 var(--space-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 20px;
}

.newsletter-card input {
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-card input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-card input:focus {
    border-color: var(--primary-container);
}

.newsletter-card button {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    color: var(--white);
    background: var(--primary-container);
    border: 0;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 200ms ease;
}

.newsletter-card button:hover {
    background: var(--primary);
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-content,
    .blog-sidebar {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding-right: var(--space-lg);
        padding-left: var(--space-lg);
    }

    .hero-content {
        padding: var(--space-lg);
    }

    .hero-content h1 {
        font-size: 28px;
        line-height: 36px;
        letter-spacing: -0.01em;
    }

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

    .featured-article {
        flex-direction: column;
    }

    .featured-image-wrap,
    .featured-body {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .hero-image {
        height: 440px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
