/* =============================================
   MedPharm – Main CSS
   Two-column academic article layout
   Matches screenshot: title → date → content | right panel
   ============================================= */

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0; z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: var(--header-h);
}

/* Logo */
.site-logo-link {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: inherit;
    flex-shrink: 0;
}
.site-logo-icon {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); flex-shrink: 0;
}
.logo-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    display: block;
    line-height: 1.2;
}
.logo-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.2;
}

/* Primary nav */
.primary-nav { margin-left: auto; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-menu > li { position: relative; }
.nav-menu a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: var(--primary); background: #eff6ff; }

.nav-menu .sub-menu {
    position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.35rem;
    opacity: 0; visibility: hidden;
    transform: translateY(4px);
    transition: all var(--transition);
    z-index: 500;
}
.nav-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .sub-menu a { font-size: var(--font-size-xs); padding: 0.35rem 0.7rem; border-radius: 4px; }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.header-search {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color var(--transition);
}
.header-search:focus-within { border-color: var(--primary-light); background: var(--white); }
.header-search-input {
    border: none; background: transparent;
    padding: 0.4rem 0.85rem;
    font-size: var(--font-size-sm);
    color: var(--text-body);
    outline: none; width: 180px;
}
.header-search-btn {
    background: none; border: none; cursor: pointer;
    padding: 0.4rem 0.75rem;
    color: var(--text-muted);
    display: flex; align-items: center;
}
.header-search-btn:hover { color: var(--primary); }

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer;
    padding: 6px; border-radius: var(--radius-sm);
}
.mobile-toggle .bar { display: block; width: 20px; height: 2px; background: var(--text-dark); border-radius: 1px; transition: all 0.25s; }

/* ── Category Nav Bar ───────────────────────── */
.cat-nav-bar {
    background: var(--primary);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.cat-nav {
    display: flex;
    align-items: center;
    height: 38px;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-item { position: relative; }
.cat-nav-link {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0 1rem;
    height: 38px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition);
}
.cat-nav-link:hover,
.cat-nav-item:hover > .cat-nav-link { background: rgba(255,255,255,0.15); color: var(--white); }
.cat-caret { font-size: 0.7rem; }

/* Dropdown */
.cat-dropdown {
    position: absolute; top: 100%; left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 0.35rem 0;
    opacity: 0; visibility: hidden;
    transform: translateY(-4px);
    transition: all var(--transition);
    z-index: 900;
}
.cat-nav-item:hover > .cat-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.cat-dropdown-item { position: relative; }
.cat-dropdown-item > a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.45rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-body);
    text-decoration: none;
    transition: background var(--transition);
}
.cat-dropdown-item > a:hover { background: var(--light-gray); color: var(--primary); }
.cat-sub-dropdown {
    position: absolute; left: 100%; top: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 0.35rem 0;
    opacity: 0; visibility: hidden;
    transform: translateX(-4px);
    transition: all var(--transition);
    z-index: 1000;
}
.cat-dropdown-item:hover > .cat-sub-dropdown { opacity: 1; visibility: visible; transform: translateX(0); }
.cat-sub-dropdown a {
    display: block;
    padding: 0.4rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--text-body);
    text-decoration: none;
    transition: background var(--transition);
}
.cat-sub-dropdown a:hover { background: var(--light-gray); color: var(--primary); }

/* =============================================
   ARTICLE HEADER
   ============================================= */
.pharm-article-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

/* =============================================
   ARTICLE LAYOUT — Two Columns
   Matches screenshot exactly:
   Left ~68%: content | Right ~30%: panel
   ============================================= */
.pharm-article-wrap {
    display: grid;
    grid-template-columns: var(--col-left) var(--col-right);
    gap: 2.5rem;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    align-items: start;
}

/* ─── LEFT COLUMN ─────────────────────────── */
.pharm-article-main { min-width: 0; }

/* Title block: large title + date (matches screenshot top-left) */
.pharm-article-title-block {
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
}
.pharm-article-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.pharm-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}
.pharm-date { color: var(--text-muted); font-size: var(--font-size-xs); }
.pharm-meta-sep { color: var(--border-dark); }
.pharm-cat-tag {
    color: var(--link);
    font-size: var(--font-size-xs);
    text-decoration: none;
    font-weight: 500;
}
.pharm-cat-tag:hover { text-decoration: underline; }

