/* ==========================================================================
   RDW Theme — base styles
   Deliberately light-touch: Elementor owns the visual design of built pages.
   These styles only cover the theme's own fallback templates + brand tokens.
   ========================================================================== */

:root {
	/* Brand tokens. These mirror the Elementor global colours so the theme's
	   own templates match Elementor-built pages. Elementor's own variables
	   (--e-global-color-*) take priority wherever they exist. */
	--rdw-navy: var(--e-global-color-primary, #0d3577);
	--rdw-navy-deep: #071f4a;
	--rdw-blue: var(--e-global-color-secondary, #436eab);
	--rdw-accent: var(--e-global-color-accent, #ffca00);
	--rdw-ink: var(--e-global-color-text, #34353c);
	--rdw-muted: #6b7280;
	--rdw-line: #e6e8ee;
	--rdw-surface: #ffffff;
	--rdw-surface-alt: #f6f7fa;

	--rdw-content-width: 1140px;
	--rdw-radius: 14px;
	--rdw-radius-lg: 22px;
	--rdw-shadow: 0 10px 30px rgba(13, 53, 119, .08);

	--rdw-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/*
 * Global typography is intentionally hands-off. Elementor's global styles
 * own colour and type across the site; setting them here as well would
 * change the look of existing pages purely because the theme changed.
 * Anything opinionated below is scoped to the theme's own templates.
 */
body {
	font-family: var(--rdw-font);
	font-size: 16px;
	/*
	 * 1.5 deliberately matches Hello Elementor. Elementor's icon widgets put
	 * an inline-block .elementor-icon inside .elementor-icon-wrapper, so the
	 * wrapper reserves baseline descender space whose size comes from the
	 * inherited line-height. A larger value here silently makes every icon
	 * widget on the site taller.
	 */
	line-height: 1.5;
	background: var(--rdw-surface);
	-webkit-font-smoothing: antialiased;
}

.rdw-native { line-height: 1.65; }

/*
 * Make .elementor-icon-wrapper take the true height of its icon.
 *
 * Elementor nests an inline-block .elementor-icon inside the wrapper. An
 * inline-block sits on the text baseline, so the wrapper reserves descender
 * space underneath it — a fixed gap (6–8px here) that does not scale with the
 * icon, leaving the wrapper taller than the icon it contains.
 *
 * line-height: 0 removes the strut that creates the space; vertical-align: top
 * is a second line of defence in case a wrapper inherits a line-height from
 * elsewhere. Safe because these wrappers only ever contain the icon itself.
 *
 * Disable with: add_filter( 'rdw_theme_fix_elementor_icon_gap', '__return_false' );
 */
.rdw-icon-fix .elementor-icon-wrapper { line-height: 0; }
.rdw-icon-fix .elementor-icon-wrapper .elementor-icon { vertical-align: top; }

.rdw-native,
.post-card,
.comments-area,
.rdw-404 { color: var(--rdw-ink); }

.rdw-native h1, .rdw-native h2, .rdw-native h3,
.rdw-native h4, .rdw-native h5, .rdw-native h6,
.page-header .entry-title,
.post-card__title {
	font-weight: 700;
	line-height: 1.2;
	color: var(--rdw-navy);
}

.rdw-native a { color: var(--rdw-blue); }

.rdw-native a,
.post-card a,
.rdw-404 a { text-decoration: none; }

.rdw-native a:hover,
.post-card a:hover { text-decoration: underline; }

/*
 * No extra paragraph spacing here — the 0.9rem bottom margin in reset.css
 * already handles it, site-wide and identically to Hello Elementor.
 */
.rdw-native p + ul,
.rdw-native p + ol { margin-top: .4em; }

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 8px;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--rdw-navy);
	color: #fff;
	border-radius: 0 0 10px 10px;
	transition: top .2s ease;
}

.skip-link:focus {
	top: 0;
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
}

:focus-visible {
	outline: 3px solid var(--rdw-accent);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout — fallback templates only
   -------------------------------------------------------------------------- */

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }

.site-main,
.site-header__inner,
.site-footer__inner {
	width: 100%;
	max-width: var(--rdw-content-width);
	margin-inline: auto;
	padding-inline: 20px;
}

.site-main { padding-block: 48px 72px; }

/*
 * Anything Elementor built must not inherit the theme's own container or
 * padding, or switching themes would shift the layout of live pages.
 */
.elementor-template-full-width .site-main,
.elementor-page .site-main,
.site-main:has(> .elementor),
.site-main:has(.elementor-section),
.site-main:has(.e-con) {
	max-width: none;
	padding: 0;
}

/* --------------------------------------------------------------------------
   Fallback header / footer
   -------------------------------------------------------------------------- */

.site-header {
	border-bottom: 1px solid var(--rdw-line);
	background: var(--rdw-surface);
}

.site-header__inner,
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-block: 18px;
}

.site-title { font-size: 20px; font-weight: 800; margin: 0; }
.site-title a { color: var(--rdw-navy); }
.site-description { color: var(--rdw-muted); font-size: 14px; }
.custom-logo { max-height: 64px; width: auto; }

.site-navigation__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 500;
}

.site-navigation__menu a { padding: 6px 0; }
.site-navigation__menu a:hover { color: var(--rdw-blue); }

.site-footer {
	margin-top: auto;
	background: var(--rdw-navy);
	color: rgba(255, 255, 255, .85);
}

.site-footer a { color: #fff; }
.site-footer .site-title a { color: #fff; }
.site-footer__inner { padding-block: 34px; }
.site-footer__copyright { font-size: 14px; width: 100%; opacity: .75; }

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

.page-header { margin-bottom: 28px; }
.entry-title { font-size: clamp(28px, 4vw, 44px); }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 10px;
	font-size: 14px;
	color: var(--rdw-muted);
}

.entry-thumbnail { margin-bottom: 28px; border-radius: var(--rdw-radius); overflow: hidden; }

.rdw-native img { border-radius: var(--rdw-radius); }
.rdw-native h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 1.6em; margin-bottom: .5em; }
.rdw-native h3 { font-size: clamp(19px, 2.4vw, 24px); margin-top: 1.4em; margin-bottom: .4em; }
.rdw-native ul,
.rdw-native ol { padding-left: 1.3em; }
.rdw-native li + li { margin-top: .35em; }

.rdw-native blockquote {
	margin: 1.6em 0;
	padding: 18px 24px;
	border-left: 4px solid var(--rdw-accent);
	background: var(--rdw-surface-alt);
	border-radius: 0 var(--rdw-radius) var(--rdw-radius) 0;
}

/* --------------------------------------------------------------------------
   Post cards
   -------------------------------------------------------------------------- */

.posts-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--rdw-surface);
	border: 1px solid var(--rdw-line);
	border-radius: var(--rdw-radius-lg);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover { transform: translateY(-4px); box-shadow: var(--rdw-shadow); }
