/*
Theme Name:   DisasterSurvival Child
Theme URI:    https://disastersurvival.net
Description:  GeneratePress child theme for DisasterSurvival.net. Brand colors and type, lead magnet boxes linked to systeme.io, author box, affiliate disclosure and first-aid notice.
Author:       DisasterSurvival.net
Template:     generatepress
Version:      1.7.0
Requires PHP: 7.4
Text Domain:  disastersurvival-child
*/

/* ---------- Brand palette (overrides GeneratePress global colors) ---------- */
:root {
	--contrast: #1f2328;     /* body text */
	--contrast-2: #4a5560;   /* muted text */
	--contrast-3: #b8c0c6;   /* borders */
	--base: #e7e3da;         /* soft panels */
	--base-2: #f7f5f0;       /* page background */
	--base-3: #ffffff;       /* content background */
	--accent: #c2410c;       /* safety orange: links, buttons */

	--ds-navy: #1c2a36;
	--ds-navy-2: #2b3d4c;
	--ds-orange-dark: #9a3412;
	--ds-green: #3f6b3a;
	--ds-radius: 6px;
	--ds-heading: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
}

/* ---------- Typography ---------- */
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 18px;
	line-height: 1.7;
	color: var(--contrast);
	background-color: var(--base-2);
}

h1, h2, h3, h4,
.site-title,
.main-navigation .main-nav ul li a {
	font-family: var(--ds-heading);
}

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.2;
	color: var(--ds-navy);
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; margin-top: 2.2em; }
h3 { font-size: 1.45rem; margin-top: 1.6em; }

@media (max-width: 768px) {
	body { font-size: 17px; }
	h1 { font-size: 2rem; }
	h2 { font-size: 1.6rem; }
	h3 { font-size: 1.3rem; }
}

a { color: var(--accent); }
a:hover, a:focus { color: var(--ds-orange-dark); }

/* ---------- Header and navigation ---------- */
.site-header {
	background-color: var(--ds-navy);
	border-bottom: 4px solid var(--accent);
}

.site-header .main-title a,
.site-header .site-title a,
.site-header .site-description {
	color: #ffffff;
}

.site-title {
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.main-navigation,
.main-navigation ul ul {
	background-color: var(--ds-navy);
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle {
	color: #ffffff;
	font-weight: 600;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
	color: #ffffff;
	background-color: var(--ds-navy-2);
	box-shadow: inset 0 -3px 0 var(--accent);
}

/* ---------- Content ---------- */
.separate-containers .inside-article,
.one-container .container {
	border-radius: var(--ds-radius);
}

.entry-meta {
	color: var(--contrast-2);
	font-size: 0.9rem;
}

.entry-content blockquote {
	border-left: 4px solid var(--accent);
	background: var(--base-2);
	padding: 1em 1.25em;
	font-style: normal;
}

.entry-content figure.wp-block-table {
	margin: 1.5em 0;
	overflow-x: auto;
}

.entry-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.entry-content th {
	background: var(--ds-navy);
	color: #ffffff;
	text-align: left;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--contrast-3);
	padding: 0.6em 0.8em;
}

.entry-content tr:nth-child(even) td {
	background: var(--base-2);
}

/* Buttons */
button,
.button,
.wp-block-button__link,
input[type="submit"] {
	background-color: var(--accent);
	color: #ffffff;
	border-radius: var(--ds-radius);
	font-family: var(--ds-heading);
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

button:hover,
.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
	background-color: var(--ds-orange-dark);
	color: #ffffff;
}

/* ---------- Callout boxes (usable in posts as class names) ---------- */
.ds-callout,
.ds-key-takeaways,
.ds-warning {
	border-radius: var(--ds-radius);
	padding: 1.1em 1.3em;
	margin: 1.6em 0;
}

.ds-key-takeaways {
	background: #eef3ec;
	border-left: 5px solid var(--ds-green);
}

.ds-key-takeaways > :first-child,
.ds-callout > :first-child,
.ds-warning > :first-child {
	margin-top: 0;
}

.ds-key-takeaways > :last-child,
.ds-callout > :last-child,
.ds-warning > :last-child {
	margin-bottom: 0;
}

.ds-callout {
	background: var(--base-2);
	border-left: 5px solid var(--ds-navy);
}

.ds-warning {
	background: #fdf1e9;
	border-left: 5px solid var(--accent);
}

/* ---------- Affiliate disclosure and first-aid notice ---------- */
.ds-disclosure,
.ds-medical-note {
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--contrast-2);
	background: var(--base-2);
	border-radius: var(--ds-radius);
	padding: 0.7em 1em;
	margin: 0 0 1.5em;
}

.ds-medical-note {
	border-left: 4px solid var(--accent);
}

/* ---------- Lead magnet (opt-in) box ---------- */
.ds-optin {
	display: flex;
	gap: 1.4em;
	align-items: center;
	background: var(--ds-navy);
	color: #ffffff;
	border-radius: var(--ds-radius);
	border-top: 5px solid var(--accent);
	padding: 1.5em 1.6em;
	margin: 2em 0;
}

