/* ---------- MAIN LAYOUT ---------- */
.tag-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.tag-content {
    padding: 30px 0;
}

/* ---------- TAG HERO ---------- */
.tag-hero {
    background: linear-gradient(135deg, #f08c00 0%, #ff9900 100%);
    border-radius: 16px;
    padding: 40px 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 24px rgba(240, 140, 0, 0.3);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-icon {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-text h1 {
    margin: 0 0 8px;
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.post-count {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ---------- FILTERS SECTION (FIXED ALIGNMENT) ---------- */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filter-group label i {
    margin-right: 6px;
    color: #f08c00;
}

/* Updated Select for 50px Height */
.filter-group select {
    width: 100%;
    height: 50px; /* Force 50px height */
    padding: 0 16px; /* Vertical padding 0 since height is set */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensures padding doesn't add to height */
}

.filter-group select:focus {
    outline: none;
    border-color: #f08c00;
    box-shadow: 0 0 0 3px rgba(240, 140, 0, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-self: flex-end;
}

/* Updated Buttons for 50px Height */
.btn-apply,
.btn-reset {
    height: 50px; /* Force 50px height */
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box; /* Ensures padding doesn't add to height */
}

.btn-apply {
    background: linear-gradient(135deg, #f08c00 0%, #ff9900 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(240, 140, 0, 0.3);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 140, 0, 0.4);
}

.btn-reset {
    background: #f5f5f5;
    color: #666;
}

.btn-reset:hover {
    background: #e0e0e0;
    color: #333;
}

/* ---------- POSTS GRID ---------- */
.posts-section {
    margin-bottom: 50px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 16, 112, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.post-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(240, 140, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-content {
    padding: 20px;
}

.post-content h3 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-card:hover .post-content h3 {
    color: #f08c00;
}

.post-excerpt {
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.post-author,
.post-views {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-author i,
.post-views i {
    color: #f08c00;
}

/* ---------- NO RESULTS ---------- */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.no-results i {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.no-results h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.no-results p {
    margin: 0 0 25px;
    font-size: 16px;
    color: #666;
}

.btn-back {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f08c00 0%, #ff9900 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(240, 140, 0, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 140, 0, 0.4);
}

/* ---------- BACK TO TOP BUTTON ---------- */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    font-size: 40px;
    font-weight: bold;
    background-color: white;
    color: #001070;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s, color 0.3s;
}

#backToTop:hover {
    background-color: #001070;
    color: white;
}

/* ---------- HOVER EFFECTS ---------- */
.hover-zoom {
    transition: transform 0.4s ease;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .tag-hero {
        padding: 30px 20px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-icon {
        font-size: 48px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .filters-form {
        flex-direction: column;
        flex-wrap: wrap;
    }

    .filter-group {
        width: 100%;
        min-width: auto;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-apply,
    .btn-reset {
        flex: 1;
        justify-content: center;
        height: 50px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 24px;
    }

    .post-content h3 {
        font-size: 17px;
    }

    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-apply,
    .btn-reset {
        width: 100%;
    }
}