/**
 * BLOG DYNAMIC STYLES
 * Premium styling for the dynamic WordPress blog page
 * Hurghada Tours Hub - Version 1.0
 */

/* ========================================
   BLOG LAYOUT
======================================== */
.blog-main {
    background: #FAFAF9;
    min-height: 100vh;
    padding-top: 6rem;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   BLOG HEADER
======================================== */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #0A4D4E;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-subtitle {
    font-size: 1.25rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   FILTER SECTION
======================================== */
.blog-filters {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #F5EFE6;
    color: #0A4D4E;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.filter-pill:hover {
    background: #EDE5D8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-pill.active {
    background: linear-gradient(135deg, #F97316, #D97706);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.pill-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Tag Pills Variation */
.tag-pill {
    background: #E0F2FE;
    color: #0369A1;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.tag-pill:hover {
    background: #BAE6FD;
}

.tag-pill.active {
    background: linear-gradient(135deg, #0EA5E9, #0284C7);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

/* Active Filters Display */
.active-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.active-label {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 500;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FEF3C7;
    color: #92400E;
    padding: 0.4rem 0.875rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.remove-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.remove-filter:hover {
    background: #DC2626;
    color: white;
}

.reset-filters {
    margin-left: auto;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.reset-filters:hover {
    color: #F97316;
}

/* ========================================
   BLOG FILTER TOC STYLE (Like "In This Guide")
======================================== */
.blog-filter-toc {
    background: linear-gradient(135deg, #FEFCE8 0%, #FEF3C7 100%);
    border: 2px solid #F59E0B;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.tags-filter-toc {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-color: #3B82F6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.filter-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-toc-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #0A4D4E;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-toc-toggle {
    background: #0A4D4E;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toc-toggle:hover {
    background: #0E7490;
    transform: scale(1.1);
}

.filter-toc-toggle.collapsed {
    transform: rotate(-90deg);
}

.filter-toc-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem 2rem;
}

.filter-toc-list.collapsed {
    display: none;
}

.filter-toc-list li {
    margin: 0;
}

.filter-toc-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
}

.filter-toc-list a:hover {
    background: white;
    color: #0E7490;
    border-color: #0E7490;
    transform: translateX(5px);
}

.filter-toc-list a.active {
    background: #0A4D4E;
    color: white;
    border-color: #0A4D4E;
}

.filter-toc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #0E7490;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.filter-toc-list a:hover .filter-toc-number {
    background: #F97316;
}

.filter-toc-list a.active .filter-toc-number {
    background: #F97316;
}

.filter-toc-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.filter-toc-text {
    flex-grow: 1;
}

.filter-toc-count {
    background: rgba(0, 0, 0, 0.1);
    color: #64748B;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-toc-list a.active .filter-toc-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.more-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #64748B;
    font-style: italic;
    font-size: 0.9rem;
}

/* Tags List Variation */
.tags-list a .filter-toc-number {
    background: #3B82F6;
}

.tags-list a:hover .filter-toc-number {
    background: #F97316;
}

.tags-list a.active .filter-toc-number {
    background: #F97316;
}

/* Active Filters Banner */
.active-filters-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #F59E0B;
}

.active-filters-banner .active-label {
    font-weight: 600;
    color: #92400E;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #92400E;
    padding: 0.4rem 0.875rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #F59E0B;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.active-filter-chip.tag-chip {
    border-color: #3B82F6;
    color: #1E40AF;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.remove-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #DC2626;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    transition: all 0.2s;
}

.remove-chip:hover {
    background: #B91C1C;
    transform: scale(1.1);
}

.reset-all-btn {
    margin-left: auto;
    color: #92400E;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: white;
    transition: all 0.3s ease;
}

.reset-all-btn:hover {
    background: #F97316;
    color: white;
}

/* Responsive Filter TOC */
@media (max-width: 768px) {
    .blog-filter-toc {
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
    }

    .filter-toc-list {
        grid-template-columns: 1fr;
    }

    .filter-toc-list a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .active-filters-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .reset-all-btn {
        margin-left: 0;
    }
}

/* ========================================
   FEATURED ARTICLE
======================================== */
.featured-article {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-article:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.featured-image {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s ease;
}

.featured-article:hover .featured-image {
    transform: scale(1.02);
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, #F97316, #D97706);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    animation: pulse 2s infinite;
}

.featured-content {
    padding: 2.5rem;
}

.featured-meta {
    margin-bottom: 1rem;
}

.meta-category {
    color: #F97316;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #0A4D4E;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 1.125rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.featured-info {
    display: flex;
    gap: 1.5rem;
    color: #64748B;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.featured-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #F97316, #D97706);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.featured-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.45);
}

/* ========================================
   BLOG GRID
======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out backwards;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.15s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.25s;
}

.blog-card:nth-child(5) {
    animation-delay: 0.3s;
}

.blog-card:nth-child(6) {
    animation-delay: 0.35s;
}

.blog-card:nth-child(7) {
    animation-delay: 0.4s;
}

.blog-card:nth-child(8) {
    animation-delay: 0.45s;
}

.blog-card:nth-child(9) {
    animation-delay: 0.5s;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    position: relative;
}

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

.card-content {
    padding: 1.75rem;
}

.card-category {
    display: inline-block;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: #E0F7FA;
    color: #00838F;
}

/* Category color variations */
.category-hotels {
    background: #FEF3C7;
    color: #92400E;
}

.category-diving {
    background: #DBEAFE;
    color: #1E40AF;
}

.category-tours {
    background: #FEE2E2;
    color: #991B1B;
}

.category-tips {
    background: #D1FAE5;
    color: #065F46;
}

.category-food {
    background: #FCE7F3;
    color: #9D174D;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: #0A4D4E;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    transition: color 0.2s;
}

.blog-card:hover .card-title {
    color: #F97316;
}

.card-excerpt {
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.card-tag {
    font-size: 0.75rem;
    color: #0EA5E9;
    background: #F0F9FF;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #F1F5F9;
}

.card-date {
    font-size: 0.85rem;
    color: #94A3B8;
}

.card-link {
    color: #F97316;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.card-link:hover {
    color: #D97706;
    transform: translateX(4px);
}

/* No Posts State */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-posts h3 {
    color: #0A4D4E;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-posts p {
    color: #64748B;
}

.no-posts a {
    color: #F97316;
    font-weight: 600;
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pagination ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: flex;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    border-radius: 50px;
    background: white;
    color: #0A4D4E;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination a:hover {
    background: #F5EFE6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pagination .current {
    background: linear-gradient(135deg, #F97316, #D97706);
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.pagination .dots {
    background: transparent;
    box-shadow: none;
    color: #94A3B8;
}

/* ========================================
   NEWSLETTER SECTION
======================================== */
.newsletter-section {
    background: linear-gradient(135deg, #0A4D4E 0%, #0E7490 100%);
    border-radius: 24px;
    padding: 3rem;
    margin: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.newsletter-content {
    position: relative;
    z-index: 1;
}

.newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: white;
    margin-bottom: 1rem;
}

.newsletter-text {
    font-size: 1.1rem;
    color: #E0F2FE;
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 260px;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 2px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.newsletter-input:focus {
    outline: none;
    border-color: #F97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.newsletter-btn {
    background: white;
    color: #0A4D4E;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.newsletter-btn:hover {
    background: #F97316;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

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

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 992px) {
    .blog-container {
        padding: 1.5rem;
    }

    .featured-article {
        display: block;
    }

    .featured-image {
        height: 280px;
    }

    .featured-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding-top: 5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

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

    .featured-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .active-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .reset-filters {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .newsletter-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        margin-bottom: 2rem;
    }

    .blog-filters {
        padding: 1.25rem;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .card-content {
        padding: 1.25rem;
    }

    .pagination a,
    .pagination span {
        min-width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .blog-card,
    .featured-article,
    .filter-pill,
    .blog-header,
    .blog-filters {
        animation: none;
        transition: none;
    }
}