/* ==================== NEW BLOG DESIGN ==================== */

/* Minimal Hero */
.blog-hero-minimal {
    padding: 8rem 0 3rem;
    background: var(--background);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb i {
    font-size: 0.7rem;
}

.page-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
}

/* Floating Filters */
.floating-filters {
    /* padding: 2rem 0; */
    /* background: var(--surface); */
    position: sticky;
    top: 70px;
    z-index: 100;
    /* border-bottom: 1px solid var(--border); */
}

.filter-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--background);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Modern Search */
.modern-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.modern-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.modern-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid transparent;
    background: var(--surface);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modern-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--background);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 0.65rem 1.25rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    /* transform: translateY(-2px); */
}

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.chip .count {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Sort Selector */
.sort-selector select {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Hero Featured (Magazine Style) */
.hero-featured {
    padding: 4rem 0;
    background: var(--background);
}

.featured-wrapper {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
}

.featured-visual {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.featured-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.featured-info {
    padding-right: 2rem;
}

.topic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.featured-info h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-meta img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-meta strong {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.author-meta span {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Bento Grid */
.bento-grid-section {
    padding: 4rem 0 6rem;
    background: var(--background);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 280px;
}

/* Bento Card Base */
.bento-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

/* Card Sizes */
.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card.wide {
    grid-column: span 2;
}

.bento-card.medium {
    grid-row: span 2;
}

.bento-card.small {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
}

/* Card Image */
.card-image {
    position: relative;
    height: 60%;
    overflow: hidden;
}

.bento-card.large .card-image {
    height: 65%;
}

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

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

/* Tags */
.tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

/* Category Tag Colors - Static */
.tag.hrm,
.category-badge.hrm {
    background: rgba(99, 102, 241, 0.95);
    color: white;
}

.tag.data-collection,
.category-badge.data-collection {
    background: rgba(6, 182, 212, 0.95);
    color: white;
}

.tag.website-builder,
.category-badge.website-builder {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}

.tag.user-manual,
.category-badge.user-manual {
    background: rgba(245, 158, 11, 0.95);
    color: white;
}

.tag.uncategorized,
.category-badge.uncategorized {
    background: rgba(107, 114, 128, 0.95);
    color: white;
}


/* Card Body */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.bento-card.large .card-body h3 {
    font-size: 1.5rem;
}

.card-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: auto;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-mini span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Small Card Body */
.card-body-small {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: white;
}

.card-body-small .tag {
    position: static;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.card-body-small h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.4;
    margin-bottom: auto;
}

.card-body-small .card-meta {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-body-small .date,
.card-body-small .read-time {
    color: rgba(255, 255, 255, 0.9);
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 4rem;
}

.load-more-btn {
    padding: 1rem 3rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.load-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ==================== RESPONSIVE ==================== */

/* Large Tablets (1200px) */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-title {
        font-size: 3rem;
    }
}

/* Tablets (968px) */
@media (max-width: 968px) {
    .page-title {
        font-size: 2.5rem;
    }

    .filter-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .modern-search {
        max-width: 100%;
    }

    .featured-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .featured-info {
        padding-right: 0;
    }

    .featured-info h2 {
        font-size: 2rem;
    }

    .meta-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
    }

    .bento-card.large,
    .bento-card.wide,
    .bento-card.medium {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Mobile (768px) */
@media (max-width: 768px) {
    .blog-hero-minimal {
        padding: 6rem 0 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.05rem;
    }

    .filter-chips {
        overflow-x: scroll;
    }

    .featured-info h2 {
        font-size: 1.75rem;
    }

    .excerpt {
        font-size: 1rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 320px;
    }

}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }

    .featured-info h2 {
        font-size: 1.5rem;
    }

    .bento-grid {
        grid-auto-rows: 280px;
    }

}

.custom-dropdown {
    position: relative;
    min-width: 180px;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-selected:hover {
    border-color: var(--primary);
    background: var(--background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dropdown-selected i {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-selected i {
    transform: rotate(180deg);
    color: var(--primary);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

[data-theme="dark"] .dropdown-options {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-dropdown.active .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-option:hover {
    background: var(--surface);
    color: var(--primary);
}

.dropdown-option.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.dropdown-option i {
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-option.active i {
    opacity: 1;
}

/* Dark Mode for Custom Dropdown */
[data-theme="dark"] .dropdown-selected {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .dropdown-selected:hover {
    background: var(--background);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dropdown-options {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .dropdown-option:hover {
    background: var(--background);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .sort-selector select {
        min-width: 160px;
        font-size: 0.9rem;
        padding: 0.7rem 2.75rem 0.7rem 1rem;
    }

    .sort-selector::after {
        right: 1rem;
        font-size: 0.85rem;
    }

    .custom-dropdown {
        min-width: 160px;
    }

    .dropdown-selected {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .dropdown-option {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sort-selector select {
        min-width: 140px;
        font-size: 0.85rem;
        padding: 0.65rem 2.5rem 0.65rem 0.9rem;
    }

    .custom-dropdown {
        min-width: 140px;
    }

    .dropdown-selected {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
    }

    .dropdown-option {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* Card Meta Right Alignment */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.meta-right span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Card Transitions */
.bento-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Smooth Grid Reorder */
.bento-grid {
    transition: all 0.3s ease;
}

/* Responsive Meta */
@media (max-width: 768px) {
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .meta-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Hidden cards - initially hidden */
.bento-card.hidden-card {
    display: none !important;
}

/* Show animation */
.bento-card.show-card {
    display: flex !important;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No More Posts */
.no-more-posts {
    text-align: center;
    padding: 2rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Loading State */
.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}