/*
Theme Name: PatientIQ 2026
Description: Trusted health information for patients and the public
Version: 1.0
*/

:root {
  --blue:       #1A6B8A;
  --blue-mid:   #1E7FA3;
  --blue-light: #E8F4F8;
  --green:      #1A8A5A;
  --green-light:#E6F4ED;
  --orange:     #E07B2A;
  --orange-light:#FEF3E8;
  --red:        #DC2626;
  --purple:     #6B35A8;
  --purple-light:#F3EEFA;
  --white:      #FFFFFF;
  --bg:         #F7FAFB;
  --bg-2:       #EFF4F6;
  --border:     #DDE6EA;
  --text:       #0F2430;
  --text-mid:   #2D4A58;
  --text-muted: #6B8A96;
  --text-light: #9BB5BF;
  --sponsor:    #FFF9F0;
  --sponsor-border: #FDDCAA;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --shadow:     0 2px 8px rgba(26,107,138,.08);
  --shadow-md:  0 6px 16px rgba(26,107,138,.1);
  --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width:  1240px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:16px; scroll-behavior:smooth; }
body { font-family:var(--font); color:var(--text); background:var(--bg); line-height:1.6; -webkit-font-smoothing:antialiased; }
a { color:var(--blue); text-decoration:none; transition:color .15s; }
a:hover { color:var(--blue-mid); }
img { max-width:100%; height:auto; display:block; }
ul { list-style:none; }
p { margin-bottom:1rem; color:var(--text-mid); line-height:1.75; }

h1,h2,h3,h4,h5,h6 { font-weight:700; line-height:1.25; color:var(--text); }
h1 { font-size:clamp(1.75rem,4vw,2.5rem); }
h2 { font-size:clamp(1.375rem,3vw,1.875rem); }
h3 { font-size:1.25rem; }

