/* ============================================================
   blog.css – Dr. P R Krishnan Neurology Insights & Blog Page
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #142e42;
    --navy-dark: #0d2232;
    --teal: #096577;
    --teal-dark: #084b59;
    --teal-light: #eff7fa;
    --teal-glow: rgba(9, 101, 119, 0.15);
    --gold: #d97706;
    --muted: #5c7180;
    --muted-light: #899ea9;
    --line: #dce6eb;
    --card-bg: #ffffff;
    --card-bdr: #e2ebf0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --sh-sm: 0 4px 18px rgba(20, 46, 66, 0.05);
    --sh-md: 0 10px 30px rgba(20, 46, 66, 0.09);
    --sh-hover: 0 16px 36px rgba(9, 101, 119, 0.15);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--navy);
    background: #fbfdfe;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

em {
    font-style: normal;
    color: var(--teal);
}

/* ── LAYOUT ── */
.wrap {
    width: min(1232px, calc(100% - 80px));
    margin: auto;
}

/* ── TOP BAR ── */
.topline {
    background: var(--navy);
    color: #d4e1e9;
    font-size: 12px;
    letter-spacing: .04em;
    padding: 9px 0;
}

.topline .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── HEADER ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5edf1;
}

.navrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 88px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-brand {
    gap: 0;
}

.logo-img {
    height: 100px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: opacity .2s;
}

.logo-img:hover {
    opacity: 0.85;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    max-width: 260px;
}

nav {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 500;
}

nav a {
    padding: 32px 0;
    position: relative;
    transition: color .2s;
}

nav a:hover,
nav a.active {
    color: var(--teal);
}

nav a.active:after,
nav a.active::after {
    position: absolute;
    content: '';
    bottom: 20px;
    width: 100%;
    height: 2px;
    background: var(--teal);
    left: 0;
}

/* Button components */
.button,
.btn {
    background: var(--teal);
    color: white;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    text-decoration: none;
}

.button:hover,
.btn:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(9, 101, 119, 0.25);
    color: white;
}

.button span,
.btn span {
    font-size: 16px;
    font-weight: 400;
}

.navcta {
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
}

/* Mobile menu toggle */
.menu {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: var(--navy);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
    background: #f4f8fb;
    border-bottom: 1px solid #e0eaef;
    padding: 10px 0;
    font-size: 13px;
    color: var(--muted);
}

.breadcrumb-bar a {
    color: var(--teal);
}

.breadcrumb-bar a:hover {
    text-decoration: underline;
}

/* ── HERO BLOG SECTION ── */
.blog-hero {
    background: linear-gradient(135deg, #eef7fa 0%, #f4f9fc 50%, #e6f1f7 100%);
    padding: 55px 0 45px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.blog-hero-content {
    max-width: 820px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
    display: inline-block;
}

.blog-hero h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.blog-hero p {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Search and Filters */
.blog-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

.blog-search-box {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.blog-search-input {
    width: 100%;
    padding: 12px 18px 12px 42px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--line);
    background: #ffffff;
    font-size: 14.5px;
    color: var(--navy);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-glow);
}

.blog-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--navy);
    background: #ffffff;
    border: 1px solid var(--line);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-pill:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.filter-pill.active {
    background: var(--teal);
    color: #ffffff;
    border-color: var(--teal);
    box-shadow: 0 4px 12px rgba(9, 101, 119, 0.25);
}

/* ── FEATURED POST CARD ── */
.featured-section {
    padding: 50px 0 30px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #ffffff;
    border: 1px solid var(--card-bdr);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--sh-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-hover);
}

.featured-img-wrap {
    position: relative;
    min-height: 360px;
    overflow: hidden;
}

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

.featured-card:hover .featured-img {
    transform: scale(1.04);
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--navy-dark);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}

.post-category {
    color: var(--teal);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
}

.featured-content p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 22px;
}

.post-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--teal-light);
}

.author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--navy);
}

.author-role {
    font-size: 12px;
    color: var(--muted);
}

.read-more-btn {
    font-weight: 600;
    font-size: 14px;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.read-more-btn:hover {
    gap: 10px;
    color: var(--teal-dark);
}

/* ── ARTICLES GRID ── */
.articles-section {
    padding: 30px 0 70px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--teal-light);
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
}

