/**
 * Blog Archive — Ultra Premium Design
 * AqaratPlus Theme — Mustafa Mohammed
 */

/* =====================
   ROOT VARIABLES
   ===================== */
.aq-blog-archive-wrapper {
    --ba-primary:   var(--color-primary, #731452);
    --ba-secondary: var(--color-secondary, #111827);
    --ba-gold:      #C9A84C;
    --ba-bg:        #f4f6f9;
    --ba-white:     #ffffff;
    --ba-radius:    18px;
    --ba-shadow:    0 10px 35px rgba(0, 0, 0, 0.07);
    --ba-shadow-hover: 0 22px 55px rgba(0, 0, 0, 0.13);
    --ba-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: var(--ba-bg);
    min-height: 100vh;
}

/* =====================
   1. HERO HEADER
   ===================== */
.ba-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--ba-secondary);
}

/* Background image */
.ba-hero[style] {
    background-size: cover;
    background-position: center;
}

/* Multi-layer overlay */
.ba-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(17,24,39, 0.92) 0%,
            rgba(115,20,82, 0.78) 60%,
            rgba(201,168,76, 0.25) 100%
        );
    z-index: 1;
}

/* Decorative animated circles */
.ba-hero-deco {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ba-hero-deco span {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
    background: var(--ba-gold);
    animation: baDrift 12s ease-in-out infinite alternate;
}

.ba-hero-deco span:nth-child(1) {
    width: 500px; height: 500px;
    top: -200px; right: -100px;
    animation-duration: 14s;
}
.ba-hero-deco span:nth-child(2) {
    width: 300px; height: 300px;
    bottom: -120px; left: 10%;
    animation-duration: 10s;
    animation-delay: -3s;
}
.ba-hero-deco span:nth-child(3) {
    width: 180px; height: 180px;
    top: 40%; left: 40%;
    background: var(--ba-primary);
    opacity: 0.06;
    animation-duration: 16s;
    animation-delay: -6s;
}

@keyframes baDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -20px) scale(1.05); }
    100% { transform: translate(-20px, 30px) scale(0.95); }
}

.ba-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 80px 0 90px;
    width: 100%;
}

/* Breadcrumb */
.ba-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 24px;
    background: rgba(255,255,255,0.06);
    padding: 7px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
}

.ba-breadcrumb a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.ba-breadcrumb a:hover { color: var(--ba-gold); }
.ba-breadcrumb i { font-size: 10px; color: var(--ba-gold); }

/* Title */
.ba-hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 18px;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.ba-hero-title span {
    background: linear-gradient(135deg, var(--ba-gold) 0%, #e8c96f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.ba-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255,255,255,0.80);
    margin: 0 0 32px;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Stats row */
.ba-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ba-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--ba-transition);
}

.ba-hero-stat:hover {
    background: rgba(201,168,76,0.2);
    border-color: var(--ba-gold);
    color: var(--ba-gold);
    transform: translateY(-2px);
}

.ba-hero-stat i { color: var(--ba-gold); font-size: 15px; }

/* Scroll indicator */
.ba-scroll-indicator {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    letter-spacing: 1px;
    animation: baScrollBounce 2s ease-in-out infinite;
}
.ba-scroll-indicator i { font-size: 16px; }

@keyframes baScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* Wave separator */
.ba-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    z-index: 2;
    line-height: 0;
}
.ba-hero-wave svg {
    display: block;
    width: 100%;
    height: 55px;
    fill: var(--ba-bg);
}

/* =====================
   2. FILTER BAR
   ===================== */
.ba-filter-bar {
    background: var(--ba-white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 200;
    padding: 0;
    border-bottom: 1px solid #eef0f4;
}

.ba-filter-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.ba-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    background: #f0f2f7;
    color: #555;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
    transition: var(--ba-transition);
    border: 2px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.ba-filter-btn i {
    font-size: 12px;
    opacity: 0.7;
    transition: var(--ba-transition);
}

.ba-filter-btn:hover {
    background: rgba(115,20,82,0.08);
    color: var(--ba-primary);
    border-color: rgba(115,20,82,0.2);
    transform: translateY(-1px);
}

.ba-filter-btn.active,
.ba-filter-btn:focus {
    background: var(--ba-primary);
    color: #fff;
    border-color: var(--ba-primary);
    box-shadow: 0 6px 20px rgba(115,20,82,0.3);
    transform: translateY(-2px);
}
.ba-filter-btn.active i { opacity: 1; }

/* =====================
   3. MAIN CONTENT
   ===================== */
.ba-main {
    padding: 70px 0 100px;
}

/* Section label */
.ba-section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.ba-section-label .ba-label-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e0e0e0, transparent);
}

