/*
Theme Name: XHL Medica Insight
Author: XHL
Version: 1.0.0
Description: A distinct medical news and health magazine WordPress theme built with XHL Theme Framework V3.0. Unique medical layouts: Editorial Feature, Disease Hub, Research Timeline, Doctor Picks, Wellness Dashboard, Medical Resources, and Latest Updates.
Text Domain: xhl-medica-insight
Requires PHP: 7.4
License: GPL-2.0-or-later
*/

:root{
  --xhl-primary:#0e7490;
  --xhl-secondary:#14b8a6;
  --xhl-accent:#ef4444;
  --xhl-dark:#0f172a;
  --xhl-footer:#06202a;
  --xhl-bg:#f5fbfc;
  --xhl-card:#ffffff;
  --xhl-text:#102033;
  --xhl-muted:#64748b;
  --xhl-border:#d9e8ec;
}
*{box-sizing:border-box}
body{margin:0;background:var(--xhl-bg);color:var(--xhl-text);font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.65}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto;display:block}
.xhl-container{width:min(1180px,calc(100% - 40px));margin:auto}
.xhl-top{background:var(--xhl-dark);color:#fff;font-size:13px}
.xhl-top-inner{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.xhl-alert{display:flex;align-items:center;gap:10px;min-width:0;flex:1;justify-content:center}
.xhl-alert strong{background:var(--xhl-accent);padding:7px 11px;text-transform:uppercase;letter-spacing:.3px}
.xhl-alert a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xhl-social{display:flex;gap:8px;align-items:center;flex:none}
.xhl-social a{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.12)}
.xhl-social svg{width:14px;height:14px;fill:#fff}
.xhl-header{background:#fff;border-bottom:1px solid var(--xhl-border)}
.xhl-header-inner{min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:30px}
.xhl-logo{font-size:34px;font-weight:900;letter-spacing:-1px;line-height:1;color:var(--xhl-dark)}
.xhl-logo span{color:var(--xhl-primary)}
.xhl-tag{color:var(--xhl-muted);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-top:6px}
.xhl-ad{width:min(728px,58vw);height:90px;border:1px solid var(--xhl-border);background:#eef7f8;color:#7a9aa3;display:flex;align-items:center;justify-content:center;overflow:hidden}
.xhl-ad img{width:100%;height:100%;object-fit:cover}
.xhl-nav{background:#fff;border-bottom:3px solid var(--xhl-primary);position:sticky;top:0;z-index:30}
.admin-bar .xhl-nav{top:32px}
.xhl-nav-inner{display:flex;justify-content:center;align-items:center}
.xhl-toggle{display:none;width:48px;height:48px;border:0;background:var(--xhl-primary);color:#fff;cursor:pointer}
.xhl-toggle:before{content:"☰";font-size:24px}
.xhl-toggle.open:before{content:"×";font-size:34px}
.xhl-menu{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center}
.xhl-menu li{position:relative}
.xhl-menu a{display:block;padding:17px clamp(8px,1.45vw,22px);font-size:13px;font-weight:900;text-transform:uppercase;color:var(--xhl-dark);position:relative}
.xhl-menu a:after{content:"";position:absolute;left:14px;right:14px;bottom:8px;height:2px;background:var(--xhl-primary);transform:scaleX(0);transition:.25s}
.xhl-menu li:hover>a,.xhl-menu .current-menu-item>a,.xhl-menu .current_page_item>a{color:var(--xhl-primary)}
.xhl-menu li:hover>a:after,.xhl-menu .current-menu-item>a:after,.xhl-menu .current_page_item>a:after{transform:scaleX(1)}
.xhl-menu ul{display:none;position:absolute;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.12);min-width:210px;list-style:none;margin:0;padding:8px 0}
.xhl-menu li:hover>ul{display:block}
.xhl-menu ul a{padding:10px 16px}
.xhl-section{margin:34px 0}
.xhl-section-head{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.xhl-section-head h2{margin:0;font-size:23px;line-height:1.1;text-transform:uppercase;color:var(--xhl-dark)}
.xhl-section-head:after{content:"";height:2px;background:linear-gradient(90deg,var(--xhl-primary),transparent);flex:1}
.xhl-cat{display:inline-block;background:var(--xhl-primary);color:#fff;font-size:11px;line-height:1;font-weight:900;text-transform:uppercase;padding:5px 8px;border-radius:2px}
.xhl-date{font-size:12px;color:var(--xhl-muted)}
.xhl-thumb{overflow:hidden;background:#dbeafe}
.xhl-thumb img{width:100%;height:100%;object-fit:cover;transition:.25s}
article:hover .xhl-thumb img,.xhl-hero-main:hover img{transform:scale(1.04)}
.xhl-title{font-weight:900;line-height:1.18;margin:7px 0}
.xhl-title a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xhl-excerpt{color:#475569;line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* Hero: editorial feature, not generic news grid */
.xhl-hero{background:#fff;border:1px solid var(--xhl-border);padding:22px}
.xhl-hero-main{position:relative;min-height:455px;overflow:hidden;border-radius:18px;background:#000}
.xhl-hero-main img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.76;transition:.25s}
.xhl-hero-text{position:absolute;left:32px;right:32px;bottom:28px;color:#fff;max-width:760px}
.xhl-hero-text .xhl-title{font-size:42px;color:#fff;text-shadow:0 3px 16px rgba(0,0,0,.35)}
.xhl-hero-text .xhl-excerpt{color:#e6fffb;font-size:17px}
.xhl-brief-row{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:18px}
.xhl-brief{border-left:4px solid var(--xhl-secondary);background:#f0fdfa;padding:16px;min-height:118px;display:flex;flex-direction:column}
.xhl-brief h3{font-size:17px;line-height:1.25;margin:0 0 10px}
.xhl-brief .xhl-date{margin-top:auto}

/* Disease Hub: one wide feature + three compact disease cards */
.xhl-disease{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}
.xhl-disease-feature{background:#fff;border:1px solid var(--xhl-border);border-radius:18px;overflow:hidden;display:grid;grid-template-columns:48% 1fr;min-height:330px}
.xhl-disease-feature .xhl-thumb{height:100%}
.xhl-disease-feature .xhl-body{padding:26px;display:flex;flex-direction:column}
.xhl-disease-feature .xhl-title{font-size:30px}
.xhl-disease-mini{display:grid;gap:14px}
.xhl-condition-card{background:#fff;border:1px solid var(--xhl-border);padding:16px;border-radius:16px;display:grid;grid-template-columns:88px 1fr;gap:14px;align-items:center}
.xhl-condition-card .xhl-thumb{aspect-ratio:1/1;border-radius:50%}
.xhl-condition-card h3{font-size:16px;margin:0 0 6px;line-height:1.25}

/* Research Timeline */
.xhl-timeline{background:#fff;border:1px solid var(--xhl-border);padding:28px;border-radius:18px}
.xhl-time-item{display:grid;grid-template-columns:110px 28px 1fr;gap:16px;position:relative}
.xhl-time-item:not(:last-child){padding-bottom:24px}
.xhl-time-item:not(:last-child):after{content:"";position:absolute;left:123px;top:30px;bottom:0;width:2px;background:var(--xhl-border)}
.xhl-time-date{font-weight:900;color:var(--xhl-primary);font-size:13px;text-align:right}
.xhl-dot{width:18px;height:18px;background:var(--xhl-secondary);border:4px solid #d9fffa;border-radius:50%;margin-top:4px;z-index:1}
.xhl-time-card{padding-bottom:18px;border-bottom:1px solid var(--xhl-border)}
.xhl-time-card h3{margin:0 0 7px;font-size:21px;line-height:1.25}

/* Doctor Picks */
.xhl-doctor-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}
.xhl-doctor-card{background:#fff;border:1px solid var(--xhl-border);border-radius:18px;padding:22px;display:grid;grid-template-columns:110px 1fr;gap:18px;align-items:start}
.xhl-doctor-avatar{width:110px;height:110px;border-radius:50%;overflow:hidden;background:#e0f2fe;border:6px solid #e6fffb}
.xhl-doctor-avatar img{width:100%;height:100%;object-fit:cover}
.xhl-doctor-note{font-size:12px;font-weight:900;text-transform:uppercase;color:var(--xhl-secondary);margin-bottom:6px}
.xhl-doctor-card h3{font-size:22px;margin:0 0 8px;line-height:1.2}

/* Wellness Dashboard */
.xhl-wellness{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.xhl-well-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.xhl-well-card{min-height:168px;background:#fff;border:1px solid var(--xhl-border);border-radius:18px;padding:18px;display:flex;flex-direction:column;position:relative;overflow:hidden}
.xhl-well-card:before{content:"";width:70px;height:70px;border-radius:50%;background:rgba(20,184,166,.12);position:absolute;right:-18px;top:-18px}
.xhl-well-card h3{margin:8px 0;font-size:19px;line-height:1.2}
.xhl-well-card .xhl-date{margin-top:auto}
.xhl-well-feature{position:relative;min-height:350px;overflow:hidden;border-radius:18px;background:#000}
.xhl-well-feature img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:.72}
.xhl-well-feature .xhl-body{position:absolute;left:24px;right:24px;bottom:24px;color:#fff}
.xhl-well-feature h3{font-size:30px;margin:8px 0;color:#fff}

/* Medical Resources */
.xhl-resources{background:#fff;border:1px solid var(--xhl-border);border-radius:18px;padding:26px;display:grid;grid-template-columns:repeat(3,1fr);gap:26px}
.xhl-resource-col h3{font-size:17px;margin:0 0 14px;text-transform:uppercase;color:var(--xhl-primary)}
.xhl-resource-list{list-style:none;margin:0;padding:0}
.xhl-resource-list li{border-bottom:1px solid var(--xhl-border);padding:11px 0;font-weight:800;line-height:1.28}
.xhl-resource-list li a:before{content:"+";color:var(--xhl-secondary);font-weight:900;margin-right:8px}

/* Latest Updates */
.xhl-updates{display:grid;gap:16px}
.xhl-update{background:#fff;border:1px solid var(--xhl-border);border-radius:18px;overflow:hidden;display:grid;grid-template-columns:240px 1fr;gap:0}
.xhl-update .xhl-thumb{aspect-ratio:16/10;height:100%}
.xhl-update .xhl-body{padding:18px;display:flex;flex-direction:column}
.xhl-update h3{font-size:24px;margin:4px 0 8px}
.xhl-update .xhl-date{margin-top:auto}

/* Category / Single */
.xhl-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:28px;margin:32px auto}
.xhl-main-card,.xhl-sidebar-widget{background:#fff;border:1px solid var(--xhl-border);border-radius:18px;padding:24px}
.xhl-archive-item{display:grid;grid-template-columns:230px 1fr;gap:20px;padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid var(--xhl-border)}
.xhl-archive-item:last-child{border:0;margin:0;padding:0}
.xhl-archive-item .xhl-thumb{aspect-ratio:4/3;border-radius:14px}
.xhl-med-meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--xhl-muted);font-size:12px;margin:7px 0}
.xhl-med-meta span{background:#f0fdfa;padding:4px 8px;border-radius:99px}
.xhl-archive-item h2{font-size:26px;margin:6px 0;line-height:1.2}
.xhl-single h1{font-size:42px;line-height:1.12;margin:10px 0}
.xhl-entry{font-size:17px;line-height:1.86}
.xhl-key{background:#f0fdfa;border-left:5px solid var(--xhl-secondary);padding:18px 20px;margin:22px 0;border-radius:12px}
.xhl-key h3{margin:0 0 10px}
.xhl-key ul{margin:0;padding-left:20px}
.xhl-sidebar-widget{margin-bottom:20px}
.xhl-widget-title{margin:0 0 15px;font-size:18px;text-transform:uppercase;color:var(--xhl-dark)}
.xhl-search{display:flex}
.xhl-search input{flex:1;border:1px solid var(--xhl-border);padding:11px;min-width:0}
.xhl-search button{border:0;background:var(--xhl-primary);color:#fff;font-weight:900;padding:0 14px}
.xhl-side-menu{list-style:none;margin:0;padding:0}
.xhl-side-menu li a{display:block;padding:10px 0;border-bottom:1px solid var(--xhl-border);font-weight:800}
.xhl-side-menu li a:before{content:"›";color:var(--xhl-primary);margin-right:8px}
.xhl-small{display:grid;grid-template-columns:76px 1fr;gap:10px;margin-bottom:13px}
.xhl-small .xhl-thumb{aspect-ratio:1/1;border-radius:12px}
.xhl-small h4{font-size:13px;line-height:1.25;margin:0 0 3px}

/* Footer */
.xhl-footer{background:var(--xhl-footer);color:#fff;margin-top:48px}
.xhl-footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1.2fr;gap:44px;padding:46px 0}
.xhl-footer .xhl-logo{color:#fff}
.xhl-footer p{color:#cbd5e1}
.xhl-footer-menu{columns:2;list-style:none;padding:0;margin:0}
.xhl-footer-menu a{display:block;color:#e2e8f0;padding:5px 0;font-weight:700}
.xhl-footer-menu a:before{content:"›";color:var(--xhl-secondary);margin-right:7px}
.xhl-footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding:14px 0;color:#94a3b8;font-size:13px}
.xhl-backtop{position:fixed;right:22px;bottom:22px;width:44px;height:44px;border:0;border-radius:50%;background:var(--xhl-primary);color:#fff;font-size:22px;display:none;z-index:50;cursor:pointer}
.xhl-backtop.show{display:block}
@media(max-width:1024px){
  .xhl-layout{grid-template-columns:1fr}
  .xhl-disease,.xhl-wellness{grid-template-columns:1fr}
  .xhl-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:20px}
  .xhl-sidebar-widget{margin:0}
}
@media(max-width:768px){
  .xhl-container{width:min(100% - 28px,1180px)}
  .xhl-date-top,.xhl-top .xhl-social{display:none}
  .xhl-header-inner{justify-content:center;text-align:center;padding:22px 0}
  .xhl-ad{display:none}
  .xhl-nav-inner{justify-content:flex-start}
  .xhl-toggle{display:block}
  .xhl-menu{display:none;width:100%;flex-direction:column}
  .xhl-menu.open{display:flex}
  .xhl-menu a{padding:15px 18px}
  .xhl-menu ul{position:static;display:block;box-shadow:none;background:#f8fafc}
  .xhl-hero-main{min-height:340px;border-radius:14px}
  .xhl-hero-text{left:20px;right:20px;bottom:20px}
  .xhl-hero-text .xhl-title{font-size:28px}
  .xhl-brief-row,.xhl-doctor-grid,.xhl-well-grid,.xhl-resources,.xhl-footer-grid,.xhl-sidebar{grid-template-columns:1fr}
  .xhl-disease-feature,.xhl-update,.xhl-archive-item{grid-template-columns:1fr}
  .xhl-disease-feature .xhl-thumb,.xhl-update .xhl-thumb{aspect-ratio:16/9}
  .xhl-time-item{grid-template-columns:72px 24px 1fr;gap:10px}
  .xhl-time-item:not(:last-child):after{left:82px}
  .xhl-single h1{font-size:30px}
}
@media(max-width:480px){
  .xhl-logo{font-size:30px}
  .xhl-hero{padding:14px}
  .xhl-main-card,.xhl-sidebar-widget{padding:18px}
}
