/* UK Book Writer — base theme styles. Most design lives in Elementor; this file covers
   the global basics, the main menu dropdown, blog post typography and fallbacks. */

:root {
	--ukbw-navy: #14284B;
	--ukbw-navy-dark: #0C1A33;
	--ukbw-gold: #E39A2C;
	--ukbw-gold-soft: #F2C46D;
	--ukbw-ink: #14181F;
	--ukbw-text: #4A5260;
	--ukbw-light: #F2F5FA;
	--ukbw-line: #E3E7EE;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: #FFFFFF;
	color: var(--ukbw-ink);
	font-family: 'Manrope', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--ukbw-navy); }
a:hover { color: var(--ukbw-navy-dark); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 100000; top: 8px; left: 8px;
	padding: 10px 16px; background: #fff; color: var(--ukbw-navy); border-radius: 8px;
}

/* Anchor jumps clear the sticky header */
[id] { scroll-margin-top: 110px; }

/* Elementor: headings carry inline HTML from the design, so links inside inherit colour */
.elementor-heading-title a { color: inherit; }
.elementor-widget-heading .elementor-heading-title { margin: 0; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- header + main menu */
.ukbw-header.elementor-sticky--effects { box-shadow: 0 6px 24px rgba(12, 26, 51, 0.08); }

/* Two-column Services dropdown, as in the design */
.ukbw-mainnav .elementor-nav-menu--main .sub-menu {
	column-count: 2;
	column-gap: 4px;
	min-width: 500px !important;
	padding: 8px !important;
	border: 1px solid var(--ukbw-line);
	border-radius: 14px;
	background: #fff;
}
.ukbw-mainnav .elementor-nav-menu--main .sub-menu li { break-inside: avoid; }
.ukbw-mainnav .elementor-nav-menu--main .sub-menu a { border-radius: 8px; border-left: 0 !important; }
.ukbw-mainnav .elementor-nav-menu--main .sub-menu a.elementor-item-active,
.ukbw-mainnav .elementor-nav-menu--main .sub-menu a.elementor-sub-item.elementor-item-active { background: var(--ukbw-light); font-weight: 800; }
.ukbw-mainnav .elementor-nav-menu--dropdown.elementor-nav-menu__container {
	border-top: 1px solid var(--ukbw-line);
	box-shadow: 0 18px 40px rgba(12, 26, 51, 0.14);
}
.ukbw-mainnav .elementor-nav-menu--dropdown .sub-menu { column-count: 1; min-width: 0 !important; border: 0; }

/* ---------------------------------------------------------- blog post typography */
.ukbw-prose, .ukbw-prose .elementor-widget-container { color: #2B3240; }
.ukbw-prose p, .ukbw-prose li { font-size: 18px; line-height: 1.75; color: #2B3240; }
.ukbw-prose p { margin: 0 0 18px; }
.ukbw-prose h2 {
	font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 36px; line-height: 1.12;
	margin: 56px 0 16px; color: var(--ukbw-ink); scroll-margin-top: 110px;
}
.ukbw-prose h3 { font-size: 20px; font-weight: 800; margin: 28px 0 8px; color: var(--ukbw-ink); }
.ukbw-prose ul, .ukbw-prose ol { padding-left: 22px; margin: 0 0 18px; }
.ukbw-prose blockquote {
	margin: 32px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--ukbw-gold);
	font-family: 'Instrument Serif', serif; font-size: 28px; line-height: 1.25; color: var(--ukbw-navy);
}
.ukbw-prose blockquote p { font: inherit; color: inherit; margin: 0; }
.ukbw-prose table { width: 100%; border-collapse: collapse; }
.ukbw-prose .wp-block-heading { scroll-margin-top: 110px; }
.ukbw-prose img { border-radius: 16px; }
.ukbw-prose details { border-bottom: 1px solid #DCE1EA; }
.ukbw-prose details summary {
	list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; font-size: 18px;
	display: flex; justify-content: space-between; gap: 16px;
}
.ukbw-prose details summary::-webkit-details-marker { display: none; }
.ukbw-prose details summary span:last-child { transition: transform .2s; }
.ukbw-prose details[open] summary span:last-child { transform: rotate(45deg); }
@media (max-width: 767px) {
	.ukbw-prose h2 { font-size: 30px; margin-top: 44px; }
	.ukbw-prose p, .ukbw-prose li { font-size: 17px; }
}

/* ---------------------------------------------------------- Elementor Pro widgets */
.elementor-widget-form .elementor-field-group .elementor-field-textual:focus {
	border-color: var(--ukbw-gold) !important;
	box-shadow: 0 0 0 3px rgba(227, 154, 44, 0.25);
	outline: none;
}
.elementor-field-type-acceptance .elementor-field-subgroup .elementor-field-option {
	display: flex; align-items: flex-start; gap: 10px;
}
.elementor-field-type-acceptance .elementor-field-option input { margin-top: 3px; flex: none; }
.elementor-widget-form .elementor-message { font-family: 'Manrope', sans-serif; font-size: 15px; }

/* Posts widget cards (blog page + "Keep reading") */
.elementor-posts--skin-cards .elementor-post__card { transition: transform .2s, box-shadow .2s; }
.elementor-posts--skin-cards .elementor-post__card:hover {
	transform: translateY(-3px); box-shadow: 0 16px 36px rgba(12, 26, 51, 0.10);
}
.elementor-posts--skin-cards .elementor-post__card:hover .elementor-post__title a { text-decoration: underline; text-underline-offset: 3px; }
.elementor-posts--skin-cards .elementor-post__badge { border-radius: 999px; font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: .02em; }
.elementor-posts--skin-cards .elementor-post__read-more { font-weight: 800; }
.elementor-pagination { margin-top: 40px; font-family: 'Manrope', sans-serif; font-weight: 700; }
.elementor-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 10px; }
.elementor-pagination .page-numbers.current { background: var(--ukbw-navy); color: #fff; }

/* Accordions (FAQ) */
.elementor-accordion .elementor-tab-title { cursor: pointer; }

/* ---------------------------------------------------------- fallbacks (no Elementor template) */
.ukbw-wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.ukbw-fallback-header { border-bottom: 1px solid var(--ukbw-line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 50; }
.ukbw-fallback-header .ukbw-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; }
.ukbw-fallback-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; color: var(--ukbw-navy); }
.ukbw-fallback-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.ukbw-fallback-header ul ul { display: none; }
.ukbw-fallback-header a { text-decoration: none; font-weight: 600; color: #3B4250; }
.ukbw-fallback-footer { background: var(--ukbw-navy-dark); color: #C9D2E3; padding: 48px 0; margin-top: 80px; }
.ukbw-fallback-footer a { color: #fff; }
.ukbw-fallback-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.ukbw-archive, .ukbw-single { padding-top: 56px; padding-bottom: 80px; }
.ukbw-archive-head h1, .ukbw-single-title { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; color: var(--ukbw-ink); margin: 0 0 32px; }
.ukbw-single { max-width: 808px; }
.ukbw-single-thumb { width: 100%; border-radius: 22px; margin-bottom: 32px; }
.ukbw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 24px; }
.ukbw-card a { display: block; text-decoration: none; color: inherit; border: 1px solid var(--ukbw-line); border-radius: 18px; overflow: hidden; height: 100%; }
.ukbw-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.ukbw-card-body { padding: 20px 22px 24px; }
.ukbw-card h2 { font-size: 21px; font-weight: 800; margin: 6px 0 8px; color: var(--ukbw-ink); }
.ukbw-card p { margin: 0; color: var(--ukbw-text); line-height: 1.6; }
.ukbw-card-meta { font-size: 13px; color: #5A6270; font-weight: 700; }
.nav-links { display: flex; gap: 8px; margin-top: 40px; }

/* ---------------------------------------------------------- small phones: keep the header on one line */
@media (max-width: 1024px) {
	.ukbw-header .elementor-widget-button { flex-shrink: 0; }
	.ukbw-header .elementor-widget-nav-menu { margin-left: auto; margin-right: 10px; }
}
@media (max-width: 480px) {
	.ukbw-header .elementor-widget-button .elementor-button {
		padding: 10px 14px !important; font-size: 13px !important; white-space: nowrap;
	}
	.ukbw-header .elementor-widget-heading .elementor-heading-title { font-size: 15px !important; }
	.ukbw-header .elementor-menu-toggle { padding: 6px; }
}
@media (max-width: 360px) {
	.ukbw-header .elementor-widget-button { display: none; }
}

/* Genre tabs on phones: one scrollable row of pills */
@media (max-width: 767px) {
	.e-n-tabs-heading { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
	.e-n-tabs-heading::-webkit-scrollbar { display: none; }
	.e-n-tabs-heading .e-n-tab-title { flex: 0 0 auto !important; padding: 10px 16px !important; font-size: 14px; }
}