.ba-section-label .ba-label-line:first-child {
    background: linear-gradient(270deg, #e0e0e0, transparent);
}

.ba-section-label span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ba-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================
   4. FEATURED POST
   ===================== */
.ba-featured-post {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: var(--ba-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--ba-shadow);
    margin-bottom: 60px;
    transition: var(--ba-transition);
    border: 1px solid rgba(0,0,0,0.04);
}

.ba-featured-post:hover {
    box-shadow: var(--ba-shadow-hover);
    transform: translateY(-4px);
}

/* Featured badge */
.ba-featured-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    background: linear-gradient(135deg, var(--ba-gold) 0%, #e8c56b 100%);
    color: #3a2200;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(201,168,76,0.4);
}

/* Featured image */
.ba-featured-image {
    position: relative;
    overflow: hidden;
    min-height: 440px;
}

.ba-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.ba-featured-post:hover .ba-featured-image img {
    transform: scale(1.05);
}

/* Gradient overlay on image */
.ba-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(255,255,255,0.08));
    pointer-events: none;
    z-index: 1;
}

.ba-featured-cat {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    background: var(--ba-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

/* Featured body */
.ba-featured-body {
    padding: 48px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ba-post-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #888;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ba-post-meta-row i { color: var(--ba-primary); margin-left: 5px; }

.ba-post-meta-sep {
    width: 4px; height: 4px;
    background: #ccc;
    border-radius: 50%;
}

.ba-featured-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    color: var(--ba-secondary);
    margin: 0 0 18px;
    line-height: 1.4;
}

.ba-featured-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s;
}
.ba-featured-title a:hover { color: var(--ba-primary); }

.ba-featured-excerpt {
    color: #666;
    font-size: 0.97rem;
    line-height: 1.85;
    margin: 0 0 30px;
    flex: 1;
}

.ba-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ba-primary);
    color: #fff;
    padding: 13px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14.5px;
    transition: var(--ba-transition);
    align-self: flex-start;
    letter-spacing: 0.3px;
}

.ba-read-more-btn:hover {
    background: var(--ba-secondary);
    color: #fff;
    transform: translateX(-4px);
    box-shadow: 0 10px 28px rgba(17,24,39,0.18);
}

.ba-read-more-btn i { font-size: 12px; transition: transform 0.3s; }
.ba-read-more-btn:hover i { transform: translateX(-4px); }

/* =====================
   5. POSTS GRID
   ===================== */
.ba-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

/* =====================
   6. POST CARD
   ===================== */
.ba-post-card {
    background: var(--ba-white);
    border-radius: var(--ba-radius);
    overflow: hidden;
    box-shadow: var(--ba-shadow);
    transition: var(--ba-transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
}

.ba-post-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ba-primary) 0%, var(--ba-gold) 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: 2;
}

.ba-post-card:hover::before { transform: scaleX(1); }

.ba-post-card:hover {
    box-shadow: var(--ba-shadow-hover);
    transform: translateY(-7px);
}

/* Card thumbnail */
.ba-card-thumb {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, #eee, #ddd);
}

.ba-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.ba-post-card:hover .ba-card-thumb img { transform: scale(1.08); }

/* No-image placeholder */
.ba-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0e8f5 0%, #e8f0fa 100%);
    font-size: 52px;
    color: rgba(115,20,82,0.15);
}

.ba-cat-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--ba-primary);
    color: #fff;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.3px;
}

/* Reading time pill */
.ba-reading-time {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

/* Card body */
.ba-card-body {
    padding: 26px 28px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ba-card-meta {
    display: flex;
    gap: 14px;
    font-size: 12.5px;
    color: #999;
    margin-bottom: 13px;
}
.ba-card-meta i { color: var(--ba-primary); }

.ba-card-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--ba-secondary);
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ba-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s;
}
.ba-card-title a:hover { color: var(--ba-primary); }

.ba-card-excerpt {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.8;
    flex: 1;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card footer */
.ba-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f3f3;
}

.ba-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ba-primary);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: var(--ba-transition);
    border-bottom: 2px solid transparent;
}

