/* DEFRATAJ Medical Theme */
:root {
  --primary: #0066CC;
  --primary-dark: #004F9E;
  --primary-light: #E8F1FB;
  --accent: #00A8B5;
  --accent-dark: #007F89;
  --ink: #1f2d3d;
  --muted: #5b6b7e;
  --bg-soft: #f5f8fc;
  --border: #e3e9f1;
  --success: #1a9c5b;
  --warning: #d97706;
}

html, body { font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--ink); }
body { background: #fff; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.text-primary-deep { color: var(--primary-dark) !important; }
.bg-primary-soft { background: var(--primary-light); }
.bg-soft { background: var(--bg-soft); }

/* Navbar */
.navbar-defrataj { background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.navbar-defrataj .navbar-brand { font-weight: 800; color: var(--primary-dark); letter-spacing: .3px; }
.navbar-defrataj .navbar-brand small { font-weight: 500; color: var(--muted); font-size: .7em; display: block; }
.navbar-defrataj .nav-link { color: var(--ink); font-weight: 500; }
.navbar-defrataj .nav-link:hover, .navbar-defrataj .nav-link.active { color: var(--primary); }
.top-bar { background: var(--primary-dark); color: #fff; font-size: .82rem; padding: .35rem 0; }
.top-bar a { color: #fff; opacity: .9; }
.top-bar a:hover { opacity: 1; text-decoration: underline; }

/* Mega menu */
.dropdown-mega { min-width: 720px; padding: 1.25rem 1.5rem; border: 1px solid var(--border); box-shadow: 0 14px 40px rgba(0,0,0,.08); }
.dropdown-mega h6 { color: var(--primary-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem; }
.dropdown-mega .mega-link { display:block; padding:.25rem 0; color: var(--ink); font-size:.92rem; }
.dropdown-mega .mega-link:hover { color: var(--primary); text-decoration: none; }

/* Hero */
.hero { background: linear-gradient(135deg, #0066CC 0%, #00A8B5 100%); color: #fff; padding: 4rem 0; }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; }
.hero .lead { font-size: 1.15rem; opacity: .95; }
.strength-chips .chip { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color: #fff; padding: .35rem .8rem; margin: .25rem .25rem 0 0; border-radius: 50px; font-weight: 600; font-size: .9rem; }
.hero-stats { background: rgba(0,0,0,.18); border-radius: 12px; padding: 1.25rem; }
.hero-stats .stat strong { font-size: 1.6rem; display: block; }

/* Sections */
section.block { padding: 3.5rem 0; }
section.block-soft { background: var(--bg-soft); padding: 3.5rem 0; }
.section-title { font-weight: 800; color: var(--primary-dark); margin-bottom: .5rem; }
.section-sub { color: var(--muted); margin-bottom: 2rem; }

/* Cards */
.card-feature { 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 1.25rem; 
  height:100%; 
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1); 
  background: #fff; 
  position: relative; 
  cursor: pointer;
}

/* Enhanced hover effects with better specificity */
.card-feature:hover,
a.card-feature:hover,
a.card-feature.text-decoration-none:hover { 
  transform: translateY(-8px) !important; 
  box-shadow: 0 20px 40px rgba(0,102,204,0.25) !important; 
  border-color: #0066CC !important; 
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%) !important;
  text-decoration: none !important;
}

a.card-feature, 
a.card-feature.text-decoration-none { 
  color: inherit; 
  text-decoration: none; 
  display: block;
}

/* Icon hover effects */
.card-feature .icon { 
  width: 44px; 
  height: 44px; 
  border-radius: 10px; 
  background: var(--primary-light); 
  color: var(--primary-dark); 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1.4rem; 
  margin-bottom: .75rem; 
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-feature:hover .icon,
a.card-feature:hover .icon,
.col-sm-6 a.card-feature:hover .icon { 
  background: #0066CC !important; 
  color: #fff !important; 
  transform: scale(1.15) rotate(5deg) !important;
  box-shadow: 0 8px 16px rgba(0,102,204,0.3) !important;
}

/* Text hover effects */
.card-feature:hover h5,
a.card-feature:hover h5 {
  color: #0066CC !important;
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Specific home page feature cards */
.col-sm-6 .card-feature:hover,
.col-sm-6 a.card-feature:hover,
.col-sm-6 a.card-feature.text-decoration-none:hover { 
  transform: translateY(-8px) !important; 
  box-shadow: 0 20px 40px rgba(0,102,204,0.25) !important; 
  border-color: #0066CC !important; 
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%) !important;
}

/* Cert badges */
.cert-badge { display:inline-flex; align-items:center; gap:.5rem; background:#fff; border:1px solid var(--border); border-radius: 50px; padding: .5rem 1rem; margin: .25rem; font-weight: 600; color: var(--primary-dark); font-size:.9rem; }

/* CTA banner */
.cta-banner { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-dark) 100%); color: #fff; border-radius: 16px; padding: 2.5rem; }
.cta-banner h3 { font-weight: 800; }

/* Tables */
.table thead th { background: var(--primary-light); color: var(--primary-dark); border-bottom: 2px solid var(--primary); font-weight:600; }

/* Sticky TOC */
.toc-sticky { position: sticky; top: 90px; }
.toc-sticky .nav-link { color: var(--muted); border-left: 2px solid transparent; padding: .35rem .9rem; font-size: .92rem; }
.toc-sticky .nav-link.active { color: var(--primary-dark); border-left-color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* Breadcrumb */
.breadcrumb { background: transparent; padding: .75rem 0; margin-bottom: 0; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted); font-size: .88rem; }
.breadcrumb-item.active { color: var(--ink); }

/* Footer */
footer.site-footer { background: #0a1f3a; color: #cfd8e3; padding: 3rem 0 1rem; }
footer.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .5px; font-size:.88rem; }
footer.site-footer a { color: #cfd8e3; }
footer.site-footer a:hover { color: #fff; }
footer .legal { border-top: 1px solid #1c3257; margin-top: 2rem; padding-top: 1rem; font-size: .82rem; color: #8da4c0; }
.schedule-h { background: #fff3cd; color: #6b4d00; border:1px solid #f5d97a; border-radius:8px; padding:.75rem 1rem; font-size:.85rem; }

/* Print (SmPC / product) */
@media print {
  .navbar-defrataj, footer.site-footer, .top-bar, .cta-banner, .no-print { display: none !important; }
  body { background: #fff; }
}

/* Utility */
.fs-7 { font-size: .85rem; }
.lh-tight { line-height: 1.25; }
.shadow-sm-soft { box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.h-anchor { scroll-margin-top: 90px; }

/* Accessibility: skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: #0a3160; color: #fff; padding: .5rem .9rem; border-radius: 0 0 6px 0; font-weight: 600; }
.skip-link:focus { left: 0; outline: 3px solid #ffd24d; }
main:focus { outline: none; }

/* Header search input width */
.nav-search input { min-width: 180px; }
@media (max-width: 991px) { .nav-search { margin: .5rem 0; width: 100%; } .nav-search input { min-width: 0; flex: 1; } }

/* Related-content cards */
.related-block { background: #f5f8fc; border-top: 1px solid #e2e8f0; padding: 2.5rem 0; margin-top: 2rem; }
.related-block h3 { color: #0a3160; font-weight: 700; margin-bottom: 1.25rem; font-size: 1.4rem; }
.related-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 1rem 1.1rem; height: 100%; transition: transform .15s, box-shadow .15s; display: block; color: inherit; text-decoration: none; }
.related-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(10,49,96,.08); color: inherit; }
.related-card h6 { color: #0a3160; font-weight: 600; margin-bottom: .35rem; }
.related-card small { color: #6b7280; }

/* On-page TOC */
.toc-nav { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 1rem; background: #f5f8fc; border: 1px solid #e2e8f0; border-radius: 10px; font-size: .9rem; }
.toc-title { color: #0a3160; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: .8rem; margin-bottom: .75rem; }
.toc-nav .nav-link { color: #334155; padding: .25rem .5rem; border-left: 2px solid transparent; border-radius: 0; }
.toc-nav .nav-link:hover { color: #0a3160; background: #fff; }
.toc-nav .nav-link.active { color: #0a3160; border-left-color: #ffb300; background: #fff; font-weight: 600; }
.toc-nav .toc-l3 .nav-link { padding-left: 1.4rem; font-size: .85rem; }

/* Heading anchor permalink */
.h-anchor .anchor-link { color: transparent; text-decoration: none; margin-left: .35rem; transition: color .15s; font-weight: 400; }
.h-anchor:hover .anchor-link, .anchor-link:focus { color: #1c75c4; }

/* ===== Imagery layer ============================================== */
/* Brand logo in nav */
.navbar-brand .brand-logo { height: 40px; width: auto; display: block; }
.navbar-brand .brand-text { display: none; }
@media (max-width: 575px) { .navbar-brand .brand-logo { height: 34px; } }

/* Page hero (thin banner above <h1> on generic/clinical pages) */
.page-hero { position: relative; height: 220px; background-position: center; background-size: cover; background-color: #0a3160; margin-bottom: 0; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,49,96,.55) 0%, rgba(10,49,96,.85) 100%); }
.page-hero .container { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.page-hero h1 { color: #fff; font-size: 2rem; margin: 0; font-weight: 700; }
.page-hero .lead-sub { color: #cfd8e3; margin-top: .35rem; max-width: 720px; }
.page-hero .badge { background: rgba(255,255,255,.18); color: #fff; padding: .35rem .7rem; font-weight: 600; }
@media (max-width: 767px) { .page-hero { height: 170px; } .page-hero h1 { font-size: 1.5rem; } }

/* Home hero with bg image */
.hero-bg { position: relative; background: linear-gradient(135deg, #0a3160 0%, #13518f 60%, #1c75c4 100%); overflow: hidden; }
.hero-bg::before { content: ""; position: absolute; inset: 0; background-image: var(--hero-img); background-position: center; background-size: cover; opacity: .28; }
.hero-bg > .container { position: relative; z-index: 1; }

/* Generic image cards */
.card-thumb { display: block; overflow: hidden; border-radius: 10px; background: #f5f8fc; aspect-ratio: 3 / 2; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-thumb:hover img { transform: scale(1.04); }

/* Blog card thumbnail */
.blog-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; height: 100%; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: 0 8px 24px rgba(10,49,96,.10); transform: translateY(-2px); }
.blog-card .thumb { aspect-ratio: 16 / 9; background: #f0f4f9; overflow: hidden; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card .body { padding: 1rem 1.1rem 1.2rem; }
.blog-card h5 { font-size: 1.05rem; line-height: 1.35; margin: .35rem 0 .5rem; }
.blog-card h5 a { color: #0f172a; text-decoration: none; }
.blog-card h5 a:hover { color: #0a3160; }

/* Blog post hero image */
.post-hero { width: 100%; max-height: 420px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 1.5rem; display: block; }

/* Product page inline figure */
.product-figure { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }

/* CTA banner with photo bg */
.cta-banner-img { position: relative; background: #0a3160; background-size: cover; background-position: center; overflow: hidden; }
.cta-banner-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,49,96,.92) 0%, rgba(28,117,196,.85) 100%); }
.cta-banner-img > * { position: relative; z-index: 1; }

/* Country lander hero with image */
.country-hero { position: relative; background: #0a3160; background-size: cover; background-position: center; padding: 3.5rem 0; color: #fff; overflow: hidden; }
.country-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,49,96,.85), rgba(28,117,196,.75)); }
.country-hero > .container { position: relative; z-index: 1; }
.country-hero h1, .country-hero p { color: #fff; }
.country-hero .lead { color: #e0e7ef; }

/* Gallery strip */
.gallery-strip { padding: 2rem 0 0; }
.gallery-strip .row > div { margin-bottom: 1rem; }
