/* ===================================
   Blog Homepage Styles
   =================================== */

.blog-homepage {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 24px;
    margin-bottom: 32px;
}

.hero-featured {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    height: 520px;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 40px;
    background: linear-gradient(to top, rgba(8, 22, 39, 0.95) 0%, rgba(8, 22, 39, 0.7) 60%, transparent 100%);
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--color-text);
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-author {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent);
}

.hero-role {
    font-size: 15px;
    color: var(--color-muted);
}

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.secondary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.secondary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.14);
}

.secondary-link {
    display: flex;
    gap: 16px;
    padding: 14px;
}

.secondary-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
}

.secondary-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.secondary-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.secondary-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.secondary-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-muted);
}

.meta-sep {
    opacity: 0.5;
}

.hero-caption {
    margin-bottom: 70px;
}

.hero-caption-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.hero-caption-title a {
    color: var(--color-text);
    transition: color 140ms ease;
}

.hero-caption-title a:hover {
    color: var(--color-accent);
}

/* Category Sections */
.category-section {
    margin-bottom: 70px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0;
}

.category-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.see-all {
    font-size: 16px;
    color: var(--color-accent);
    font-weight: 500;
    transition: opacity 140ms ease;
}

.see-all:hover {
    opacity: 0.8;
}

.carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    transition: background 140ms ease, border-color 140ms ease;
    cursor: pointer;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.carousel-wrapper {
    overflow: hidden;
}

.card-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.card-carousel::-webkit-scrollbar {
    display: none;
}

.blog-card {
    flex: 0 0 calc(25% - 15px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.16);
}

.card-link {
    display: block;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

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

.card-content {
    padding: 18px;
}

.card-title {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-text);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.card-author {
    color: var(--color-accent);
    font-weight: 500;
    transition: opacity 140ms ease;
}

.card-author:hover {
    opacity: 0.8;
}

.read-time {
    color: var(--color-muted);
}

/* Search & Subscribe Section */
.search-subscribe-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 48px;
    padding: 48px 40px;
    margin: 70px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.section-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.section-heading {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px;
}

.blog-search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 18px 16px 50px;
    font-size: 16px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    transition: border-color 140ms ease, background 140ms ease;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--color-muted);
    opacity: 0.6;
}

.search-input:focus {
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.06);
}

.subscribe-button {
    display: inline-block;
    padding: 16px 28px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(249, 115, 22, 0.35);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.subscribe-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(249, 115, 22, 0.45);
}

/* Responsive Blog Styles */
@media (max-width: 1200px) {
    .blog-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 960px) {
    .blog-homepage {
        padding: 0 20px;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-featured {
        height: 420px;
    }

    .hero-title {
        font-size: 38px;
    }

    .blog-card {
        flex: 0 0 calc(50% - 10px);
    }

    .search-subscribe-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-divider {
        height: 1px;
        width: 100%;
    }

    .category-title {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .blog-homepage {
        padding: 0 16px;
    }

    .hero-featured {
        height: 340px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-overlay {
        padding: 28px 24px;
    }

    .secondary-link {
        flex-direction: column;
        padding: 12px;
    }

    .secondary-thumb {
        width: 100%;
        height: 160px;
    }

    .blog-card {
        flex: 0 0 100%;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-caption-title {
        font-size: 24px;
    }

    .search-subscribe-section {
        padding: 32px 24px;
    }

    .section-heading {
        font-size: 20px;
    }
}