/* ==========================================================================
   Digiratina — Design tokens & base styles
   Section files under assets/css/sections/ build on top of these tokens.
   ========================================================================== */

:root {
	--color-navy: #031349;
	--color-blue: #072eaf;
	--color-bg-light: #ecf2fb;
	--color-bg-light-2: #dcdbf2;
	--color-orange: #f05423;
	--color-white: #ffffff;
	--color-text-body: #46464e;
	--color-text-muted: #6b6f8c;

	--font-base: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--container-width: 1240px;
	--container-wide: 1320px;
	--container-pad: 20px;

	--radius-pill: 40px;
	--radius-card: 24px;

	--shadow-header: 0px 5px 5px rgba(3, 19, 73, 0.06);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-base);
	font-size: 16px;
	line-height: 1.5;
	color: var(--color-text-body);
	background: var(--color-white);
}

img {
	max-width: 100%;
	display: block;
}

/* Browsers apply a default margin to <figure> (e.g. 1em 40px); the core
   Image block's wrapper is a <figure class="wp-block-image">, so without
   this reset every converted decorative/positioned image would shift. */
.wp-block-image {
	margin: 0;
}

/* Visually hides text while keeping it in the accessibility tree — used for
   icon-only Button blocks (core/button has no separate label control). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-base);
	color: var(--color-navy);
}

p {
	margin: 0;
}

button {
	font-family: var(--font-base);
	cursor: pointer;
}

/* ---- Layout helpers ---- */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.container-wide {
	width: 100%;
	max-width: var(--container-wide);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.section {
	position: relative;
	overflow: hidden;
}

.section-eyebrow p {
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	color: var(--color-blue);
	margin-bottom: 10px;
}

.section-title {
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	color: var(--color-navy);
}

.section-subtitle p {
	font-size: 16px;
	color: var(--color-text-body);
	margin-top: 16px;
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-base);
	font-weight: 500;
	font-size: 16px;
	line-height: normal;
	padding: 10px 20px;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	white-space: nowrap;
}

.btn:hover {
	opacity: 0.85;
}

.btn-primary {
	background: var(--color-navy);
	color: var(--color-white);
}

.btn-outline {
	background: transparent;
	border-color: var(--color-navy);
	color: var(--color-navy);
}

.btn-white {
	background: var(--color-white);
	color: var(--color-navy);
}

.btn-outline-white {
	background: transparent;
	border-color: var(--color-white);
	color: var(--color-white);
}

.btn-sm {
	font-size: 14px;
	font-weight: 600;
	padding: 12px 24px;
}

/* ---- Block-editor buttons (core/buttons + core/button) ---- */
.wp-block-buttons .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-base);
	font-weight: 500;
	font-size: 16px;
	line-height: normal;
	padding: 10px 20px;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	white-space: nowrap;
}

.wp-block-buttons .wp-block-button__link:hover {
	opacity: 0.85;
}

.wp-block-button.btn-primary .wp-block-button__link {
	background: var(--color-navy);
	color: var(--color-white);
}

.wp-block-button.btn-outline .wp-block-button__link {
	background: transparent;
	border-color: var(--color-navy);
	color: var(--color-navy);
}

.wp-block-button.btn-white .wp-block-button__link {
	background: var(--color-white);
	color: var(--color-navy);
}

.wp-block-button.btn-outline-white .wp-block-button__link {
	background: transparent;
	border-color: var(--color-white);
	color: var(--color-white);
}

/* ---- Site header ---- */
.site-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 20px 0;
	position: relative;
	z-index: 100;
}

.site-header__bar {
	width: 100%;
	max-width: var(--container-wide);
	background: var(--color-white);
	box-shadow: var(--shadow-header);
	border-radius: var(--radius-pill);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	gap: 20px;
}

.site-header__logo img {
	height: 30px;
	width: auto;
}

.site-header__nav {
	display: flex;
	align-items: center;
}

.site-header__menu {
	display: flex;
	align-items: center;
}

.site-header__menu li {
	position: relative;
}

.site-header__menu > li > a {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 10px 16px;
	font-weight: 500;
	font-size: 16px;
	color: var(--color-navy);
	border-radius: 8px;
}

.site-header__menu li.menu-item-has-children > a::after {
	content: '';
	width: 14px;
	height: 14px;
	margin-left: 2px;
	background: currentColor;
	-webkit-mask: url('../images/header/chevron-down.svg') center / contain no-repeat;
	mask: url('../images/header/chevron-down.svg') center / contain no-repeat;
}

.site-header__menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--color-white);
	box-shadow: 0 10px 30px rgba(3, 19, 73, 0.12);
	border-radius: 16px;
	padding: 10px;
	min-width: 220px;
}

.site-header__menu li.menu-item-has-children:hover .sub-menu {
	display: block;
}

.site-header__menu .sub-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	color: var(--color-navy);
	font-size: 15px;
}

.site-header__menu .sub-menu a:hover {
	background: var(--color-bg-light);
}

.site-header__cta {
	margin-left: 4px;
}

.site-header__toggle {
	display: none;
	background: none;
	border: 0;
	padding: 8px;
}

.site-header__toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-navy);
	margin: 5px 0;
}

/* ---- Site footer ---- */
.site-footer {
	background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-light-2) 100%);
	padding: 50px 20px 0;
}