.container { max-width:var(--max-width); margin:0 auto; padding:0 24px; }
.grid-main { display:grid; grid-template-columns:1fr 300px; gap:40px; align-items:start; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
section { padding:56px 0; }
section.tight { padding:32px 0; }

/* HEADER */
.site-header { background:#fff; border-bottom:2px solid var(--blue-light); position:sticky; top:0; z-index:1000; box-shadow:0 2px 12px rgba(26,107,138,.08); }
.header-top { display:flex; align-items:center; justify-content:space-between; height:70px; gap:20px; }
.site-logo { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.logo-mark { width:38px; height:38px; background:linear-gradient(135deg,var(--blue),var(--blue-mid)); border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; color:#fff; }
.logo-text { font-size:21px; font-weight:800; color:var(--text); }
.logo-text span { color:var(--blue); }
.logo-tagline { font-size:11px; color:var(--text-muted); font-weight:400; }

.search-bar { flex:1; max-width:460px; display:flex; align-items:center; background:var(--bg); border:1.5px solid var(--border); border-radius:99px; padding:0 18px; height:42px; gap:10px; transition:border-color .2s; }
.search-bar:focus-within { border-color:var(--blue); background:#fff; }
.search-bar input { background:none; border:none; outline:none; color:var(--text); font-size:14px; width:100%; }
.search-bar input::placeholder { color:var(--text-muted); }

.header-actions { display:flex; align-items:center; gap:10px; }
.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 20px; border-radius:99px; font-size:14px; font-weight:600; cursor:pointer; border:none; transition:all .15s; white-space:nowrap; }
.btn-primary { background:var(--blue); color:#fff; }
.btn-primary:hover { background:var(--blue-mid); color:#fff; }
.btn-outline { background:transparent; color:var(--blue); border:1.5px solid var(--blue); }
.btn-outline:hover { background:var(--blue-light); }
.btn-green { background:var(--green); color:#fff; }
.btn-green:hover { background:#16774d; color:#fff; }
.btn-sm { padding:7px 16px; font-size:13px; }

/* NAV */
.header-nav { background:var(--bg); border-top:1px solid var(--border); }
.nav-list { display:flex; align-items:center; overflow-x:auto; }
.nav-link { padding:12px 18px; font-size:13.5px; font-weight:500; color:var(--text-mid); white-space:nowrap; display:flex; align-items:center; gap:6px; border-bottom:2px solid transparent; transition:all .15s; }
.nav-link:hover,.nav-link.active { color:var(--blue); border-bottom-color:var(--blue); }
.nav-link .nav-icon { font-size:16px; }

/* CONDITION CHIPS */
.condition-strip { background:#fff; border-bottom:1px solid var(--border); overflow-x:auto; }
.condition-strip-inner { display:flex; gap:8px; padding:12px 24px; min-width:max-content; }
.condition-chip { padding:7px 16px; border-radius:99px; font-size:13px; font-weight:500; color:var(--text-mid); background:var(--bg); border:1.5px solid var(--border); white-space:nowrap; cursor:pointer; transition:all .15s; text-decoration:none; display:inline-block; }
.condition-chip:hover { background:var(--blue-light); border-color:var(--blue); color:var(--blue); }
.condition-chip.active { background:var(--blue); border-color:var(--blue); color:#fff; }

/* HERO */
.hero { background:linear-gradient(135deg,var(--blue) 0%,var(--blue-mid) 50%,#1A9BBF 100%); padding:56px 0; }
.hero-inner { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; }
.hero-text h1 { color:#fff; font-size:clamp(1.75rem,4vw,2.75rem); margin-bottom:16px; line-height:1.2; }
.hero-text p { color:rgba(255,255,255,.82); font-size:16px; margin-bottom:28px; }
.hero-search { display:flex; background:#fff; border-radius:99px; overflow:hidden; box-shadow:var(--shadow-md); }
.hero-search input { flex:1; padding:14px 22px; border:none; outline:none; font-size:15px; color:var(--text); }
.hero-search button { padding:14px 28px; background:var(--blue); color:#fff; border:none; font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap; }
.hero-search button:hover { background:var(--blue-mid); }
.hero-trust { display:flex; gap:16px; margin-top:20px; flex-wrap:wrap; }
.trust-badge { display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.2); border-radius:99px; padding:5px 12px; font-size:12px; color:rgba(255,255,255,.9); font-weight:500; }
.hero-stats { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.hero-stat { background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); border-radius:var(--radius-lg); padding:20px; text-align:center; }
.hero-stat-num { font-size:2rem; font-weight:800; color:#fff; }
.hero-stat-label { font-size:12px; color:rgba(255,255,255,.7); margin-top:4px; }

/* CARDS */
.card { background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:box-shadow .2s,transform .2s; display:flex; flex-direction:column; }
.card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card-thumb { aspect-ratio:16/9; overflow:hidden; background:var(--bg-2); }
.card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.card:hover .card-thumb img { transform:scale(1.04); }
.card-body { padding:20px; flex:1; display:flex; flex-direction:column; gap:8px; }
.card-area { font-size:11px; font-weight:700; color:var(--blue); text-transform:uppercase; letter-spacing:.06em; }
.card-title { font-size:15px; font-weight:700; color:var(--text); line-height:1.4; }
.card-title a { color:inherit; }
.card-title a:hover { color:var(--blue); }
.card-excerpt { font-size:13px; color:var(--text-muted); line-height:1.6; flex:1; }
.card-meta { display:flex; align-items:center; gap:10px; font-size:11.5px; color:var(--text-light); margin-top:auto; padding-top:10px; border-top:1px solid var(--border); }
.card-h { flex-direction:row; }
.card-h .card-thumb { width:110px; flex-shrink:0; aspect-ratio:1; }
.card-h .card-body { padding:14px 16px; }

/* CONDITION CARDS */
.condition-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.condition-card { background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg); padding:20px; text-align:center; transition:all .2s; cursor:pointer; text-decoration:none; display:block; }
.condition-card:hover { border-color:var(--blue); box-shadow:var(--shadow); transform:translateY(-2px); }
.condition-icon { font-size:36px; margin-bottom:10px; }
.condition-name { font-size:13.5px; font-weight:700; color:var(--text); margin-bottom:4px; }
.condition-count { font-size:11px; color:var(--text-muted); }

/* TRIAL FINDER */
.trial-finder { background:linear-gradient(135deg,var(--green-light),#fff); border:1px solid rgba(26,138,90,.15); border-radius:var(--radius-xl); padding:36px; }
.trial-finder h2 { color:var(--green); margin-bottom:8px; }
.trial-finder-form { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:12px; margin-top:20px; align-items:end; }
.form-field label { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; display:block; }
.form-field select, .form-field input { width:100%; padding:10px 14px; border:1.5px solid var(--border); border-radius:var(--radius); font-size:14px; outline:none; background:#fff; transition:border-color .2s; }
.form-field select:focus, .form-field input:focus { border-color:var(--green); }

/* MEDICATION EXPLAINER */
.med-card { background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
.med-card-header { background:linear-gradient(135deg,var(--purple),#8B4BC8); padding:16px 20px; display:flex; align-items:center; gap:12px; }
.med-card-header h4 { color:#fff; font-size:15px; }
.med-card-icon { width:36px; height:36px; background:rgba(255,255,255,.15); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.med-tabs { display:flex; border-bottom:1px solid var(--border); }
.med-tab { padding:10px 18px; font-size:13px; font-weight:600; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; transition:all .15s; }
.med-tab.active { color:var(--purple); border-bottom-color:var(--purple); }
.med-tab-content { padding:16px 20px; font-size:13.5px; color:var(--text-mid); line-height:1.7; display:none; }
.med-tab-content.active { display:block; }

/* SECTION HEADER */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; padding-bottom:12px; border-bottom:2px solid var(--border); }
.section-title { font-size:18px; font-weight:700; color:var(--text); display:flex; align-items:center; gap:10px; }
.section-title::before { content:''; display:block; width:4px; height:20px; background:var(--blue); border-radius:2px; }
.section-link { font-size:13px; color:var(--blue); font-weight:600; }

/* COMMUNITY */
.community-card { background:linear-gradient(135deg,var(--purple-light),#fff); border:1px solid rgba(107,53,168,.15); border-radius:var(--radius-xl); padding:32px; text-align:center; }
.community-groups { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:20px; }
.community-group { background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px; text-align:left; transition:all .15s; }
.community-group:hover { border-color:var(--purple); box-shadow:var(--shadow); }
.community-group-icon { font-size:24px; margin-bottom:8px; }
.community-group-name { font-size:13.5px; font-weight:700; color:var(--text); }
.community-group-count { font-size:11px; color:var(--text-muted); margin-top:3px; }

/* NEWSLETTER */
.newsletter-box { background:var(--blue); border-radius:var(--radius-xl); padding:40px 48px; display:flex; align-items:center; justify-content:space-between; gap:32px; }
.newsletter-box h2 { color:#fff; margin-bottom:8px; }
.newsletter-box p { color:rgba(255,255,255,.8); margin:0; font-size:15px; }
.newsletter-form { display:flex; gap:8px; flex-shrink:0; }
.nl-input { padding:11px 18px; border-radius:99px; border:none; font-size:14px; outline:none; width:260px; }
.nl-input::placeholder { color:#9BB5BF; }

/* SPONSOR */
.sponsor-slot { background:var(--sponsor); border:1.5px dashed var(--sponsor-border); border-radius:var(--radius-lg); padding:20px; text-align:center; }
.sponsor-label { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--text-light); font-weight:600; margin-bottom:8px; }
.sponsor-mpu { min-height:250px; display:flex; flex-direction:column; align-items:center; justify-content:center; }

/* SIDEBAR */
.sidebar { display:flex; flex-direction:column; gap:20px; position:sticky; top:80px; }
.sidebar-card { background:#fff; border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; }
.sidebar-head { padding:14px 18px; background:var(--blue); }
.sidebar-head h4 { color:#fff; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.sidebar-body { padding:16px; }
.sidebar-item { padding:11px 0; border-bottom:1px solid var(--border); }
.sidebar-item:last-child { border-bottom:none; padding-bottom:0; }
.sidebar-item-title { font-size:13px; font-weight:600; color:var(--text); line-height:1.4; }
.sidebar-item-title a { color:inherit; }
.sidebar-item-title a:hover { color:var(--blue); }
.sidebar-item-meta { font-size:11px; color:var(--text-light); margin-top:3px; }

/* BADGES */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:99px; font-size:10.5px; font-weight:700; }
.badge-nice { background:#005EB8; color:#fff; }
.badge-nhs { background:#0072CE; color:#fff; }
.badge-new { background:#DC2626; color:#fff; }
.badge-recruiting { background:var(--green); color:#fff; }
.badge-approved { background:var(--blue); color:#fff; }

/* FOOTER */
.site-footer { background:var(--text); color:rgba(255,255,255,.65); padding:56px 0 0; }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:40px; padding-bottom:40px; border-bottom:1px solid rgba(255,255,255,.08); }
.footer-brand p { font-size:13px; color:rgba(255,255,255,.5); line-height:1.7; margin-top:12px; }
.footer-col h4 { color:#fff; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px; }
.footer-col ul li { margin-bottom:8px; }
.footer-col ul li a { color:rgba(255,255,255,.55); font-size:13px; }
.footer-col ul li a:hover { color:#fff; }
.footer-bottom { display:flex; align-items:center; justify-content:space-between; padding:20px 0; font-size:12px; color:rgba(255,255,255,.35); }
.footer-bottom a { color:rgba(255,255,255,.45); }
.footer-disclaimer { background:rgba(255,255,255,.05); border-radius:var(--radius); padding:12px 16px; font-size:11px; color:rgba(255,255,255,.45); margin-bottom:24px; line-height:1.6; }

@media(max-width:1024px) { .grid-main { grid-template-columns:1fr; } .sidebar { position:static; } .condition-grid { grid-template-columns:repeat(2,1fr); } .footer-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:768px) { .hero-inner { grid-template-columns:1fr; } .grid-3 { grid-template-columns:1fr; } .newsletter-box { flex-direction:column; } .trial-finder-form { grid-template-columns:1fr; } .community-groups { grid-template-columns:1fr; } .search-bar { display:none; } .condition-grid { grid-template-columns:repeat(2,1fr); } }