.ds-optin__image {
	flex: 0 0 130px;
}

.ds-optin__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ds-optin__body {
	flex: 1 1 auto;
}

.ds-optin__eyebrow {
	font-family: var(--ds-heading);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fdba74;
	margin: 0 0 0.3em;
}

.ds-optin__title {
	font-family: var(--ds-heading);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
	margin: 0 0 0.4em;
}

.ds-optin__text {
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 0 1em;
	color: #e5e9ec;
}

.ds-optin__button.button {
	display: inline-block;
	padding: 0.75em 1.4em;
	text-decoration: none;
}

.ds-optin--admin-note {
	display: block;
	background: #fff7ed;
	color: var(--contrast);
	border: 2px dashed var(--accent);
	border-top-width: 2px;
	font-size: 0.9rem;
}

@media (max-width: 600px) {
	.ds-optin {
		flex-direction: column;
		text-align: center;
	}

	.ds-optin__image {
		flex-basis: auto;
		width: 120px;
	}
}

/* ---------- Author box ---------- */
.ds-author-box {
	display: flex;
	gap: 1.1em;
	align-items: flex-start;
	background: var(--base-2);
	border-radius: var(--ds-radius);
	padding: 1.3em 1.4em;
	margin: 2.5em 0 0;
}

.ds-author-box__avatar img {
	border-radius: 50%;
	display: block;
}

.ds-author-box__name {
	font-family: var(--ds-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ds-navy);
	margin: 0 0 0.25em;
}

.ds-author-box__bio {
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0;
	color: var(--contrast-2);
}

@media (max-width: 600px) {
	.ds-author-box {
		flex-direction: column;
	}
}

/* ---------- Footer ---------- */
.site-footer,
.site-info {
	background-color: var(--ds-navy);
	color: #cfd6dc;
}

.site-info a,
.footer-widgets a {
	color: #fdba74;
}

.footer-widgets {
	background-color: var(--ds-navy-2);
	color: #e5e9ec;
}

.footer-widgets .widget-title {
	color: #ffffff;
}

/* ---------- Bundled brand images ---------- */
.site-header {
	background-image: url("assets/header-bg.png");
	background-position: center bottom;
	background-size: cover;
	background-repeat: no-repeat;
}

.site-logo img,
.site-header .header-image {
	max-height: 64px;
	width: auto;
}

@media (max-width: 768px) {
	.site-logo img,
	.site-header .header-image {
		max-height: 48px;
	}
}

.featured-image img,
.post-image img,
.ds-fallback-image {
	border-radius: var(--ds-radius);
	width: 100%;
	height: auto;
}

/* Hide the duplicate text title next to the bundled logo (kept for screen readers). */
.ds-bundled-logo .site-header .site-branding {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ds-single-fallback {
	margin: 0 0 1.5em;
}

/* ---------- Article graphics, printables, pins ---------- */
.ds-graphic {
	margin: 2em 0;
}

.ds-graphic img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ds-radius);
	box-shadow: 0 2px 10px rgba(28, 42, 54, 0.12);
}

.ds-graphic figcaption {
	font-size: 0.85rem;
	color: var(--contrast-2);
	margin-top: 0.5em;
}

.ds-printable,
.ds-pin {
	display: flex;
	gap: 1.4em;
	align-items: center;
	background: var(--base-2);
	border: 2px solid var(--base);
	border-radius: var(--ds-radius);
	padding: 1.3em;
	margin: 2em 0;
}

.ds-printable__preview,
.ds-pin img {
	flex: 0 0 150px;
}

.ds-printable__preview img,
.ds-pin img {
	display: block;
	width: 150px;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba(28, 42, 54, 0.2);
}

.ds-printable__title {
	font-family: var(--ds-heading);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--ds-navy);
	margin: 0 0 0.3em;
}

.ds-printable__body p,
.ds-pin__body p {
	margin-bottom: 0.8em;
}

.ds-printable .ds-optin__eyebrow {
	color: var(--accent);
}

@media (max-width: 600px) {
	.ds-printable,
	.ds-pin {
		flex-direction: column;
		text-align: center;
	}
}

/* ---------- Sidebar ---------- */
.sidebar .widget {
	border-radius: var(--ds-radius);
}

.ds-side-title {
	font-family: var(--ds-heading);
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--ds-navy);
	margin-bottom: 0.4em;
}

.ds-side-start .button {
	display: inline-block;
	margin-top: 0.3em;
}

.ds-side-guides ul {
	margin: 0;
	list-style: none;
}

.ds-side-guides li {
	padding: 0.45em 0;
	border-bottom: 1px solid var(--base);
	font-size: 0.95rem;
}

.sidebar .ds-optin {
	flex-direction: column;
	text-align: left;
	padding: 1.2em;
	margin: 0;
}

.sidebar .ds-optin__title {
	font-size: 1.25rem;
}