.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__title { font-size: 19px; }
.post-card__title a:hover { color: var(--rdw-blue); text-decoration: none; }
.post-card__excerpt { color: var(--rdw-muted); font-size: 15px; }
.post-card__type { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--rdw-blue); font-weight: 600; }

.post-card__more {
	margin-top: auto;
	font-weight: 600;
	color: var(--rdw-navy);
}

.post-card__more::after { content: " →"; }

/* --------------------------------------------------------------------------
   Search form
   -------------------------------------------------------------------------- */

.rdw-search-form {
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: 520px;
	padding: 6px;
	background: var(--rdw-surface);
	border: 1px solid var(--rdw-line);
	border-radius: 999px;
	box-shadow: var(--rdw-shadow);
}

.rdw-search-form__input {
	flex: 1;
	min-width: 0;
	padding: 10px 16px;
	border: 0;
	background: transparent;
	border-radius: 999px;
}

.rdw-search-form__input:focus { outline: none; }

.rdw-search-form__submit {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: var(--rdw-navy);
	color: #fff;
	transition: background .2s ease, transform .2s ease;
}

.rdw-search-form__submit:hover { background: var(--rdw-blue); transform: scale(1.05); }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination { margin-top: 46px; }

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 12px;
	border: 1px solid var(--rdw-line);
	border-radius: 12px;
	font-weight: 600;
}

.pagination .page-numbers:hover { text-decoration: none; border-color: var(--rdw-blue); }

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

/* --------------------------------------------------------------------------
   Comments
   -------------------------------------------------------------------------- */

.comments-area { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--rdw-line); }
.comments-title { font-size: 22px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { margin-bottom: 24px; }
.comment-list .children { list-style: none; padding-left: 26px; margin-top: 20px; }

.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--rdw-line);
	border-radius: 12px;
	margin-top: 6px;
}

.comment-form .submit {
	padding: 12px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--rdw-navy);
	color: #fff;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   WooCommerce
   -------------------------------------------------------------------------- */

.rdw-woocommerce .woocommerce-message,
.rdw-woocommerce .woocommerce-info,
.rdw-woocommerce .woocommerce-error { border-top-color: var(--rdw-navy); }

.rdw-woocommerce .button,
.rdw-woocommerce a.button {
	border-radius: 999px;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.skip-link { display: none !important; }
	body { color: #000; }
}
