/* Blog Magazine Style - Motor.es Inspired */

/* ========== Hero Section ========== */
.blog-hero {
    padding: 30px 0 40px;
    background: #fff;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0;
    min-height: 450px;
    border-radius: 16px;
    overflow: hidden;
}

/* Main Article (Left) */
.hero-main {
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

.hero-main-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.hero-main-image {
    position: relative;
    height: 100%;
    min-height: 450px;
}

.hero-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-main:hover .hero-main-image img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.hero-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-author {
    display: inline-block;
    background: #0891b2;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Secondary Articles (Right) */
.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-small {
    flex: 1;
    position: relative;
    border-radius: 0;
    overflow: hidden;
}

.hero-small-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.hero-small-image {
    position: relative;
    height: 100%;
    min-height: 215px;
}

.hero-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-small:hover .hero-small-image img {
    transform: scale(1.03);
}

.hero-small .hero-overlay {
    padding: 20px;
}

.hero-small-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ========== Latest Section (Horizontal Article) ========== */
.latest-section {
    padding: 40px 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #0891b2;
    display: inline-block;
}

.latest-article {
    background: #fff;
}

.latest-link {
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: 30px;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.latest-link:hover {
    color: inherit;
}

.latest-image {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.latest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.latest-link:hover .latest-image img {
    transform: scale(1.03);
}

.latest-content {
    padding: 10px 0;
}

.latest-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin: 0 0 15px 0;
    transition: color 0.2s ease;
}

.latest-link:hover .latest-title {
    color: #0891b2;
}

.latest-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.meta-author {
    color: #0891b2;
    font-weight: 600;
    font-size: 0.9rem;
}

.meta-separator {
    color: #9ca3af;
}

.meta-time {
    color: #6b7280;
    font-size: 0.9rem;
}

.latest-excerpt {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

/* ========== Articles Section ========== */
.articles-section {
    padding: 40px 0 60px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* Tags Bar */
.tags-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-link:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.tag-link.active {
    background: #0891b2;
    color: #fff;
}

.tag-link.tag-clear {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.tag-link.tag-clear:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Articles Grid - 4 columns */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-link:hover {
    color: inherit;
}

.article-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 12px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-content {
    padding: 15px 5px;
}

.article-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.article-card:hover .article-title {
    color: #0891b2;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.article-meta .meta-author {
    font-size: 0.8rem;
}

.article-meta .meta-separator {
    font-size: 0.75rem;
}

.article-meta .meta-time {
    font-size: 0.8rem;
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 80px 20px;
    background: #f9fafb;
    border-radius: 16px;
}

.no-articles i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 20px;
    display: block;
}

.no-articles h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.no-articles p {
    color: #6b7280;
    margin: 0 0 25px 0;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: #0891b2;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #0e7490;
    color: #fff;
    transform: translateY(-2px);
}

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 50px 0;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cta-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.cta-text p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin: 0;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    background: #0891b2;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cta-btn:hover {
    background: #0e7490;
    color: #fff;
    transform: scale(1.03);
}

/* ========== Responsive Design ========== */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-main-image {
        min-height: 350px;
    }

    .hero-secondary {
        flex-direction: row;
    }

    .hero-small-image {
        min-height: 200px;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .latest-link {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .latest-image {
        aspect-ratio: 16/9;
    }

    .latest-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 20px 0 30px;
    }

    .hero-grid {
        gap: 0;
    }

    .hero-main-image {
        min-height: 280px;
    }

    .hero-main-title {
        font-size: 1.35rem;
    }

    .hero-secondary {
        flex-direction: column;
    }

    .hero-small-image {
        min-height: 180px;
    }

    .hero-small-title {
        font-size: 1rem;
    }

    .latest-section {
        padding: 30px 0;
    }

    .latest-title {
        font-size: 1.25rem;
    }

    .articles-section {
        padding: 30px 0 50px;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-text {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .hero-main-image {
        min-height: 220px;
    }

    .hero-main-title {
        font-size: 1.15rem;
    }

    .hero-overlay {
        padding: 20px;
    }

    .hero-small .hero-overlay {
        padding: 15px;
    }

    .hero-small-title {
        font-size: 0.9rem;
    }

    .hero-author {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .section-heading {
        font-size: 1.1rem;
    }

    .latest-title {
        font-size: 1.1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .article-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .article-content {
        padding: 10px 3px;
    }

    .tags-bar {
        gap: 8px;
    }

    .tag-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .cta-text h3 {
        font-size: 1.25rem;
    }

    .cta-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}
