/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* MED247 editorial UX fixes — 2026-11-08 */
:root {
  --med247-ink: #0B2942;
  --med247-teal: #087D78;
  --med247-red: #F02F3A;
  --med247-soft: #F2F7FA;
}

/* Article hero must remain readable with or without a featured image. */
.single-post .hero-section {
  background: var(--med247-soft) !important;
  min-height: auto !important;
  padding-block: clamp(48px, 7vw, 88px) !important;
}
.single-post .hero-section::before { opacity: 0 !important; }
.single-post .hero-section .page-title,
.single-post .hero-section .entry-title,
.single-post .hero-section .entry-meta,
.single-post .hero-section .entry-meta a {
  color: var(--med247-ink) !important;
  text-shadow: none !important;
}
.single-post .hero-section .page-title,
.single-post .hero-section .entry-title {
  max-width: 22ch;
  margin-inline: auto;
  line-height: 1.08;
}

/* Editorial archive: remove legacy demo sidebar and use the reading width. */
.blog .ct-sidebar,
.archive .ct-sidebar,
.single-post .ct-sidebar { display: none !important; }
.blog [data-content=normal] > article,
.archive [data-content=normal] > article,
.single-post [data-content=normal] > article { width: 100% !important; }
.blog .ct-container,
.archive .ct-container { grid-template-columns: minmax(0, 1fr) !important; }

/* Cleaner cards and resilient image crops. */
.blog .entry-card,
.archive .entry-card {
  border: 1px solid #DDE7EC;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(11, 41, 66, .06);
}
.blog .entry-card .ct-media-container img,
.archive .entry-card .ct-media-container img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Accessible focus and comfortable interactive targets. */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--med247-teal) !important;
  outline-offset: 3px;
}
#header-menu-1 a { min-height: 44px; display: inline-flex; align-items: center; }

/* Article reading measure. */
.single-post .entry-content { max-width: 74ch; margin-inline: auto; }
.single-post .entry-content p,
.single-post .entry-content li { line-height: 1.75; }
.single-post .entry-content h2 { color: var(--med247-ink); margin-top: 1.8em; }

@media (max-width: 689px) {
  .single-post .hero-section { padding-block: 36px !important; }
  .single-post .hero-section .page-title,
  .single-post .hero-section .entry-title { font-size: clamp(30px, 9vw, 42px) !important; }
  .blog .entries, .archive .entries { grid-template-columns: 1fr !important; }
}

/* MED247 ARTICLE LAYOUT V3 — 2026-11-08 */
.single-post .hero-section[data-type="type-2"] {
  min-height: 0 !important;
  height: auto !important;
  padding: clamp(3rem, 6vw, 5.5rem) 0 !important;
  background: #f3f8fb !important;
}
.single-post .hero-section .entry-header {
  max-width: 880px !important;
}
.single-post .hero-section .page-title {
  max-width: 20ch;
  margin-inline: auto;
  color: #0b2940 !important;
  font-size: clamp(2.2rem, 4vw, 3.65rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em;
}
.single-post .hero-section .page-description {
  max-width: 720px;
  margin: 1.25rem auto 0;
  color: #425b6e !important;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
}
.single-post .hero-section .entry-meta {
  margin-top: 1.5rem !important;
  color: #314a5d !important;
}
.single-post .entry-content {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

/* Compact, readable desktop dropdowns */
@media (min-width: 1000px) {
  #header [data-id="menu"] .sub-menu {
    min-width: 230px !important;
    padding: 0.45rem !important;
    border-radius: 12px !important;
  }
  #header [data-id="menu"] .sub-menu > li > a {
    min-height: 0 !important;
    padding: 0.65rem 0.8rem !important;
    line-height: 1.35 !important;
    border-radius: 8px;
  }
}

@media (max-width: 689px) {
  .single-post .hero-section[data-type="type-2"] {
    padding: 2.5rem 0 !important;
  }
  .single-post .hero-section .page-title {
    font-size: clamp(2rem, 10vw, 2.75rem) !important;
  }
}

.single-post .hero-section[data-type="type-2"] .entry-header {
  min-height: 0 !important;
  height: auto !important;
  padding-block: 0 !important;
}


/* MED247 HOME INTRO + LAUNCH POLISH — 2026-11-09 */
.med247-home-intro {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  padding: clamp(2.75rem, 7vw, 6rem) 1.25rem;
  background: linear-gradient(135deg, #f5f9fb 0%, #edf7f5 100%);
  border-bottom: 1px solid #dce8eb;
}
.med247-home-intro__inner { max-width: 1120px; margin: 0 auto; }
.med247-home-intro h1 {
  max-width: 17ch;
  margin: .65rem 0 .85rem;
  color: var(--med247-ink);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.med247-home-intro p { max-width: 720px; margin: 0; color: #425b6e; font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.6; }
.med247-beta { display: inline-flex; padding: .3rem .65rem; border-radius: 999px; background: #fff0ea; color: #b63c22; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
/* Keep only one clear search affordance and reduce header noise. */
#header [data-id="search"], #header .ct-header-search { display: none !important; }
/* Compact footer links and preserve readable grouping. */
#footer [data-id="menu"] ul { gap: .6rem 1.25rem; }
#footer [data-id="menu"] a { line-height: 1.35; }
@media (max-width: 689px) {
  .med247-home-intro { padding-block: 2.5rem; }
  .med247-home-intro h1 { font-size: clamp(2.2rem, 12vw, 3.5rem); }
}

/* MED247 reading and navigation polish — 2026-11-11 */
html body #header.ct-header [data-device="desktop"] [data-row="top"] {
  display: none !important;
}
/* The native logo supplies a real, labelled home link. */
html body #header.ct-header [data-device="desktop"] [data-row="middle"] > .ct-container:has(.site-branding)::before {
  content: none !important;
  display: none !important;
}
html body.single-post .entry-content {
  padding-top: 0 !important;
}
html body.single-post .entry-content > :first-child { margin-top: 0; }
.entry-meta .meta-categories {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0;
}
.entry-meta .meta-categories a { font-size: 12px; line-height: 1.5; }
@media (min-width: 1000px) and (max-width: 1199px) {
  html body #header.ct-header [data-device="desktop"] { display: none !important; }
  html body #header.ct-header [data-device="mobile"] { display: block !important; }
}


/* MED247 permanent featured-image hero contrast — 2026-11-11 */
html body.single-post .hero-section[data-type="type-2"] .page-title,
html body.single-post .hero-section[data-type="type-2"] .page-description,
html body.single-post .hero-section[data-type="type-2"] .entry-meta,
html body.single-post .hero-section[data-type="type-2"] .entry-meta a {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55) !important;
}
