/* Software Downloads store — page-specific styles.
   Loaded AFTER /assets/css/styles.css, so it consumes the site brand variables
   (--navy-blue, --primary-green, --charcoal, --light-gray, --brand-gradient,
   --shadow-*, --border-radius) rather than redefining any colors. */

body { background: var(--light-gray); color: var(--charcoal); }

/* ── Nav (inherits the site's white glassy .navbar from styles.css) ───────── */
.dl-nav .navbar-brand { color: var(--navy-blue); font-size: 1.25rem; letter-spacing: -0.01em; }
.dl-accent { color: var(--primary-green); }
.dl-nav-link { color: var(--charcoal); text-decoration: none; font-weight: 600; font-size: .95rem; }
.dl-nav-link:hover { color: var(--primary-green); }

/* ── Hero (slim, dense on-brand navy→green banner) ───────────────────────── */
.dl-hero {
	background: var(--brand-gradient);
	color: #fff;
	padding: 26px 0 28px;
	margin-top: 72px; /* clear the fixed navbar */
}
.dl-hero-inner { max-width: 760px; } /* constrain so the gradient's right half isn't dead space */
.dl-eyebrow {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: .72rem;
	font-weight: 700;
	color: #d1fae5;
	margin-bottom: 6px;
}
.dl-hero h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.15; max-width: 36ch; margin: 0 0 8px; }
.dl-hero p  { font-size: 1rem; color: rgba(255,255,255,.9); max-width: 66ch; line-height: 1.5; margin: 0; }

/* ── Slim funnel ribbon (directly under hero, ~48px tall) ────────────────── */
.dl-ribbon {
	background: var(--navy-blue);
	color: #fff;
	border-top: 1px solid rgba(255,255,255,.15);
}
.dl-ribbon-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 10px;
	padding-bottom: 10px;
}
.dl-ribbon p {
	margin: 0;
	font-size: .95rem;
	line-height: 1.35;
	color: rgba(255,255,255,.92);
}
.dl-ribbon p .bi { color: var(--primary-green); margin-right: 4px; }
.dl-ribbon-cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--primary-green);
	color: #04240f;
	font-weight: 700;
	font-size: .9rem;
	padding: 8px 16px;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: var(--transition-fast);
}
.dl-ribbon-cta:hover { background: #0ca678; color: #04240f; transform: translateY(-1px); }

/* ── Bundle / value band (relocated below the grid, contained card) ──────── */
.dl-bundle {
	margin-top: 40px;
	background: var(--brand-gradient);
	color: #fff;
	padding: 32px;
	border-radius: var(--border-radius-lg);
	box-shadow: var(--shadow-md);
}
.dl-bundle-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
	gap: 24px 40px;
	align-items: center;
}
.dl-bundle-eyebrow {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: .75rem;
	font-weight: 700;
	color: #d1fae5;
	margin-bottom: 8px;
}
.dl-bundle-copy h2 {
	font-size: 1.7rem;
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 12px;
	color: #fff;
}
.dl-bundle-copy p {
	font-size: 1.02rem;
	line-height: 1.6;
	color: rgba(255,255,255,.92);
	max-width: 62ch;
	margin: 0;
}
.dl-bundle-copy em { font-style: italic; color: #fff; }
.dl-bundle-cta {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: stretch;
}
.dl-bundle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: 700;
	font-size: 1rem;
	padding: 13px 20px;
	border-radius: 10px;
	text-decoration: none;
	transition: var(--transition-fast);
}
.dl-bundle-btn--primary {
	background: #fff;
	color: var(--navy-blue);
	box-shadow: var(--shadow-sm);
}
.dl-bundle-btn--primary:hover { background: #f0fdf4; color: var(--navy-blue); transform: translateY(-2px); }
.dl-bundle-btn--ghost {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255,255,255,.7);
}
.dl-bundle-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.dl-bundle-note {
	font-size: .82rem;
	color: rgba(255,255,255,.8);
	text-align: center;
	line-height: 1.4;
}

