/*
Theme Name: Free of Dandruff Child
Theme URI: https://freeofdandruff.com/
Description: Dedicated Divi child theme for freeofdandruff.com (blog 21). Converted from the expired Acabado theme. Magazine / health-info design (refs: Harvard Health, MedlinePlus): content-forward, navigable topic tiles, consistent article-card grid, no page-eating heroes. Navy + cream, Lora serif headings. Carries the IH WCAG accessibility baseline (AA contrast, visible focus, underlined in-text links, skip link, reduced-motion) — CSS/PHP only, no JavaScript. The WCAG 1.4.4 viewport fix lives in network mu-plugin 09-viewport-a11y, not here.
Author: Inventive Horizons
Author URI: https://inventivehorizons.com/
Template: Divi
Version: 1.1.0
*/

/* ============================================================================
   DESIGN TOKENS — edit here to retune the whole look.
   Contrast checked against WCAG AA (>=4.5:1 body, >=3:1 large/UI).
   ========================================================================= */
:root {
	--fod-navy:    #042C53;  /* headings + primary — 13.8:1 on white          */
	--fod-navy-2:  #0A3A68;  /* navy hover / gradient stop                    */
	--fod-accent:  #185FA5;  /* links / CTAs / kickers — 5.6:1 on white       */
	--fod-accent-2:#11497F;  /* accent hover                                  */
	--fod-cream:   #F4F1EA;  /* warm section band                             */
	--fod-surface: #FFFFFF;  /* page + card background                        */
	--fod-ink:     #25292E;  /* body text — ~13:1 on white                    */
	--fod-muted:   #5C6670;  /* meta / descriptors — 5.3:1 on white           */
	--fod-line:    #E4E7EC;  /* hairlines / card borders                      */
	--fod-line-2:  #D8DCE2;  /* slightly stronger border                      */
	--fod-focus:   #185FA5;
	--fod-serif:   'Lora', Georgia, 'Times New Roman', serif;
	--fod-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--fod-shadow:  0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
	--fod-shadow-h:0 4px 8px rgba(16,24,40,.06), 0 16px 40px rgba(16,24,40,.12);
	--fod-radius:  10px;
	--fod-maxw:    1140px;
}

/* ============================================================================
   BASE — Divi owns structure; this applies the brand (light + fast, Ezoic).
   ========================================================================= */
body { color: var(--fod-ink); }
h1, h2, h3, h4, h5, h6,
.et_pb_module h1, .et_pb_module h2, .et_pb_module h3,
.et_pb_module h4, .et_pb_module h5, .et_pb_module h6 {
	font-family: var(--fod-serif);
	color: var(--fod-navy);
	letter-spacing: -0.01em;
}
a { color: var(--fod-accent); }
a:hover { color: var(--fod-accent-2); }

/* ============================================================================
   ACCESSIBILITY BASELINE (WCAG 2.1 AA) — CSS only, no JS.
   Documented in reports/a11y-baseline-divi-child.md.
   ========================================================================= */
.sr-only {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
/* 2.4.7 Focus Visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .et_pb_button:focus-visible {
	outline: 3px solid var(--fod-focus) !important; outline-offset: 2px !important;
	box-shadow: 0 0 0 3px rgba(255,255,255,.9) !important;
}
a:focus, button:focus, input:focus, select:focus, textarea:focus, .et_pb_button:focus {
	outline: 3px solid var(--fod-focus); outline-offset: 2px;
}
/* 1.4.1 Use of Color — underline in-text content links (not nav/buttons/cards) */
.et_pb_text a, .entry-content a, .et_pb_post_content a, .comment-content a {
	text-decoration: underline; text-underline-offset: 0.15em;
}
.et_pb_text a.et_pb_button, .entry-content a.et_pb_button,
.et_pb_text a:has(> img), .entry-content a:has(> img),
.fod-featured a, .fod-topic a, .fod-card a, .fod-more, .fod-btn { text-decoration: none; }
/* 2.4.1 Skip link (markup via functions.php on wp_body_open) */
.fod-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100000; padding: 12px 20px;
	background: var(--fod-navy); color: #fff !important; font-weight: 700;
	text-decoration: none; border-radius: 0 0 4px 0;
}
.fod-skip-link:focus { left: 0; outline: 3px solid var(--fod-accent); }
/* 2.3.3 Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important; animation-iteration-count: 1 !important;
		transition-duration: .001ms !important; scroll-behavior: auto !important;
	}
}

/* ============================================================================
   MASTHEAD — refine Divi's default header toward an editorial magazine feel.
   ========================================================================= */