/* Quick detail strip (below title) */
.pharm-quick-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
    font-size: var(--font-size-xs);
}
.pqs-item {
    display: flex;
    flex-direction: column;
    padding: 0.45rem 0.85rem;
    border-right: 1px solid var(--border);
    background: var(--off-white);
}
.pqs-item:last-child { border-right: none; }
.pqs-label {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.65rem;
    margin-bottom: 0.15rem;
}
.pqs-val { color: var(--text-dark); font-weight: 500; font-size: var(--font-size-xs); }

/* ── Main article content ──────────────────── */
.pharm-content {
    font-size: 0.925rem;
    line-height: 1.7;
    color: var(--text-body);
}
.pharm-content p { margin-bottom: 0.8rem; }

/* Section heading: matches screenshot "Definition", "Introduction", etc. */
.pharm-content .pharm-section-title,
.pharm-content h2.pharm-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* Sub-headings: "Definition", "Introduction", "Etiology" etc. */
.pharm-content .pharm-heading,
.pharm-content h3.pharm-heading,
.pharm-content h3 {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.25rem 0 0.5rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--primary);
    line-height: 1.3;
}
.pharm-content h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1rem 0 0.4rem;
}

/* Lists */
.pharm-content ul,
.pharm-content ol { margin: 0.5rem 0 0.85rem 1.25rem; }
.pharm-content ul { list-style: disc; }
.pharm-content ol { list-style: decimal; }
.pharm-content li { margin-bottom: 0.3rem; line-height: 1.6; }

/* References list */
.pharm-content .pharm-references,
.pharm-references {
    list-style: decimal;
    margin-left: 1.25rem;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.65;
}
.pharm-references li { margin-bottom: 0.45rem; }
.pharm-references em { font-style: italic; }

/* Tables inside content */
.pharm-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-xs);
    margin: 0.75rem 0 1.25rem;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.pharm-content table th {
    background: var(--table-head);
    color: var(--text-dark);
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-dark);
    border-right: 1px solid var(--border);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}
.pharm-content table th:last-child { border-right: none; }
.pharm-content table td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}
.pharm-content table td:last-child { border-right: none; }
.pharm-content table tr:last-child td { border-bottom: none; }
.pharm-content table tbody tr:nth-child(even) td { background: var(--table-stripe); }
.pharm-content table strong { color: var(--text-dark); }

/* Article footer */
.pharm-article-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.pharm-tags { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: var(--font-size-sm); color: var(--text-muted); }
.edit-link a { font-size: var(--font-size-xs); color: var(--text-muted); text-decoration: underline; }
.edit-link a:hover { color: var(--primary); }

/* Post nav */
.pharm-post-nav {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.pharm-nav-prev a,
.pharm-nav-next a {
    font-size: var(--font-size-sm);
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
}
.pharm-nav-prev a:hover, .pharm-nav-next a:hover { text-decoration: underline; }
.pharm-nav-next { margin-left: auto; text-align: right; }

/* ─── RIGHT PANEL ─────────────────────────── */
.pharm-right-panel {
    position: sticky;
    top: calc(var(--header-h) + 38px + 1.5rem); /* header + cat-nav + margin */
    max-height: calc(100vh - var(--header-h) - 38px - 3rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.pharm-right-panel::-webkit-scrollbar { width: 4px; }
.pharm-right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.pharm-panel-content { display: flex; flex-direction: column; gap: 1rem; }

/* Drug card (like the info box in the screenshot) */
.panel-drug-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: var(--font-size-sm);
}
.panel-drug-header {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
}
.panel-drug-meta { padding: 0.5rem 0; }
.pdm-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0.25rem;
    padding: 0.3rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: var(--font-size-xs);
}
.pdm-row:last-child { border-bottom: none; }
.pdm-label { font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.pdm-val { color: var(--text-dark); }

/* Panel sections (ECG, Key Points, etc.) */
.panel-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: var(--font-size-xs);
}
.panel-section-title {
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0.45rem 0.85rem;
}
.panel-key-points {
    list-style: none;
    padding: 0.6rem 0.85rem;
    display: flex; flex-direction: column; gap: 0.4rem;
    color: var(--text-body);
}
.panel-key-points li {
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}
.panel-key-points li::before {
    content: '•';
    position: absolute; left: 0;
    color: var(--primary);
    font-weight: 700;
}
.panel-ecg-note { padding: 0.6rem 0; }
.panel-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-xs);
}
.panel-mini-table th {
    background: var(--light-gray);
    padding: 0.3rem 0.6rem;
    font-weight: 700;
    font-size: 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}
