/*
Theme Name: Criminal Defendants Genesis
Theme URI: https://criminal-defendants.com/
Description: Custom Genesis child theme rebuilt from the site's former Rein design.
Author: Jupiter Marketing Agency
Version: 1.0.3
Template: genesis
Text Domain: criminal-defendants-genesis
*/

:root {
	--cdg-ink: #362953;
	--cdg-red: #ef0202;
	--cdg-muted: #dadeed;
	--cdg-white: #ffffff;
	--cdg-content-width: 1180px;
	--cdg-shadow: 0 12px 32px rgba(24, 14, 42, .16);
}

html { scroll-behavior: smooth; }
body.cdg-theme {
	margin: 0;
	background: #2c2048 var(--cdg-background-image) center top / cover fixed no-repeat;
	color: var(--cdg-ink);
	font-family: "Muli", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.75;
}
body.cdg-theme *, body.cdg-theme *::before, body.cdg-theme *::after { box-sizing: border-box; }
body.cdg-theme .site-container,
body.cdg-theme .site-inner,
body.cdg-theme .content-sidebar-wrap,
body.cdg-theme .content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	float: none;
}
body.cdg-theme .site-inner { clear: both; }
body.cdg-theme .sidebar,
body.cdg-theme .breadcrumb,
body.cdg-theme .entry-footer { display: none; }

