/* ============================================================
   BLOGS LISTING PAGE — Premium CSS
   mca.college
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --primary:     #4f46e5;
    --primary-dk:  #3730a3;
    --accent:      #7c3aed;
    --accent-lt:   #a78bfa;
    --teal:        #0ea5e9;
    --green:       #10b981;
    --text-dark:   #0f172a;
    --text-mid:    #334155;
    --text-light:  #64748b;
    --bg-page:     #f1f5f9;
    --bg-card:     #ffffff;
    --border:      #e2e8f0;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-card: 0 4px 24px rgba(79,70,229,.08), 0 1px 4px rgba(0,0,0,.04);
    --shadow-hover:0 16px 48px rgba(79,70,229,.16), 0 4px 12px rgba(0,0,0,.08);
    --radius-card: 20px;
    --radius-img:  16px;
    --transition:  0.3s cubic-bezier(.4,0,.2,1);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body {
    background-color: var(--bg-page);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* ════════════════════════════════════════
   HERO SECTION
   ════════════════════════════════════════ */
.blog-hero-section {
    position: relative;
    padding: 90px 0 120px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 40%, #6d28d9 75%, #7c3aed 100%);
}

.blog-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 10% 80%, rgba(99,102,241,.35) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 90% 20%, rgba(167,139,250,.3) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated grid overlay */
.blog-hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-bg-overlay {
    position: absolute;
    inset: 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.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,.25);
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: rgba(255,255,255,.78);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
}

/* Hero animations */
@keyframes popIn {
    from { opacity: 0; transform: translateY(28px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-pop-in   { animation: popIn      .7s ease both; }
.animate-slide-up { animation: slideUpFade .9s .15s ease both; }

/* ════════════════════════════════════════
   MAIN SECTION WRAPPER
   ════════════════════════════════════════ */
.section-bg-light {
    background-color: var(--bg-page);
    border-radius: 36px 36px 0 0;
    margin-top: -40px;
    position: relative;
    z-index: 5;
    padding-top: 52px !important;
}

/* Section header */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79,70,229,.08);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid rgba(79,70,229,.15);
    margin-bottom: 20px;
}
.section-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: .5rem;
    letter-spacing: -.02em;
}
.section-subheading {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ════════════════════════════════════════
   BLOG CARD
   ════════════════════════════════════════ */
.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
    height: 100%;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(124,58,237,.2);
}

/* ── Image Wrapper ── */
.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: var(--radius-img) var(--radius-img) 0 0;
    background: linear-gradient(135deg, #3730a3, #6d28d9);
    flex-shrink: 0;
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.blog-card:hover .blog-image-wrapper img {
    transform: scale(1.07);
}

/* Gradient overlay on image bottom */
.blog-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(15,23,42,.35));
    pointer-events: none;
}

/* Shine sweep on hover */
.shine-effect {
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
    transition: left .6s ease;
    pointer-events: none;
}
.blog-card:hover .shine-effect {
    left: 150%;
}

/* Category badge overlaid on image */
.blog-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.92);
    color: var(--accent);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

/* Read time badge */
.read-time-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
    z-index: 2;
}

/* ── Card Body ── */
.blog-content {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    flex: 1;
}

/* Old category label (below title) — keep for backwards compat but hide via override */
.blog-category {
    display: none;
}

/* Tags / Meta Row */
.blog-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(79,70,229,.08);
    color: var(--primary);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
    border: 1px solid rgba(79,70,229,.12);
}

.blog-date {
    font-size: .72rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Title */
.blog-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 10px;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
    transition: color var(--transition);
}
.blog-card:hover .blog-title {
    color: var(--accent);
}

/* Description */
.blog-desc {
    font-size: .86rem;
    color: var(--text-light);
    line-height: 1.65;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 5em;
    flex: 1;
}

/* Divider */
.blog-card-divider {
    height: 1px;
    background: var(--border);
    margin: 0 0 16px;
}

/* Footer */
.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Author chip */
.author-chip {
    display: flex;
    align-items: center;
    gap: 8px;
}
.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.author-name {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-mid);
}

/* Read More Button */
.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 99px;
    background: transparent;
    border: 2px solid var(--accent) !important;
    color: var(--accent) !important;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: .01em;
    flex-shrink: 0;
}
.btn-read-more:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(124,58,237,.35);
    transform: translateX(2px);
    text-decoration: none;
}
.btn-read-more i {
    transition: transform var(--transition);
}
.btn-read-more:hover i {
    transform: translateX(4px);
}

/* ════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════ */
.empty-blogs-state {
    text-align: center;
    padding: 80px 20px;
}
.empty-blogs-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(79,70,229,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: var(--primary);
}
.empty-blogs-state h4 { color: var(--text-mid); font-weight: 700; }
.empty-blogs-state p  { color: var(--text-light); }

/* ════════════════════════════════════════
   CTA BANNER
   ════════════════════════════════════════ */
.cta-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #6d28d9 100%);
    border-radius: 24px;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(79,70,229,.3);
    margin-top: 56px;
    margin-bottom: 64px !important;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 50%, rgba(167,139,250,.25) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(99,102,241,.2) 0%, transparent 50%);
    pointer-events: none;
}

.banner-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(255,255,255,.08) 2px, transparent 2px),
        radial-gradient(circle at 70% 75%, rgba(255,255,255,.06) 2px, transparent 2px),
        radial-gradient(circle at 85% 15%, rgba(255,255,255,.05) 3px, transparent 3px),
        radial-gradient(circle at 40% 60%, rgba(255,255,255,.07) 1px, transparent 1px);
    pointer-events: none;
}

.cta-banner h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.01em;
}

.cta-banner .btn-hover-effect {
    transition: all var(--transition);
    font-weight: 700;
}
.cta-banner .btn-hover-effect:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(255,255,255,.25);
}

/* ════════════════════════════════════════
   CARD STAGGER ANIMATIONS
   ════════════════════════════════════════ */
@keyframes cardReveal {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

.blog-grid-item {
    animation: cardReveal .6s ease both;
}
.blog-grid-item:nth-child(1) { animation-delay: .05s; }
.blog-grid-item:nth-child(2) { animation-delay: .15s; }
.blog-grid-item:nth-child(3) { animation-delay: .25s; }
.blog-grid-item:nth-child(4) { animation-delay: .35s; }
.blog-grid-item:nth-child(5) { animation-delay: .45s; }
.blog-grid-item:nth-child(6) { animation-delay: .55s; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 991px) {
    .blog-hero-section { padding: 70px 0 100px; }
    .cta-banner { padding: 36px 28px; }
}

@media (max-width: 767px) {
    .blog-hero-section { padding: 60px 0 90px; }
    .blog-image-wrapper { height: 200px; }
    .cta-banner { padding: 30px 20px; border-radius: 18px; }
    .section-bg-light { border-radius: 24px 24px 0 0; margin-top: -24px; }
}

@media (max-width: 576px) {
    .blog-content { padding: 18px 16px 16px; }
    .blog-title { font-size: 1rem; }
    .blog-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
    .btn-read-more { width: 100%; justify-content: center; }
}
