/* ================================
   HERO SECTION
   ================================ */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 48px;
    margin: -48px -48px 64px -48px;
    overflow: hidden;
    background: transparent;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Hero with cover image */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Dark gradient overlay on cover image */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.35) 0%, rgba(17, 24, 39, 0.7) 100%);
    z-index: 1;
}

/* Hero without cover image */
.hero-no-image {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
}

/* Text shadow for readability on images */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1000px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-description {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1000px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 24px 0;
    line-height: 1.08;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.04em;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ================================
   HERO FORM (Ghost Members)
   ================================ */
.hero-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-width: 480px;
    margin: 40px auto 0;
}

/* Pill container for input + button */
.hero-form-inner {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-form-inner:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-form input[type="email"] {
    flex: 1;
    padding: 18px 24px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    min-width: 0;
}

.hero-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.hero-form button[type="submit"] {
    padding: 18px 32px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.hero-form button[type="submit"]:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.hero-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Hero Form Feedback Messages */
.hero-form-success,
.hero-form-error {
    display: none;
    flex-basis: 100%;
    margin: 16px 0 0 0;
    padding: 14px 24px;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    animation: feedbackSlideIn 0.35s ease-out;
}

.hero-form-success {
    background: rgba(22, 163, 74, 0.9);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.hero-form-success svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    margin-top: -2px;
}

.hero-form-error {
    background: rgba(220, 38, 38, 0.9);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.hero-form-success.is-visible,
.hero-form-error.is-visible {
    display: block;
}

@keyframes feedbackSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Form Mobile */
@media (max-width: 767px) {
    .hero-form {
        max-width: 100%;
    }

    .hero-form-inner {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .hero-form input[type="email"] {
        width: 100%;
        text-align: center;
        padding: 16px 20px;
    }

    .hero-form button[type="submit"] {
        width: 100%;
        padding: 16px 24px;
    }

    .hero-form-success,
    .hero-form-error {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .hero {
        margin: -120px -24px 48px -24px;
        padding: 140px 24px 100px;
        min-height: 500px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

/* ================================
   POST SECTION
   ================================ */
.post-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: Georgia, "Times New Roman", Times, serif;
}

.view-more {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
    font-family: Georgia, "Times New Roman", Times, serif;
}

.view-more:hover {
    color: var(--color-primary-hover);
    transform: translateX(4px);
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* Tablet: 2 columns */
@media (max-width: 1023px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

/* Post Card - Overlay Design */
.post-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 5;
}

.post-card-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Post Card Image Background */
.post-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: var(--transition);
}

.post-card-no-image {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
}

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

/* Post Card Gradient Overlay */
.post-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 1;
    transition: var(--transition);
}

.post-card:hover .post-card-overlay {
    background: linear-gradient(to top, rgba(79, 70, 229, 0.85) 0%, rgba(17, 24, 39, 0.3) 50%, transparent 100%);
}

/* Post Card Content */
.post-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
}

.post-card-title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-excerpt {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hidden Posts */
.post-card.is-hidden {
    display: none;
}

/* View More Button */
.view-more-container {
    text-align: center;
    margin-top: 48px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    font-family: Georgia, "Times New Roman", Times, serif;
    background: var(--color-primary);
    color: var(--bg-body);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.view-more-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.view-more-btn:active {
    transform: translateY(-1px);
}

.view-more-btn svg {
    transition: var(--transition);
}

.view-more-btn:hover svg {
    transform: translateY(2px);
}

/* No Posts Fallback */
.no-posts {
    text-align: center;
    padding: 80px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-light);
}

.no-posts-icon {
    margin-bottom: 24px;
    color: var(--text-muted);
}

.no-posts-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
}

.no-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.no-posts-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Mobile Responsive Cards */
@media (max-width: 767px) {
    .post-card {
        aspect-ratio: 16 / 10;
    }

    .post-card-content {
        padding: 16px;
    }

    .post-card-title {
        font-size: 1rem;
    }

    .post-card-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .no-posts {
        padding: 48px 24px;
    }
}

/* Post tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.post-tags a {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.post-tags a:hover {
    background: var(--color-primary);
    color: var(--bg-body);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-primary);
}

/* Two column layout on larger screens */
@media (min-width: 768px) {
    .post-list article {
        grid-template-columns: 440px 1fr;
        min-height: 320px;
    }

    .post-image {
        height: 100%;
    }

    .post-body {
        padding: 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ================================
   FEATURED POST
   ================================ */
.post-list article.featured {
    border: 3px solid var(--color-primary);
    position: relative;
}

.post-list article.featured::before {
    content: '⭐ Featured';
    position: absolute;
    top: 24px;
    left: 24px;
    background: var(--color-primary);
    color: var(--bg-body);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
    box-shadow: var(--shadow-primary);
}

/* ================================
   PAGINATION
   ================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination .page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    padding: 0 20px;
    background: var(--color-white);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    background: var(--color-primary);
    color: var(--bg-body);
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: var(--shadow-primary);
}

.pagination .page-number.current {
    background: var(--color-primary);
    color: var(--bg-body);
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

.pagination .older-posts,
.pagination .newer-posts {
    gap: 10px;
    padding: 0 28px;
}

.pagination .older-posts::after {
    content: '→';
    font-size: 20px;
}

.pagination .newer-posts::before {
    content: '←';
    font-size: 20px;
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

.post-list article {
    animation: fadeInUp 0.6s ease-out backwards;
}

.post-list article:nth-child(1) {
    animation-delay: 0.1s;
}

.post-list article:nth-child(2) {
    animation-delay: 0.2s;
}

.post-list article:nth-child(3) {
    animation-delay: 0.3s;
}

.post-list article:nth-child(4) {
    animation-delay: 0.4s;
}

.post-list article:nth-child(5) {
    animation-delay: 0.5s;
}

.post-list article:nth-child(6) {
    animation-delay: 0.6s;
}

/* ================================
   RESPONSIVE MOBILE FOR INDEX
   ================================ */
@media (max-width: 767px) {
    .hero {
        min-height: 450px;
        padding: 120px 24px 80px;
    }

    .post-list {
        padding: 0 0 48px 0;
    }

    .post-list article {
        margin-bottom: 32px;
    }

    .post-body {
        padding: 32px;
    }

    .pagination {
        padding: 48px 0;
        gap: 12px;
    }

    .pagination a,
    .pagination .page-number {
        min-width: 48px;
        height: 48px;
        padding: 0 16px;
        font-size: 15px;
    }
}

/* ================================
   TAG SECTION
   ================================ */
.tag-section {
    padding: 48px 0 72px;
}

.tag-section .section-header {
    margin-bottom: 24px;
}

.tag-list-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.tag-badge.is-hidden {
    display: none;
}

.tag-count {
    opacity: 0.8;
    font-weight: 400;
}

/* Tag Overflow Dropdown */
.tag-overflow {
    position: relative;
    display: none;
}

.tag-overflow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.tag-overflow-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.tag-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
}

.tag-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tag-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid var(--color-primary);
    transition: var(--transition);
}

.tag-dropdown-item:hover {
    background: var(--bg-light);
}

.tag-dropdown-item .tag-count {
    color: var(--text-muted);
}

/* Post Card Tags */
.post-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.post-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

/* Tag Bar */
.tag-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.tag-bar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Right side container - holds chips + dots button */
.tag-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
}

/* Scrollable chips container */
.tag-bar-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

/* Dots menu wrapper - always visible, high z-index for dropdown */
.chip-menu-wrapper {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    z-index: 1000;
}

/* Chip Styles */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: Georgia, "Times New Roman", Times, serif;
    line-height: 1.2;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.chip:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.chip.is-active {
    color: #ffffff;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.chip.is-hidden {
    display: none;
}

/* Chip Menu Wrapper */
.chip-menu-wrapper {
    position: relative;
    display: inline-flex;
}

.chip-dots {
    width: 44px;
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: var(--bg-light);
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.chip-dots:hover {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

/* Chip Menu */
.chip-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.chip-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chip-menu-list {
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.chip-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: Georgia, "Times New Roman", Times, serif;
    text-align: left;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip-menu-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.chip-menu-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.chip-menu-item.is-active {
    background: var(--color-primary);
    color: #ffffff;
}

.chip-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.chip-menu-action {
    display: block;
    padding: 12px 14px;
    margin: 0 8px 8px;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.chip-menu-action:hover {
    background: var(--bg-light);
}

/* No Tags Message */
.no-tags {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-light);
    color: var(--text-muted);
}

/* Tag Controls */
.tag-controls {
    margin-bottom: 24px;
}

/* Tag Previews Container */
.tag-previews-container {
    position: relative;
}

/* Tag Preview Section */
.tag-preview {
    display: none;
}

.tag-preview.is-visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.tag-preview-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid var(--border-light);
}

.tag-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.tag-preview-link:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tag-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tag-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tag-preview-empty {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-light);
    color: var(--text-muted);
}

/* Tag Section Responsive - Tablet */
@media (max-width: 1023px) {
    .tag-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tag-bar {
        gap: 16px;
    }

    /* Remove flex growth - chips and dots should be tight group */
    .tag-bar-right {
        flex-shrink: 1;
        min-width: 0;
    }

    .tag-bar-chips {
        flex-shrink: 1;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tag-bar-chips::-webkit-scrollbar {
        display: none;
    }

    /* Tablet: Hide 4th and 5th chips - show only 3 */
    .tag-bar-chips>.chip:nth-child(4),
    .tag-bar-chips>.chip:nth-child(5) {
        display: none;
    }

    /* Dots button - touch friendly, high z-index */
    .chip-menu-wrapper {
        flex-shrink: 0;
        z-index: 1000;
    }

    .chip-dots {
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Dropdown positioning on tablet - ensure visible above all content */
    .chip-menu {
        right: 0;
        left: auto;
        z-index: 1001;
    }
}

@media (max-width: 767px) {

    /* Hero Mobile */
    .hero {
        min-height: 400px;
        padding: 100px 24px 80px;
        margin: -48px -24px 48px -24px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Post Section Mobile */
    .post-section {
        padding: 0 16px 48px;
    }

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

    /* Tag Section Mobile */
    .tag-section {
        padding: 32px 0 48px;
    }

    .tag-bar {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
    }

    .tag-bar-title {
        font-size: 1rem;
        flex-shrink: 0;
    }

    /* Remove flex growth - chips and dots tight group */
    .tag-bar-right {
        flex-shrink: 1;
        min-width: 0;
    }

    .tag-bar-chips {
        flex-shrink: 1;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tag-bar-chips::-webkit-scrollbar {
        display: none;
        height: 0;
    }

    .chip {
        padding: 6px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Mobile: Show only 2 chips */
    .tag-bar-chips>.chip:nth-child(3),
    .tag-bar-chips>.chip:nth-child(4),
    .tag-bar-chips>.chip:nth-child(5) {
        display: none;
    }

    /* Mobile dropdown - fits viewport, high z-index */
    .chip-menu {
        right: 0;
        left: auto;
        max-width: calc(100vw - 32px);
        z-index: 1001;
    }

    .tag-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .tag-list::-webkit-scrollbar {
        display: none;
    }

    .tag-pill {
        flex-shrink: 0;
    }

    .tag-preview-grid {
        grid-template-columns: 1fr;
    }

    .tag-preview-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .tag-preview-link {
        width: 100%;
        justify-content: center;
    }

    /* Post Card Mobile */
    .post-card {
        aspect-ratio: 3 / 4;
    }

    .post-card-title {
        font-size: 1.1rem;
    }

    .post-card-excerpt {
        font-size: 0.85rem;
    }

    /* No Posts Message */
    .no-posts {
        padding: 48px 24px;
    }

    .no-posts-icon svg {
        width: 48px;
        height: 48px;
    }

    .no-posts-title {
        font-size: 1.25rem;
    }
}