/* ── Product grid ────────────────────────────────────────────────────────── */
.dl-main { padding: 24px 0 56px; }
.dl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	align-items: start; /* each card sizes to its own content — expanding one won't stretch the row */
}
.dl-card {
	background: #fff;
	border: 1px solid #e2e6ee;
	border-radius: var(--border-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-sm);
	transition: var(--transition-smooth);
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dl-card-img {
	height: 130px;
	background-size: cover;
	background-position: center;
	background-color: var(--navy-blue);
}
.dl-card-img--placeholder {
	display: flex; align-items: center; justify-content: center;
	background: var(--brand-gradient);
	color: rgba(255,255,255,.4);
	font-size: 3rem;
}
.dl-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.dl-card-body h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; color: var(--navy-blue); }
.dl-card-desc { font-size: 1rem; color: #4b5563; margin: 0 0 14px; line-height: 1.45; }
.dl-card-foot { display: flex; align-items: baseline; gap: 12px; margin-top: auto; margin-bottom: 14px; }

/* "Details" opens a modal — cards stay compact and the page never grows with
   description length. The long copy lives in a hidden .dl-card-long the JS reads. */
.dl-details-toggle {
	appearance: none; background: none; border: 0; cursor: pointer;
	width: 100%; margin-top: 10px; padding: 6px 0;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	color: var(--navy-blue); font-weight: 600; font-size: .9rem;
}
.dl-details-toggle:hover { color: var(--primary-green); }
.dl-card-long { display: none; }

/* Details modal */
.dl-modal-panel--wide { width: min(560px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.dl-details-body {
	font-size: .95rem; color: #445; line-height: 1.6; margin: 4px 0 18px;
	overflow-y: auto; padding-right: 4px;
}
.dl-price { font-size: 1.6rem; font-weight: 800; color: var(--navy-blue); }
.dl-size  { font-size: .8rem; color: #8b93a3; }

.dl-buy-btn {
	appearance: none; border: 0; cursor: pointer;
	background: var(--primary-green); color: #04240f;
	font-weight: 700; font-size: 1rem;
	padding: 12px 16px; border-radius: 10px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	transition: var(--transition-fast);
}
.dl-buy-btn:hover { background: #0ca678; color: #04240f; }
.dl-buy-btn:active { transform: scale(.98); }
.dl-buy-btn:disabled { opacity: .6; cursor: progress; }
.dl-buy-btn--full { width: 100%; margin-top: 8px; }

.dl-trust { text-align: center; margin-top: 36px; color: #6b7280; font-size: .95rem; }
.dl-trust .bi { color: var(--primary-green); }
.dl-trust--included { margin-top: 8px; color: var(--navy-blue); font-weight: 600; }
.dl-trust--included .bi { color: var(--primary-green); }

/* ── Closing CTA (repeat primary offer at the decision point) ────────────── */
.dl-closing {
	margin-top: 24px;
	background: #fff;
	border: 1px solid #e2e6ee;
	border-top: 4px solid var(--primary-green);
	border-radius: var(--border-radius-lg);
	box-shadow: var(--shadow-md);
	padding: 40px 32px;
	text-align: center;
}
.dl-closing h2 {
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--navy-blue);
	margin: 0 0 10px;
}
.dl-closing p {
	font-size: 1.05rem;
	line-height: 1.6;
	color: #4b5563;
	max-width: 64ch;
	margin: 0 auto 22px;
}
.dl-closing-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
}
.dl-bundle-btn--ghost-dark {
	color: var(--navy-blue);
	border-color: var(--navy-blue);
}
.dl-bundle-btn--ghost-dark:hover { background: var(--light-gray); border-color: var(--navy-blue); color: var(--navy-blue); }
.dl-closing-fine {
	margin: 22px 0 0;
	font-size: .9rem;
	color: #6b7280;
}
.dl-closing-fine strong { color: var(--navy-blue); }
.dl-closing-fine a { color: var(--primary-green); text-decoration: none; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.dl-empty { text-align: center; padding: 60px 20px; color: #4b5563; }
.dl-empty .bi { font-size: 3.4rem; color: var(--navy-blue); opacity: .4; }
.dl-empty h2 { font-size: 1.4rem; margin: 16px 0 8px; }

/* ── Footer (brand dark) ─────────────────────────────────────────────────── */
.dl-footer { background: var(--charcoal); color: #aeb9d0; padding: 28px 0; text-align: center; margin-top: 40px; }
.dl-footer p { margin: 4px 0; font-size: .9rem; }
.dl-footer a { color: var(--primary-green); text-decoration: none; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.dl-modal { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; }
.dl-modal[hidden] { display: none; }
.dl-modal-backdrop { position: absolute; inset: 0; background: rgba(30,58,138,.55); backdrop-filter: blur(2px); }
.dl-modal-panel {
	position: relative; background: #fff; border-radius: var(--border-radius-lg);
	width: min(460px, 92vw); padding: 28px 26px 24px;
	box-shadow: var(--shadow-lg);
	animation: dlPop .18s ease;
}
@keyframes dlPop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.dl-modal-close {
	position: absolute; top: 12px; right: 16px; border: 0; background: none;
	font-size: 1.8rem; line-height: 1; color: #9aa3b5; cursor: pointer;
}
.dl-modal-panel h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 6px; color: var(--navy-blue); }
.dl-modal-product { color: #4b5563; margin: 0 0 18px; }
.dl-modal-product strong { color: var(--navy-blue); }
#dlBuyForm label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 5px; color: var(--charcoal); }
.dl-req { color: var(--alert-red); }
#dlBuyForm input {
	width: 100%; height: 44px; padding: 0 12px;
	border: 1px solid #d9dee8; border-radius: 9px; font-size: 1rem;
}
#dlBuyForm input:focus { outline: 2px solid var(--primary-green); outline-offset: 1px; border-color: var(--primary-green); }
.dl-modal-err { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 12px; margin: 12px 0 0; font-size: .9rem; }
.dl-modal-fine { font-size: .8rem; color: #8b93a3; margin: 12px 0 0; text-align: center; line-height: 1.4; }

/* Ribbon + bundle band stack on narrower screens so copy + CTA don't crowd. */
@media (max-width: 768px) {
	.dl-ribbon-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
	.dl-bundle-inner { grid-template-columns: 1fr; gap: 22px; }
	.dl-bundle-cta { align-items: stretch; }
}

@media (max-width: 576px) {
	.dl-hero { padding: 22px 0 24px; }
	.dl-hero h1 { font-size: 1.45rem; }
	.dl-hero p { font-size: .95rem; }
	.dl-ribbon-cta { align-self: stretch; justify-content: center; }
	.dl-bundle { padding: 24px 20px; }
	.dl-bundle-copy h2 { font-size: 1.4rem; }
	.dl-closing { padding: 32px 20px; }
	.dl-closing h2 { font-size: 1.4rem; }
	.dl-closing-actions .dl-bundle-btn { width: 100%; }
}