#main-header { box-shadow: 0 1px 0 var(--fod-line); }
#logo { max-height: 54px; }
.et_pb_menu .et-menu a, #top-menu li a, #et-top-navigation .et-menu a {
	font-family: var(--fod-sans); text-transform: uppercase;
	letter-spacing: .06em; font-size: 13px !important; font-weight: 600;
}

/* ============================================================================
   HOMEPAGE LAYOUT PRIMITIVES (magazine / health-info)
   ========================================================================= */
/* full-width color bands; inner rows already constrained by Divi width settings */
.fod-band-cream { background: var(--fod-cream) !important; }
.fod-band-white { background: var(--fod-surface) !important; }

/* shared kicker / eyebrow */
.fod-kicker {
	font-family: var(--fod-sans); text-transform: uppercase; letter-spacing: .12em;
	font-size: .72rem; font-weight: 700; color: var(--fod-accent); margin: 0 0 .5em;
	display: block;
}
/* section heading block */
.fod-head { margin: 0 0 6px; }
.fod-head h2 { font-size: clamp(1.5rem, 1rem + 2vw, 2.05rem); line-height: 1.2; margin: 0; }
.fod-head .fod-sub { color: var(--fod-muted); font-family: var(--fod-sans); margin: .5em 0 0; max-width: 60ch; }
.fod-head--center { text-align: center; }
.fod-head--center .fod-sub { margin-left: auto; margin-right: auto; }
.fod-head--center h2::after {
	content: ""; display: block; width: 56px; height: 3px; border-radius: 3px;
	background: var(--fod-accent); margin: 14px auto 0;
}
/* read-more link with arrow */
.fod-more {
	font-family: var(--fod-sans); font-weight: 700; font-size: .9rem;
	color: var(--fod-accent); display: inline-flex; align-items: center; gap: .35em;
}
.fod-more::after { content: "\2192"; transition: transform .15s ease; }
.fod-more:hover { color: var(--fod-accent-2); }
.fod-more:hover::after { transform: translateX(3px); }
/* button */
.fod-btn {
	display: inline-block; font-family: var(--fod-sans); font-weight: 700; font-size: .95rem;
	background: var(--fod-accent); color: #fff !important; padding: 12px 22px;
	border-radius: 6px; transition: background .15s ease;
}
.fod-btn:hover { background: var(--fod-accent-2); color: #fff !important; }
.fod-btn--ghost { background: transparent; color: var(--fod-navy) !important; box-shadow: inset 0 0 0 2px var(--fod-line-2); }
.fod-btn--ghost:hover { background: var(--fod-cream); color: var(--fod-navy) !important; }

/* ---- INTRO / WELCOME band (visible H1, content-forward, no big image) ----- */
.fod-intro { text-align: center; }
.fod-intro h1 {
	font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3rem); line-height: 1.12; margin: .1em 0 .35em;
}
.fod-intro .fod-lead {
	font-family: var(--fod-sans); font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
	color: var(--fod-muted); max-width: 62ch; margin: 0 auto; line-height: 1.6;
}
.fod-intro .fod-cta { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- FEATURED block (modest split, NOT a page-eating hero) ---------------- */
.fod-featured { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; }
.fod-featured .fod-fimg img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--fod-radius);
	display: block; box-shadow: var(--fod-shadow);
}
.fod-featured h2 { font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.1rem); line-height: 1.18; margin: .1em 0 .4em; }
.fod-featured h2 a { color: var(--fod-navy); }
.fod-featured h2 a:hover { color: var(--fod-accent); }
.fod-featured p { font-family: var(--fod-sans); color: var(--fod-ink); line-height: 1.65; margin: 0 0 1.1em; }