.articles-count {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.marquee-controls-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.marquee-nav-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.marquee-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--card-bdr);
    color: var(--navy);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.marquee-btn:hover {
    background: var(--teal);
    color: #ffffff;
    border-color: var(--teal);
    transform: scale(1.05);
}

/* ── MARQUEE CONTAINER & TRACK ── */
.articles-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 16px 0 28px;
    mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.articles-marquee-wrapper.is-dragging {
    cursor: grabbing !important;
}

.articles-track {
    display: flex;
    gap: 28px;
    width: max-content;
    will-change: transform;
    transition: transform 0s linear;
}

.articles-track.smooth-transition {
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Filtered / Search state */
.articles-track.filtered-view {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1232px;
    margin: 0 auto;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    transform: none !important;
}

.article-card {
    background: #ffffff;
    border: 1px solid var(--card-bdr);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    display: flex;
    flex-direction: column;
    width: 360px;
    max-width: 360px;
    min-width: 360px;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-md);
    border-color: #cde2ec;
}

.article-img-wrap {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #0d2232;
}

.article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.article-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(20, 46, 66, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.article-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
}

.article-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
    color: var(--navy);
    transition: color 0.2s;
}

.article-card:hover .article-title {
    color: var(--teal);
}

.article-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0f4f7;
    font-size: 13px;
}

.article-read-time {
    color: var(--muted-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── ARTICLE MODAL / FULL VIEW ── */
.blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 34, 50, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-modal.open {
    display: flex;
    opacity: 1;
}

.blog-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f5f8;
    color: var(--navy);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: var(--teal);
    color: #fff;
}

.modal-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal);
    margin-bottom: 8px;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.modal-img-wrap {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 26px;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body-content {
    font-size: 16px;
    line-height: 1.75;
    color: #273e4d;
}

.modal-body-content p {
    margin-bottom: 18px;
}

.modal-body-content h3 {
    font-size: 20px;
    margin: 24px 0 12px;
    color: var(--navy);
}

.modal-body-content ul {
    margin: 12px 0 20px 24px;
}

.modal-body-content li {
    margin-bottom: 8px;
}

.modal-consult-cta {
    margin-top: 32px;
    padding: 24px;
    background: var(--teal-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--teal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── CTA BANNER ── */
.cta-banner {
    background: linear-gradient(135deg, #102a3d 0%, #094754 100%);
    color: #ffffff;
    padding: 55px 0;
    position: relative;
    overflow: hidden;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cta-brain-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
}

.cta-left h2 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 6px;
}

.cta-left p {
    color: #c4dbe6;
    font-size: 15px;
}

.cta-btn {
    background: #ffffff;
    color: var(--navy);
    padding: 13px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.cta-btn:hover {
    background: #eef7fa;
    color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid #e4ebee;
    background: #fcfdfe;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
    gap: 36px;
    padding: 56px 0 40px;
}

.footer-main h3 {
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--navy);
}

.footer-main p,
.footer-main>div>a:not(.brand) {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    transition: color .2s;
}

.footer-main>div>a:not(.brand):hover {
    color: var(--teal);
}

.footer-about p {
    margin-top: 16px !important;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: #778791;
    padding: 22px 0;
}

.footer-bottom>a {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: background .2s, border-color .2s;
}

.footer-bottom>a:hover {
    background: #ffffff;
    border-color: var(--teal);
    color: var(--teal);
}

.footer-bottom span a {
    color: var(--teal);
    text-decoration: underline;
    font-weight: 600;
    transition: color .2s;
}

.footer-bottom span a:hover {
    color: var(--navy);
}

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-img-wrap {
        min-height: 260px;
    }
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu {
        display: block;
    }
    nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: white;
        padding: 16px 24px 24px;
        box-shadow: 0 15px 24px rgba(21, 59, 67, 0.12);
        border-bottom: 1px solid #e2ebf0;
    }
    nav.open {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    nav a {
        padding: 12px 0;
        border-bottom: 1px solid #f0f4f7;
    }
    nav a.active:after {
        display: none;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .blog-hero h1 {
        font-size: 30px;
    }
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .blog-modal-container {
        padding: 24px;
    }
}
