/* /public/blog-fix.css */
/* Visual Parity CSS for Dr. Ravi Teja Website Blogs */
/* Sources: Navbar.tsx, Breadcrumbs.tsx, BlogContent.tsx */

:root {
    --primary: #1E3A5F;
    --primary-dark: #0a1628;
    --clinical-green: #1F7A3D;
    --gold: #1F7A3D; /* Matched with globals.css logo green */
    --gold-light: #2F9E5A;
    --soft-bg: #F8FAFC;
    --actual-gold: #E4B000;
    --navy-gradient: linear-gradient(135deg, #1E3A5F 0%, #0a1628 100%);
}

/* Base Styles */
html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif !important;
    background-color: #fff;
    color: var(--primary);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Outfit', sans-serif !important;
}

/* Header & Navigation (Navbar.tsx Logic) */
#site-header {
    height: 100px;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border-bottom: 1px solid transparent;
}

@media (min-width: 768px) {
    #site-header { height: 120px; }
}

@media (min-width: 1024px) {
    #site-header { height: 140px; }
}

#site-header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.08);
    box-shadow: 0 20px 50px rgba(30, 58, 95, 0.12);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
}

.site-logo {
    height: 95px;
    width: auto;
    object-fit: contain;
    object-position: left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) { .site-logo { height: 115px; } }
@media (min-width: 1024px) { .site-logo { height: 140px; } }

/* Logo inversion logic */
#site-header:not(.scrolled) .site-logo {
    filter: brightness(0) invert(1);
}

#site-header.scrolled .site-logo {
    filter: none;
}

/* Navigation Links */
.nav-link {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif !important;
    text-decoration: none;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    cursor: pointer;
    background: transparent;
    border: none;
}

#site-header.scrolled .nav-link {
    color: var(--primary) !important;
}

.nav-link:hover {
    color: var(--gold) !important;
}

.nav-link-underline {
    height: 2px;
    width: 0;
    background: var(--gold);
    transition: all 0.3s ease;
    position: absolute;
    bottom: -6px;
    left: 0;
}

.nav-link:hover .nav-link-underline {
    width: 100%;
}

/* Mega Menu Dropdown */
.mega-menu-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px) scale(0.98);
    background: white;
    box-shadow: 0 40px 100px -20px rgba(15, 29, 47, 0.3);
    border: 1px solid rgba(30, 58, 95, 0.05);
    display: flex;
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    min-width: max-content;
}

.group:hover .mega-menu-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mega-menu-level-1 {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid rgba(30, 58, 95, 0.05);
    padding: 1.5rem 0;
}

.mega-menu-level-2 {
    width: 0;
    flex-shrink: 0;
    opacity: 0;
    background: white;
    border-right: 1px solid rgba(30, 58, 95, 0.05);
    padding: 1.5rem 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.mega-menu-level-2.open {
    width: 280px;
    opacity: 1;
}

.mega-menu-level-3 {
    width: 0;
    flex-shrink: 0;
    opacity: 0;
    background: #F9FAFB;
    padding: 1.5rem 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.mega-menu-level-3.open {
    width: 320px;
    opacity: 1;
}

.mega-menu-label {
    padding: 0 1.5rem;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(30, 58, 95, 0.2);
    margin-bottom: 1rem;
}

.mega-menu-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: rgba(30, 58, 95, 0.6);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.mega-menu-item:hover, .mega-menu-item.active {
    background: rgba(15, 29, 47, 0.03);
    color: var(--primary);
}

.mega-menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #22c55e;
}

.mega-menu-item .chevron {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.mega-menu-item:hover .chevron, .mega-menu-item.active .chevron {
    opacity: 1;
    transform: translateX(0);
    color: #22c55e;
}

.mega-menu-final-link {
    padding: 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 17px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid transparent;
}

.mega-menu-final-link:hover {
    background: white;
    box-shadow: 0 10px 20px rgba(30, 58, 95, 0.05);
    border: 1px solid rgba(30, 58, 95, 0.05);
}

.mega-menu-final-link .title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    transition: color 0.3s ease;
}

.mega-menu-final-link:hover .title {
    color: #22c55e;
}

.mega-menu-final-link .desc {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(30, 58, 95, 0.3);
    margin-top: 0.25rem;
}

/* Book Now Button */
.btn-book-now {
    position: relative;
    overflow: hidden;
    margin-left: 0.5rem;
    padding: 1rem 1.75rem;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 25px 50px -12px rgba(30, 58, 95, 0.25);
}

#site-header:not(.scrolled) .btn-book-now {
    background: var(--gold);
    color: var(--primary);
}