.ba-card-read-more:hover {
    color: var(--ba-secondary);
    border-bottom-color: var(--ba-gold);
    gap: 11px;
}

.ba-card-read-more i { font-size: 11px; transition: transform 0.3s; }
.ba-card-read-more:hover i { transform: translateX(-4px); }

/* =====================
   7. SIDEBAR LAYOUT (optional)
   ===================== */
.ba-layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.ba-sidebar {
    position: sticky;
    top: 80px;
}

.ba-widget {
    background: var(--ba-white);
    border-radius: var(--ba-radius);
    box-shadow: var(--ba-shadow);
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid rgba(0,0,0,0.04);
}

.ba-widget-header {
    background: linear-gradient(135deg, var(--ba-secondary) 0%, #1e0a2e 100%);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ba-widget-header i {
    color: var(--ba-gold);
    font-size: 15px;
}

.ba-widget-header h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.ba-widget-body { padding: 22px 24px; }

/* =====================
   8. PAGINATION
   ===================== */
.ba-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ba-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ba-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 16px;
    background: var(--ba-white);
    color: #556;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    transition: var(--ba-transition);
    border: 2px solid transparent;
}

.ba-pagination .page-numbers:hover {
    background: var(--ba-primary);
    color: #fff;
    border-color: var(--ba-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(115,20,82,0.28);
}

.ba-pagination .page-numbers.current {
    background: var(--ba-primary);
    color: #fff;
    border-color: var(--ba-primary);
    box-shadow: 0 8px 22px rgba(115,20,82,0.3);
    transform: translateY(-2px);
}

.ba-pagination .page-numbers.dots {
    background: transparent;
    box-shadow: none;
    border: none;
    color: #aaa;
}

.ba-pagination .prev,
.ba-pagination .next {
    background: var(--ba-secondary);
    color: #fff;
    border-radius: 12px;
    min-width: 52px;
}

.ba-pagination .prev:hover,
.ba-pagination .next:hover {
    background: var(--ba-primary);
    color: #fff;
}

/* =====================
   9. EMPTY STATE
   ===================== */
.ba-empty {
    text-align: center;
    padding: 100px 20px;
    background: var(--ba-white);
    border-radius: 24px;
    box-shadow: var(--ba-shadow);
}

.ba-empty-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(115,20,82,0.08), rgba(201,168,76,0.12));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
}

.ba-empty h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ba-secondary);
    margin: 0 0 12px;
}

.ba-empty p {
    color: #888;
    font-size: 1rem;
    margin: 0;
}

/* =====================
   10. LOAD MORE ANIMATION
   ===================== */
@keyframes baCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ba-post-card {
    animation: baCardFadeIn 0.5s ease both;
}
.ba-post-card:nth-child(1) { animation-delay: 0.05s; }
.ba-post-card:nth-child(2) { animation-delay: 0.12s; }
.ba-post-card:nth-child(3) { animation-delay: 0.19s; }
.ba-post-card:nth-child(4) { animation-delay: 0.26s; }
.ba-post-card:nth-child(5) { animation-delay: 0.33s; }
.ba-post-card:nth-child(6) { animation-delay: 0.40s; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1200px) {
    .ba-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .ba-layout-with-sidebar { grid-template-columns: 1fr 280px; }
}

@media (max-width: 1024px) {
    .ba-featured-post {
        grid-template-columns: 1fr;
    }
    .ba-featured-image {
        min-height: 320px;
    }
    .ba-featured-body {
        padding: 36px 38px;
    }
    .ba-layout-with-sidebar {
        grid-template-columns: 1fr;
    }
    .ba-sidebar { position: static; }
}

@media (max-width: 768px) {
    .ba-hero { min-height: 420px; }
    .ba-hero-content { padding: 60px 0 75px; }
    .ba-posts-grid { grid-template-columns: 1fr; gap: 22px; }
    .ba-featured-body { padding: 28px 26px; }
    .ba-main { padding: 50px 0 70px; }
    .ba-filter-inner { padding: 12px 0; gap: 7px; }
    .ba-filter-btn { padding: 8px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
    .ba-hero-title { font-size: 2rem; }
    .ba-card-body { padding: 20px 20px 18px; }
    .ba-hero-stats { gap: 10px; }
    .ba-hero-stat { padding: 8px 16px; font-size: 13px; }
    .ba-read-more-btn { width: 100%; justify-content: center; }
    .ba-featured-post { border-radius: 16px; }
}