/* ---- TOPIC TILES (MedlinePlus-style: tile + one-line descriptor) ---------- */
.fod-topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fod-topic {
	display: flex; flex-direction: column; background: var(--fod-surface);
	border: 1px solid var(--fod-line); border-radius: var(--fod-radius); padding: 26px 24px;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.fod-topic:hover { transform: translateY(-3px); box-shadow: var(--fod-shadow-h); border-color: var(--fod-accent); }
.fod-topic .fod-topic-ico {
	width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
	background: rgba(24,95,165,.10); color: var(--fod-accent); font-size: 22px; margin-bottom: 14px;
}
.fod-topic h3 { font-size: 1.18rem; margin: 0 0 .35em; }
.fod-topic h3 a { color: var(--fod-navy); }
.fod-topic:hover h3 a { color: var(--fod-accent); }
.fod-topic p { font-family: var(--fod-sans); color: var(--fod-muted); font-size: .94rem; line-height: 1.55; margin: 0 0 1em; }
.fod-topic .fod-more { margin-top: auto; }

/* ---- ARTICLE CARDS (custom grid — clean magazine cards) ------------------- */
.fod-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.fod-card {
	display: flex; flex-direction: column; background: var(--fod-surface);
	border: 1px solid var(--fod-line); border-radius: var(--fod-radius); overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.fod-card:hover { transform: translateY(-3px); box-shadow: var(--fod-shadow-h); }
.fod-card .fod-card-imgwrap { display: block; overflow: hidden; }
.fod-card .fod-card-imgwrap img {
	width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
	transition: transform .35s ease;
}
.fod-card:hover .fod-card-imgwrap img { transform: scale(1.04); }
.fod-card .fod-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.fod-tag {
	align-self: flex-start; font-family: var(--fod-sans); text-transform: uppercase;
	letter-spacing: .08em; font-size: .68rem; font-weight: 700; color: var(--fod-accent);
	background: rgba(24,95,165,.09); padding: 4px 9px; border-radius: 4px; margin-bottom: 12px;
}
.fod-card h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 .4em; }
.fod-card h3 a { color: var(--fod-navy); }
.fod-card:hover h3 a { color: var(--fod-accent); }
.fod-card .fod-excerpt { font-family: var(--fod-sans); color: var(--fod-muted); font-size: .92rem; line-height: 1.55; margin: 0 0 1em; }
.fod-card .fod-meta { font-family: var(--fod-sans); color: var(--fod-muted); font-size: .78rem; margin-top: auto; }
.fod-card .fod-more { margin-top: 10px; }

/* ---- AD / affiliate slot (labeled, content-first, Ezoic-friendly) --------- */
.fod-ad {
	border: 1px dashed var(--fod-line-2); background: #FBFAF7; border-radius: 8px;
	padding: 18px; text-align: center; min-height: 96px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fod-ad .fod-ad-label { font-family: var(--fod-sans); text-transform: uppercase; letter-spacing: .14em; font-size: .62rem; color: var(--fod-muted); margin: 0; }

/* ---- NEWSLETTER (refined bordered card, not a flat color slab) ------------ */
.fod-news {
	background: linear-gradient(180deg, #082F57 0%, #042C53 100%); color: #fff;
	border-radius: 14px; padding: 40px 28px; text-align: center;
}
.fod-news h2 { color: #fff; font-size: clamp(1.4rem, 1rem + 1.6vw, 1.9rem); margin: 0 0 .3em; }
.fod-news p { font-family: var(--fod-sans); color: #d7e0ea; margin: 0 auto; max-width: 52ch; }
.fod-news-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 520px; margin: 22px auto 6px; }
.fod-news-form input[type="email"] { flex: 1 1 260px; padding: 13px 15px; border: 0; border-radius: 6px; font-size: 1rem; color: var(--fod-ink); background: #fff; font-family: var(--fod-sans); }
.fod-news-form button { padding: 13px 24px; border: 0; border-radius: 6px; cursor: pointer; background: #fff; color: var(--fod-navy); font-weight: 700; font-family: var(--fod-sans); }
.fod-news-form button:hover { background: var(--fod-cream); }
.fod-news-note { font-size: .8rem; color: rgba(255,255,255,.75) !important; margin-top: 10px !important; }

/* ---- FOOTER content (about + medical disclaimer) ------------------------- */
.fod-foot { font-family: var(--fod-sans); }
.fod-foot h2 { color: #fff; font-size: 1.25rem; margin: 0 0 .4em; }
.fod-foot p { color: #c3ccd6; line-height: 1.6; }
.fod-foot .fod-disclaimer { font-size: .82rem; color: #9aa6b4; border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; margin-top: 18px; }

/* ============================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
	.fod-featured { grid-template-columns: 1fr; gap: 22px; }
	.fod-topics  { grid-template-columns: repeat(2, 1fr); }
	.fod-cards   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	.fod-topics, .fod-cards { grid-template-columns: 1fr; }
}

/* ============================================================================
   NO SIDEBAR (everywhere but the homepage) — paired with the body_class filter
   in functions.php. Divi defaults inner views to a useless right sidebar.
   ========================================================================= */
body:not(.home) #sidebar { display: none !important; }
body:not(.home).et_no_sidebar #left-area { width: 100% !important; float: none; padding-bottom: 0; }
body:not(.home) #main-content .container::before { display: none !important; } /* kill sidebar divider line */
/* keep a readable measure on single posts + static pages (no edge-to-edge text) */
.single #left-area,
.page:not(.home) #left-area { max-width: 820px; margin-left: auto; margin-right: auto; }

/* ============================================================================
   PER-SITE OVERRIDES — add durable freeofdandruff-only tweaks below.
   ========================================================================= */