#site-header.scrolled .btn-book-now {
    background: var(--primary);
    color: white;
}

.btn-book-now:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px -12px rgba(30, 58, 95, 0.4);
}

.btn-book-now .icon {
    transition: color 0.3s ease;
}

#site-header:not(.scrolled) .btn-book-now .icon { color: var(--primary); }
#site-header.scrolled .btn-book-now .icon { color: var(--gold); }

/* Hero Section (Breadcrumbs.tsx Logic) */
.hero-section {
    position: relative;
    padding-top: 176px; /* pt-44 */
    padding-bottom: 96px; /* pb-24 */
    overflow: hidden;
    background-color: var(--primary-dark);
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay-r {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0.65) 50%, rgba(10, 22, 40, 0.2) 100%);
}

.hero-overlay-t {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.5) 0%, transparent 50%, rgba(10, 22, 40, 0.3) 100%);
}

/* Breadcrumbs */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 40px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.breadcrumb-item:hover {
    color: var(--gold);
}

.breadcrumb-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.breadcrumb-item:hover .breadcrumb-icon-box {
    background: var(--gold);
    color: var(--primary);
}

.clinical-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background: rgba(31, 122, 61, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(31, 122, 61, 0.3);
    color: var(--gold);
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.3em;
    margin-bottom: 32px;
}

.hero-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 900;
    color: white;
    margin-bottom: 40px;
    line-height: 0.95;
    letter-spacing: -0.05em;
    font-size: 36px;
    word-wrap: break-word;
    hyphens: auto;
}

@media (min-width: 640px) { .hero-title { font-size: 48px; } }
@media (min-width: 768px) { .hero-title { font-size: 84px; } }

.hero-title .word-gold {
    color: var(--gold);
    font-style: italic;
    font-family: serif !important;
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}

.hero-title .word-gold::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(31, 122, 61, 0.3);
    filter: blur(4px);
}

.hero-title .word-gradient {
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8) 50%, rgba(31, 122, 61, 0.5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-right: 1rem;
}

.hero-title .word-white {
    color: white;
    display: inline-block;
    margin-right: 1rem;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    max-width: 42rem;
    line-height: 1.625;
    font-weight: 500;
}

/* Progress Bar */
#progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 110;
    background: rgba(30, 58, 95, 0.05);
}

#progress-bar {
    height: 100%;
    background: var(--gold);
    width: 0%;
}

/* Prose / Article Content */
.prose {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(30, 58, 95, 0.85);
}

.prose .lead {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.6;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(31, 122, 61, 0.15);
    letter-spacing: -0.02em;
}

.prose h3 {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: 80px;
    margin-bottom: 32px;
    padding-left: 2rem;
    border-left: 4px solid var(--gold);
    letter-spacing: -0.03em;
    font-family: 'Outfit', sans-serif !important;
}

.prose h4 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-top: 64px;
    margin-bottom: 32px;
    font-family: 'Outfit', sans-serif !important;
}

.prose p { margin-bottom: 48px; }

.prose ul {
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin-bottom: 48px !important;
}

.prose ol {
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin-bottom: 48px !important;
}

.prose li {
    margin-bottom: 16px !important;
    padding-left: 0.5rem !important;
    color: rgba(30, 58, 95, 0.85);
    line-height: 1.6;
}

.prose img {
    border-radius: 20px;
    box-shadow: 0 40px 100px -20px rgba(30, 58, 95, 0.2);
    margin: 64px 0;
    width: 100%;
    display: block;
}

.prose blockquote {
    border-left: 8px solid var(--gold);
    background: rgba(30, 58, 95, 0.05);
    padding: 4rem;
    border-radius: 20px;
    font-style: normal;
    margin: 96px 0;
}

/* Sidebar Widget */
.sidebar-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
}

.newsletter-button {
    background-color: var(--gold) !important;
    color: var(--primary) !important;
    font-weight: 900;
    transition: all 0.5s ease;
}

/* Container Utility */
.max-w-7xl-custom {
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .max-w-7xl-custom {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* Utility for Navy Gradient */
.bg-navy-gradient {
    background: var(--navy-gradient) !important;
}