.panel-mini-table td {
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-body);
}
.panel-mini-table tr:last-child td { border-bottom: none; }

/* Drug classification badge */
.panel-class-badge {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.85rem;
}
.class-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.class-label { font-weight: 600; color: var(--text-dark); font-size: var(--font-size-sm); }

/* Related drugs list in panel */
.panel-related { }
.panel-related-list {
    list-style: none;
    padding: 0.5rem 0.85rem;
    display: flex; flex-direction: column; gap: 0.35rem;
}
.panel-related-list li { display: flex; align-items: center; gap: 0.4rem; }
.panel-related-list a {
    font-size: var(--font-size-xs);
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
}
.panel-related-list a:hover { text-decoration: underline; }

/* =============================================
   ARCHIVE / DRUG INDEX
   ============================================= */
.archive-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0 1.25rem;
}
.archive-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0 0.75rem;
}
.archive-desc { color: var(--text-muted); font-size: var(--font-size-sm); margin-bottom: 1rem; }

/* Sub-category chips */
.archive-subcats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.subcat-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 50px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition);
}
.subcat-chip:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.subcat-count {
    background: rgba(255,255,255,0.7);
    border-radius: 50px;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    color: inherit;
}

/* Archive layout */
.archive-body { padding: 2rem 0 3rem; }
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

/* Drug cards grid */
.drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.drug-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}
.drug-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.drug-card-img-link { display: block; overflow: hidden; }
.drug-card-img { width: 100%; height: 160px; object-fit: cover; transition: transform 0.4s; }
.drug-card:hover .drug-card-img { transform: scale(1.03); }
.drug-card-body { padding: 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.drug-card-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.drug-card-title { font-size: 1rem; margin-bottom: 0.5rem; }
.drug-card-title a { color: var(--text-dark); text-decoration: none; }
.drug-card-title a:hover { color: var(--primary); }
.drug-card-moa {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.drug-card-meta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.dcm-item { font-size: var(--font-size-xs); color: var(--text-muted); }
.dcm-label { font-weight: 700; color: var(--text-dark); margin-right: 0.25rem; }
.drug-card-excerpt { font-size: var(--font-size-xs); color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 0.85rem; }
.drug-card-link {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap var(--transition);
}
.drug-card-link:hover { text-decoration: underline; }

/* Pagination */
.archive-pagination { margin-top: 2rem; }
.archive-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--font-size-sm); color: var(--text-body); text-decoration: none; margin: 0 2px; }
.archive-pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }
.archive-pagination .page-numbers:hover:not(.current) { background: var(--light-gray); }