.site-footer__card {
	max-width: var(--container-wide);
	margin: 0 auto;
	background: var(--color-navy);
	border-radius: 40px;
	padding: 50px 60px 40px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.site-footer__columns {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
}

.site-footer__col h4 {
	color: var(--color-white);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.site-footer__col ul li {
	padding: 5px 0;
}

.site-footer__col ul a {
	color: var(--color-white);
	font-size: 14px;
	font-weight: 500;
}

.site-footer__col ul a:hover {
	text-decoration: underline;
}

.site-footer__contact-item {
	margin-bottom: 16px;
	font-size: 14px;
	color: var(--color-white);
}

.site-footer__contact-item strong {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	margin-bottom: 8px;
}

.site-footer__contact-item strong img {
	width: 15px;
	height: 19px;
}

.site-footer__email {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--color-white);
	font-weight: 700;
	font-size: 14px;
}

.site-footer__bottom-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}

.site-footer__actions {
	display: flex;
	gap: 20px;
}

.site-footer__socials {
	display: flex;
	gap: 10px;
}

.site-footer__socials a,
.site-footer__socials img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.site-footer__socials a {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
}

.site-footer__socials a img {
	width: 20px;
	height: 20px;
	border-radius: 0;
}

.site-footer__socials a.is-badge {
	background: transparent;
}

.site-footer__socials a.is-badge img {
	width: 40px;
	height: 40px;
}

.site-footer__legal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	max-width: var(--container-wide);
	margin: 0 auto;
	padding: 20px 60px 30px;
	font-size: 14px;
	color: var(--color-text-body);
}

.site-footer__legal-links a {
	font-weight: 500;
	color: var(--color-text-body);
}

.site-footer__legal-links .sep {
	color: var(--color-orange);
	margin: 0 4px;
}

/* ---- Generic content (page/post fallback) ---- */
.content-area {
	padding: 80px 20px;
}

.content-area .container {
	max-width: 860px;
}

.page-title {
	font-size: 40px;
	font-weight: 700;
	margin-bottom: 24px;
}

.entry-content {
	font-size: 16px;
	line-height: 1.7;
}

.entry-content > * + * {
	margin-top: 20px;
}

.entry-content img {
	border-radius: var(--radius-card);
}

/* ---- Blog listing / archive / search ---- */
.archive-header {
	margin-bottom: 40px;
}

.post-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
}

.post-card {
	border: 1px solid var(--color-bg-light-2);
	border-radius: var(--radius-card);
	overflow: hidden;
}

.post-card__thumb img {
	width: 100%;
	aspect-ratio: 16/10;
	object-fit: cover;
}

.post-card__body {
	padding: 24px;
}

.post-card__title {
	font-size: 22px;
	margin: 8px 0 12px;
}

.post-card__excerpt {
	margin-bottom: 16px;
}

.pagination {
	display: flex;
	gap: 10px;
	margin-top: 40px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--color-bg-light-2);
	color: var(--color-navy);
	font-weight: 500;
}

.pagination .page-numbers.current {
	background: var(--color-navy);
	color: var(--color-white);
	border-color: var(--color-navy);
}

/* ---- Comments ---- */
.comments-area {
	margin-top: 60px;
	border-top: 1px solid var(--color-bg-light-2);
	padding-top: 40px;
}

.comments-title {
	font-size: 24px;
	margin-bottom: 20px;
}

.comment-list {
	margin: 0 0 30px;
}

.comment-item {
	list-style: none;
	padding: 20px 0;
	border-bottom: 1px solid var(--color-bg-light-2);
}

.comment-item .children {
	margin-left: 40px;
	padding-left: 20px;
	border-left: 1px solid var(--color-bg-light-2);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.comment-author img {
	border-radius: 50%;
}

.comment-date {
	color: var(--color-text-muted);
	font-size: 14px;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
	width: 100%;
	max-width: 480px;
	padding: 12px 16px;
	border: 1px solid var(--color-bg-light-2);
	border-radius: 16px;
	font-family: var(--font-base);
	margin-bottom: 16px;
	display: block;
}

.comment-form textarea {
	max-width: 100%;
}

.comment-form .form-submit input {
	font-family: var(--font-base);
	font-weight: 500;
	font-size: 16px;
	padding: 10px 24px;
	border-radius: var(--radius-pill);
	background: var(--color-navy);
	color: var(--color-white);
	border: 0;
}

/* ---- Pending-section placeholder (Figma fetch quota gaps) ---- */
.section-placeholder {
	background: repeating-linear-gradient(
		45deg,
		#f7f8fc,
		#f7f8fc 12px,
		#eef1fa 12px,
		#eef1fa 24px
	);
	border-top: 1px dashed var(--color-bg-light-2);
	border-bottom: 1px dashed var(--color-bg-light-2);
	padding: 60px 20px;
	text-align: center;
	color: var(--color-text-muted);
}

.section-placeholder__inner {
	max-width: 640px;
	margin: 0 auto;
}

.section-placeholder__badge p {
	display: inline-block;
	background: var(--color-white);
	border: 1px solid var(--color-bg-light-2);
	border-radius: var(--radius-pill);
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-navy);
	margin-bottom: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.site-header__menu {
		flex-wrap: wrap;
	}
}

@media (max-width: 900px) {
	.site-header__bar {
		flex-wrap: wrap;
		border-radius: 24px;
	}

	.site-header__nav {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.site-header__nav.is-open {
		display: flex;
	}

	.site-header__menu {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.site-header__menu .sub-menu {
		position: static;
		box-shadow: none;
		display: none;
	}

	.site-header__menu li.menu-item-has-children.is-open .sub-menu {
		display: block;
	}

	.site-header__toggle {
		display: block;
	}

	.site-header__cta {
		margin: 10px 0 0;
	}

	.site-footer__card {
		padding: 40px 24px 30px;
		border-radius: 24px;
	}

	.site-footer__legal {
		padding: 20px 24px 30px;
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 640px) {
	.section-title {
		font-size: 30px;
	}

	.post-list {
		grid-template-columns: 1fr;
	}
}