.cdg-wrap { width: min(var(--cdg-content-width), calc(100% - 40px)); margin: 0 auto; }
.cdg-screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Header and navigation */
.cdg-header { position: relative; z-index: 20; color: var(--cdg-white); }
.cdg-header__inner { display: flex; align-items: center; min-height: 100px; border-bottom: 1px solid rgba(255,255,255,.3); }
.cdg-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.cdg-logo img { display: block; width: 130px; height: auto; max-height: 78px; object-fit: contain; }
.cdg-logo__text { color: var(--cdg-white); font: 700 30px/1 "Playfair Display", Georgia, serif; text-decoration: none; }
.cdg-primary-nav { margin-left: auto; }
.cdg-primary-nav ul, .cdg-footer-nav ul { display: flex; gap: 6px; align-items: center; margin: 0; padding: 0; list-style: none; }
.cdg-primary-nav li { position: relative; }
.cdg-primary-nav a, .cdg-footer-nav a { display: block; color: var(--cdg-white); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 14px 12px; }
.cdg-primary-nav a:hover, .cdg-primary-nav .current-menu-item > a, .cdg-footer-nav a:hover { color: var(--cdg-red); }
.cdg-primary-nav .sub-menu { position: absolute; top: 100%; left: 0; z-index: 5; display: none; min-width: 220px; padding: 8px 0; background: #47356d; box-shadow: var(--cdg-shadow); }
.cdg-primary-nav li:hover > .sub-menu, .cdg-primary-nav li:focus-within > .sub-menu { display: block; }
.cdg-primary-nav .sub-menu .sub-menu { top: 0; left: 100%; margin-top: -8px; }
.cdg-primary-nav .sub-menu a { white-space: nowrap; padding: 9px 16px; }
.cdg-menu-toggle { display: none; margin-left: auto; border: 1px solid rgba(255,255,255,.7); background: transparent; color: var(--cdg-white); font: inherit; padding: 8px 12px; cursor: pointer; }

/* Home */
.cdg-home { padding: 46px 0 0; }
.cdg-carousel { position: relative; margin: 0 0 52px; padding: 0 42px; }
.cdg-carousel__track { display: flex; gap: 20px; overflow: hidden; }
.cdg-carousel__card { position: relative; flex: 0 0 calc((100% - 40px) / 3); min-height: 305px; overflow: hidden; background: var(--cdg-ink); box-shadow: var(--cdg-shadow); }
.cdg-carousel__image { position: absolute; inset: 0; background-position: center; background-size: cover; transition: transform .35s ease; }
.cdg-carousel__card:hover .cdg-carousel__image { transform: scale(1.04); }
.cdg-carousel__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, rgba(30, 18, 54, .84)); }
.cdg-carousel__content { position: relative; z-index: 1; display: flex; min-height: 305px; flex-direction: column; justify-content: flex-end; padding: 22px; color: var(--cdg-white); }
.cdg-carousel__title { margin: 0; font: 700 24px/1.15 "Playfair Display", Georgia, serif; }
.cdg-carousel__title a { color: inherit; text-decoration: none; }
.cdg-carousel__date { margin-top: 10px; color: var(--cdg-muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cdg-carousel__control { position: absolute; top: 50%; z-index: 2; width: 34px; height: 48px; transform: translateY(-50%); border: 0; background: var(--cdg-red); color: var(--cdg-white); font-size: 25px; line-height: 1; cursor: pointer; }
.cdg-carousel__control:hover { background: #bf0000; }
.cdg-carousel__control--previous { left: 0; }
.cdg-carousel__control--next { right: 0; }

.cdg-post-list { padding-bottom: 52px; }
.cdg-post-list__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.cdg-post-card { display: grid; grid-template-columns: minmax(220px, 45%) 1fr; margin-bottom: 30px; overflow: hidden; background: var(--cdg-white); box-shadow: var(--cdg-shadow); }
.cdg-post-card__image { min-height: 300px; background: #ece8f1 center / cover no-repeat; }
.cdg-post-card__body { padding: 34px; }
.cdg-category { display: inline-block; color: var(--cdg-red); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.cdg-post-card__title, .cdg-entry__title { margin: 8px 0 14px; color: var(--cdg-ink); font: 700 31px/1.18 "Playfair Display", Georgia, serif; }
.cdg-post-card__title a, .cdg-entry__title a { color: inherit; text-decoration: none; }
.cdg-post-card__excerpt { margin: 0; }
.cdg-button { display: inline-block; margin-top: 22px; padding: 10px 18px; border: 2px solid var(--cdg-red); color: var(--cdg-red); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.cdg-button:hover { background: var(--cdg-red); color: var(--cdg-white); }
.cdg-sidebar { background: rgba(54,41,83,.96); color: var(--cdg-muted); padding: 30px; }
.cdg-sidebar .widget { margin: 0 0 30px; }
.cdg-sidebar .widget:last-child { margin-bottom: 0; }
.cdg-sidebar .widget-title { margin: 0 0 14px; color: var(--cdg-white); font: 700 21px/1.2 "Playfair Display", Georgia, serif; }
.cdg-sidebar a { color: var(--cdg-white); }
.cdg-sidebar ul { margin: 0; padding-left: 18px; }
.cdg-pagination { display: flex; justify-content: space-between; gap: 16px; padding: 26px 0 0; }
.cdg-pagination a { color: var(--cdg-white); font-weight: 700; text-decoration: none; }

/* Singular pages and articles */
.cdg-entry { padding: 55px 0; }
.cdg-entry__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; max-width: var(--cdg-content-width); margin: 0 auto; align-items: start; }
.cdg-entry__shell { min-width: 0; padding: 48px; background: var(--cdg-white); box-shadow: var(--cdg-shadow); }
.cdg-entry__featured { min-height: 360px; margin: -48px -48px 40px; background: #2c2048 center / cover no-repeat; }
.cdg-entry__title { font-size: clamp(32px, 5vw, 50px); }
.cdg-entry__meta { margin-bottom: 24px; color: #736987; font-size: 13px; }
.cdg-entry__content { overflow-wrap: break-word; }
.cdg-entry__content h2, .cdg-entry__content h3, .cdg-entry__content h4 { color: var(--cdg-ink); font-family: "Playfair Display", Georgia, serif; line-height: 1.25; }
.cdg-entry__content h2 { font-size: 30px; }
.cdg-entry__content h3 { font-size: 24px; }
.cdg-entry__content a { color: #b40000; }
.cdg-entry__content img { max-width: 100%; height: auto; }
.cdg-entry__content table, .cdg-entry__content th, .cdg-entry__content td { border: 1px solid rgba(14,13,13,.55); border-collapse: collapse; }
.cdg-entry__content th, .cdg-entry__content td { padding: 8px; }
.cdg-entry__content th { color: #000; }
.cdg-entry__content blockquote { margin: 28px 0; padding: 8px 24px; border-left: 4px solid var(--cdg-red); color: #5f526f; font: italic 22px/1.5 "Playfair Display", Georgia, serif; }
.cdg-entry__content .wp-block-button__link { background: var(--cdg-red); }

/* Footer */
.cdg-footer { color: var(--cdg-white); padding-top: 20px; }
.cdg-footer__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0; border-top: 1px solid rgba(255,255,255,.28); border-bottom: 1px solid rgba(255,255,255,.28); }
.cdg-footer .cdg-logo img { width: 130px; }
.cdg-footer__widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 40px 0; }
.cdg-footer .widget-title { font: 700 21px/1.2 "Playfair Display", Georgia, serif; }
.cdg-footer .widget, .cdg-footer p { color: var(--cdg-muted); }
.cdg-footer a { color: var(--cdg-white); }
.cdg-footer__bottom { padding: 24px 0 34px; border-top: 1px solid rgba(255,255,255,.28); color: var(--cdg-muted); font-size: 13px; }
.cdg-footer__bottom p { margin: 0; }

@media (max-width: 980px) {
	.cdg-carousel__card { flex-basis: calc((100% - 20px) / 2); }
	.cdg-post-list__grid { grid-template-columns: 1fr; }
	.cdg-sidebar { display: none; }
	.cdg-entry__layout { grid-template-columns: 1fr; }
	.cdg-entry__layout .cdg-sidebar { display: block; }
	.cdg-primary-nav { display: none; position: absolute; top: 100%; right: 20px; left: 20px; margin: 0; background: #47356d; box-shadow: var(--cdg-shadow); }
	.cdg-primary-nav.is-open { display: block; }
	.cdg-primary-nav ul { display: block; padding: 10px; }
	.cdg-primary-nav .sub-menu { position: static; display: block; margin-left: 16px; box-shadow: none; }
	.cdg-menu-toggle { display: block; }
	.cdg-footer__widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.cdg-wrap { width: min(100% - 28px, var(--cdg-content-width)); }
	.cdg-header__inner { min-height: 78px; }
	.cdg-logo img { width: 110px; }
	.cdg-home, .cdg-entry { padding-top: 28px; }
	.cdg-carousel { margin-bottom: 30px; padding: 0 34px; }
	.cdg-carousel__track { gap: 14px; }
	.cdg-carousel__card { flex-basis: 100%; }
	.cdg-carousel__card, .cdg-carousel__content { min-height: 245px; }
	.cdg-post-card { grid-template-columns: 1fr; }
	.cdg-post-card__image { min-height: 220px; }
	.cdg-post-card__body, .cdg-entry__shell { padding: 25px; }
	.cdg-entry__featured { min-height: 220px; margin: -25px -25px 28px; }
	.cdg-entry__layout .cdg-sidebar { display: none; }
	.cdg-post-card__title { font-size: 27px; }
	.cdg-footer__top { display: block; }
	.cdg-footer-nav { margin-top: 16px; }
	.cdg-footer-nav ul { flex-wrap: wrap; }
	.cdg-footer-nav a { padding: 7px 10px 7px 0; }
	.cdg-footer__widgets { grid-template-columns: 1fr; padding: 28px 0; }
}