/* No drugs */
.no-drugs { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.no-drugs-icon { font-size: 3rem; margin-bottom: 1rem; }
.no-drugs h3 { color: var(--text-dark); margin-bottom: 0.5rem; }
.no-drugs p { margin-bottom: 1.5rem; }

/* Archive sidebar */
.archive-sidebar { position: sticky; top: calc(var(--header-h) + 38px + 1rem); }
.pharm-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.pharm-widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

/* Taxonomy tree */
.tax-tree { font-size: var(--font-size-sm); }
.tax-tree > li { margin-bottom: 0.1rem; }
.tax-tree a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    text-decoration: none;
    transition: background var(--transition);
    font-size: var(--font-size-sm);
}
.tax-tree a:hover, .tax-tree .active > a { background: #eff6ff; color: var(--primary); }
.tax-count { font-size: var(--font-size-xs); color: var(--text-muted); }
.tax-tree-sub { margin-left: 1rem; margin-top: 0.1rem; }
.tax-tree-deep { margin-left: 0.85rem; }
.tax-tree-sub a { font-size: var(--font-size-xs); }

/* Recent drugs widget */
.widget-recent-drugs { display: flex; flex-direction: column; gap: 0.4rem; }
.widget-recent-drugs li { display: flex; align-items: center; gap: 0.4rem; }
.widget-recent-drugs a { font-size: var(--font-size-xs); color: var(--link); text-decoration: none; font-weight: 500; }
.widget-recent-drugs a:hover { text-decoration: underline; }

/* =============================================
   FRONT PAGE (Home)
   ============================================= */
.home-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 4rem 0 3.5rem;
    text-align: center;
}
.home-hero h1 { color: var(--white); font-size: 2.2rem; margin-bottom: 0.75rem; }
.home-hero p { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.home-search { display: flex; max-width: 480px; margin: 0 auto; gap: 0; border-radius: 50px; overflow: hidden; border: none; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.home-search input { flex: 1; padding: 0.85rem 1.25rem; border: none; outline: none; font-size: 0.95rem; border-radius: 50px 0 0 50px; }
.home-search button { padding: 0.85rem 1.5rem; background: var(--accent); color: var(--white); border: none; font-weight: 700; cursor: pointer; border-radius: 0 50px 50px 0; }
.home-search button:hover { background: #0369a1; }

.home-cats { padding: 3rem 0; background: var(--off-white); border-bottom: 1px solid var(--border); }
.home-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.home-cat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    display: block;
}
.home-cat-card:hover { border-color: var(--primary-light); box-shadow: 0 4px 16px rgba(30,64,175,0.1); transform: translateY(-2px); text-decoration: none; }
.home-cat-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.home-cat-name { font-weight: 700; color: var(--text-dark); font-size: 0.95rem; margin-bottom: 0.25rem; }
.home-cat-count { font-size: var(--font-size-xs); color: var(--text-muted); }

.home-recent { padding: 3rem 0; }
.home-section-title { font-size: 1.2rem; font-weight: 700; color: var(--text-dark); margin-bottom: 1.5rem; }

/* =============================================
   GENERIC PAGE
   ============================================= */
.page-content { padding: 2.5rem 0; }
.entry-content { font-size: 0.925rem; line-height: 1.75; }
.entry-content h2, .entry-content h3 { margin: 1.5rem 0 0.6rem; }
.entry-content p { margin-bottom: 0.9rem; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--text-dark); border-top: 1px solid var(--border); margin-top: 3rem; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
}
.footer-brand { }
.footer-logo {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; margin-bottom: 0.75rem;
    font-weight: 700; color: var(--white); font-size: 1rem;
}
.footer-logo-icon { font-size: 1.3rem; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: var(--font-size-sm); line-height: 1.65; }
.footer-nav-block h5 { color: var(--white); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.85rem; font-weight: 700; }
.footer-nav-block ul { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-nav-block a { color: rgba(255,255,255,0.55); font-size: var(--font-size-sm); text-decoration: none; }
.footer-nav-block a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1rem 0; }
.footer-bottom p { color: rgba(255,255,255,0.4); font-size: var(--font-size-xs); text-align: center; }
.footer-bottom a { color: rgba(255,255,255,0.6); }

/* =============================================
   404 PAGE
   ============================================= */
.error-wrap { text-align: center; padding: 5rem 2rem; }
.error-wrap h1 { font-size: 5rem; color: var(--border-dark); margin-bottom: 0; line-height: 1; }
.error-wrap h2 { margin-bottom: 1rem; }
.error-wrap p { color: var(--text-muted); margin-bottom: 2rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .pharm-article-wrap {
        grid-template-columns: 1fr;
    }
    .pharm-right-panel {
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
    .pharm-panel-content {
        display: contents;
    }
    .footer-inner { grid-template-columns: repeat(2,1fr); }
    .footer-inner .footer-brand { grid-column: span 2; }
}

@media (max-width: 900px) {
    .archive-layout { grid-template-columns: 1fr; }
    .archive-sidebar { position: static; }
    .drug-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 768px) {
    .header-inner { gap: 0.75rem; }
    .primary-nav { display: none; position: fixed; inset: 0 0 0 30%; background: var(--white); z-index: 9999; padding: 4rem 1.5rem 2rem; transform: translateX(100%); transition: transform 0.3s; border-left: 1px solid var(--border); }
    .primary-nav.open { transform: translateX(0); display: block; }
    .nav-menu { flex-direction: column; align-items: flex-start; gap: 0; }
    .nav-menu a { padding: 0.7rem 0; border-bottom: 1px solid var(--border); border-radius: 0; width: 100%; }
    .mobile-toggle { display: flex; }
    .header-search { display: none; }
    .cat-nav { height: 36px; }
    .cat-dropdown, .cat-sub-dropdown { display: none; }
    .pharm-quick-strip { flex-direction: column; }
    .pqs-item { border-right: none; border-bottom: 1px solid var(--border); }
    .pqs-item:last-child { border-bottom: none; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-inner .footer-brand { grid-column: 1; }
    .home-hero h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .pharm-article-title { font-size: 1.2rem; }
    .drug-grid { grid-template-columns: 1fr; }
    .archive-subcats { gap: 0.35rem; }
}
