/*
Theme Name: Blue Ocean Modern
Description: Responsive refresh of the original "Blue Ocean" theme. Same menus, sidebars and content; no external fonts or trackers.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: blueocean-modern
*/

/* ---------- Tokens ---------- */
:root {
	--navy-900: #071d33;
	--navy-800: #0d2d4d;
	--navy-700: #154873;
	--blue-600: #1f6aa5;
	--blue-500: #2b86c9;
	--blue-100: #e6f1fa;
	--ink: #1b2733;
	--muted: #5b6b7a;
	--line: #dde5ed;
	--bg: #f4f7fa;
	--white: #fff;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(7, 29, 51, .06), 0 8px 24px rgba(7, 29, 51, .08);
	--wrap: 1160px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-600); text-underline-offset: 2px; }
a:hover { color: var(--navy-700); }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip-link {
	position: absolute; left: 16px; top: -48px; z-index: 100;
	background: var(--white); color: var(--navy-800); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; color: var(--white); }
/* Wordmark as on the original header: "BlueOcean" in one weight, cream-white;
   "Semantic Web Solutions" below in light blue. */
.brand-name { font-size: 27px; font-weight: 600; letter-spacing: -.015em; color: #f6f1df; }
.brand-name strong { font-weight: 600; }
.brand-tag { font-size: 13px; letter-spacing: .01em; color: #8fc3ec; margin-top: 4px; padding-left: 2px; }

/* ---------- Header & navigation ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(13, 45, 77, .97);
	backdrop-filter: saturate(140%) blur(8px);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }

.nav-toggle {
	display: inline-flex; align-items: center; gap: 10px;
	background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 8px; padding: 9px 14px; font: inherit; font-size: 15px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a { display: block; color: #dbe9f6; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--white); }

/* Mobile navigation */
@media (max-width: 959px) {
	.primary-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--navy-800); border-top: 1px solid rgba(255, 255, 255, .08);
		max-height: calc(100vh - 72px); overflow-y: auto; padding: 8px 0 20px;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav .menu > li > a { padding: 12px 16px; font-weight: 600; font-size: 16px; text-transform: none; }
	.primary-nav .sub-menu a { padding: 8px 16px 8px 32px; font-size: 15px; color: #a9c7e2; }
}

/* Desktop navigation with dropdowns */
@media (min-width: 960px) {
	.nav-toggle { display: none; }
	.primary-nav .menu { display: flex; gap: 4px; }
	.primary-nav .menu > li { position: relative; }
	.primary-nav .menu > li > a {
		padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
		letter-spacing: .04em; text-transform: uppercase;
	}
	.primary-nav .menu > li > a:hover,
	.primary-nav .menu > li:focus-within > a { background: rgba(255, 255, 255, .08); }
	.primary-nav .menu > .current-menu-item > a,
	.primary-nav .menu > .current-menu-ancestor > a { box-shadow: inset 0 -2px 0 var(--blue-500); border-radius: 8px 8px 0 0; }
	.primary-nav .sub-menu {
		position: absolute; left: 0; top: 100%; min-width: 240px; padding: 8px;
		background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
	}
	.primary-nav li:hover > .sub-menu,
	.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.primary-nav .sub-menu a { color: var(--ink); padding: 9px 12px; border-radius: 8px; font-size: 15px; }
	.primary-nav .sub-menu a:hover, .primary-nav .sub-menu .current-menu-item > a { background: var(--blue-100); color: var(--navy-700); }
	.primary-nav .menu > li:last-child .sub-menu { left: auto; right: 0; }
}

/* ---------- Hero (homepage, minimal) ---------- */
.hero {
	position: relative;
	isolation: isolate;
	color: var(--white);
	background: var(--navy-800);
}
/* Photo, brightened (the original image is quite dark). */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: url("assets/ocean.jpg") center 40% / cover no-repeat;
	filter: brightness(1.22) saturate(1.05);
}
/* Light shade on the left so the title stays readable. */
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(100deg, rgba(7, 29, 51, .68) 0%, rgba(13, 45, 77, .35) 50%, rgba(21, 72, 115, .08) 100%);
}
.hero-minimal { min-height: calc(100vh - 72px - 108px); min-height: calc(100svh - 72px - 108px); display: flex; align-items: center; }
.hero-minimal .hero-inner { padding-top: 64px; padding-bottom: 64px; }
.hero-title { margin: 0; font-size: clamp(34px, 6vw, 64px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; max-width: 14ch; text-shadow: 0 2px 18px rgba(7, 29, 51, .5); }
.home-content { padding-top: 40px; padding-bottom: 64px; }

.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }

/* ---------- Page header ---------- */
.page-header {
	color: var(--white);
	background:
		linear-gradient(90deg, rgba(7, 29, 51, .87), rgba(21, 72, 115, .52)),
		url("assets/ocean.jpg") center 55% / cover no-repeat var(--navy-800);
	padding: 44px 0 48px;
}
@media (min-width: 720px) { .page-header { padding: 64px 0 68px; } }
.page-header .eyebrow { color: #8fc3ec; }
.page-title { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.015em; max-width: 24ch; }

/* ---------- Page layout ---------- */
.page-layout { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 72px; }
@media (min-width: 960px) {
	.page-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 44px; }
	.page-layout.no-subnav { grid-template-columns: minmax(0, 1fr); }
	.page-layout.no-subnav .entry { max-width: 880px; }
	.subnav { position: sticky; top: 96px; align-self: start; }
}

/* Sub-navigation (Multiple Sidebars widgets) */
.subnav {
	background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px;
}
.subnav .widget + .widget { margin-top: 10px; }
.subnav .widget-title, .subnav h3 { margin: 6px 10px 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav li a {
	display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15.5px; line-height: 1.35;
}
.subnav li a:hover { background: var(--bg); color: var(--navy-700); }
.subnav .current-menu-item > a, .subnav .current_page_item > a {
	background: var(--blue-100); color: var(--navy-700); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue-500);
}
@media (max-width: 959px) {
	.subnav { padding: 8px; }
	.subnav ul { display: flex; flex-wrap: wrap; gap: 6px; }
	.subnav li a { padding: 7px 12px; font-size: 14.5px; background: var(--bg); border-radius: 999px; }
	.subnav .current-menu-item > a, .subnav .current_page_item > a { box-shadow: none; background: var(--navy-700); color: var(--white); }
}

/* ---------- Content (legacy HTML from 2010–2019) ---------- */
.entry {
	background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 24px 20px; min-width: 0; overflow-wrap: anywhere;
}
@media (min-width: 720px) { .entry { padding: 40px 44px; } }
.entry > :first-child { margin-top: 0; }
.entry > :last-child { margin-bottom: 0; }

/* Old content starts with empty headings/line breaks used as spacers. */
.entry h1:empty, .entry h2:empty, .entry h3:empty, .entry p:empty { display: none; }
.entry > br:first-child { display: none; }

.entry h1, .entry h2, .entry h3, .entry h4 { color: var(--navy-800); line-height: 1.25; letter-spacing: -.01em; margin: 1.6em 0 .55em; }
.entry h1 { font-size: 30px; }
.entry h2 { font-size: 25px; }
.entry h3 { font-size: 20px; }
.entry h4 { font-size: 17px; }
.entry p, .entry ul, .entry ol { margin: 0 0 1.05em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin: .25em 0; }
.entry li::marker { color: var(--blue-500); }
.entry blockquote { margin: 1.4em 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--blue-500); color: var(--muted); }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Old pages use <pre> for plain formatted text; let it wrap like prose. */
.entry pre { white-space: pre-wrap; font: inherit; margin: 0 0 1.05em; overflow-wrap: anywhere; }

/* Neutralise old inline fonts so the page reads as one design. */
.entry [style*="font-family"] { font-family: inherit !important; }
.entry span[style*="font-size"], .entry p[style*="font-size"] { font-size: inherit !important; }
.entry font { font-family: inherit; font-size: inherit; }

/* Images and old WordPress alignment classes */
.entry img { border-radius: 6px; }
.entry .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry .aligncenter { display: block; margin: 1em auto; }
.entry::after { content: ""; display: block; clear: both; }
.entry .wp-caption { max-width: 100%; }
.entry .wp-caption-text { font-size: 14px; color: var(--muted); }

/* Tables: fixed-width layout tables from the old site must not overflow. */
.entry table { border-collapse: collapse; max-width: 100%; margin: 0 0 1.2em; }
.entry td, .entry th { vertical-align: top; padding: 6px 8px; }
.entry table img { border-radius: 0; }
.entry [style*="width"] { max-width: 100%; }

@media (max-width: 719px) {
	.entry .alignleft, .entry .alignright { float: none; margin: 0 0 1em; }
	.entry table { display: block; overflow-x: auto; width: 100% !important; -webkit-overflow-scrolling: touch; }
	.entry table[width], .entry td[width] { width: auto !important; }
	.entry img[width] { width: auto; }
}

/* TablePress */
.entry .tablepress { width: 100%; font-size: 15px; }
.entry .tablepress th { background: var(--blue-100); color: var(--navy-800); }
.entry .tablepress td, .entry .tablepress th { border-bottom: 1px solid var(--line); }

/* Lists of posts (fallback template) */
.list-item + .list-item { border-top: 1px solid var(--line); padding-top: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #a9bfd3; font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-top: 36px; padding-bottom: 36px; }
.site-footer .brand-name { color: var(--white); font-size: 22px; }
.footer-brand { display: flex; flex-direction: column; line-height: 1; }
.footer-meta, .footer-meta * { text-align: left !important; }
.footer-meta .widget > * { display: inline; }
.footer-meta a { color: var(--white); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.footer-meta p { margin: 0; }
@media (min-width: 720px) { .footer-meta, .footer-meta * { text-align: right !important; } }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
