/*
Theme Name: bogrismarineservice.gr
Theme URI: https://www.bogrismarineservice.gr/
Author: ariser6 – Econtent Systems
Author URI: https://www.econtentsys.gr/
Description: Custom θέμα για το bogrismarineservice.gr (Bogris Marine Service – Μπόγρης Σπυρίδων). Αριστερό δυναμικό μενού, αρχική με κεντρική εικόνα και εικονίδια, πλήρης υποστήριξη Gutenberg, responsive.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: bogris
*/

/* ---------- Tokens ---------- */
:root {
	--blue: #1c7fb0;
	--blue-deep: #186d96;
	--blue-light: #2194cd;
	--blue-soft: #a9dcf6;
	--ink: #4a5560;
	--heading: #3b4650;
	--muted: #7a7a7a;
	--line: #e6e9ec;
	--paper: #fff;
	--sidebar-w: 205px;
	--pad: 34px;
	--radius: 4px;
	--font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.7;
	color: var(--ink);
	background: #0e3f5c url(assets/img/bg.jpg) center top / cover no-repeat fixed;
}

img,
video,
iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--blue); }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
	color: var(--heading);
	line-height: 1.3;
	margin: 1.6em 0 .6em;
	font-weight: 600;
}

.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: 100;
	top: 8px;
	left: 8px;
	padding: 10px 16px;
	background: #fff;
	color: var(--blue-deep);
	border-radius: var(--radius);
}

/* ---------- Page card ---------- */
.site {
	display: grid;
	grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
	max-width: 1040px;
	margin: 44px auto 0;
	background: var(--paper);
	border-radius: var(--radius) var(--radius) 0 0;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .38);
	overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
	display: flex;
	flex-direction: column;
	background: #fff;
}

.sidebar__brand { background: var(--blue); }

.custom-logo-link { display: block; }
.custom-logo {
	display: block;
	width: 100%;
	max-width: var(--sidebar-w);
}

.nav-toggle { display: none; }

.site-nav {
	background: var(--blue-deep);
	padding: 22px 0 10px;
}

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

.site-nav li { position: relative; }

.site-nav a {
	position: relative;
	display: block;
	padding: 10px 16px 10px 22px;
	color: var(--blue-soft);
	text-decoration: none;
	font-size: 15px;
	border-bottom: 1px solid rgba(0, 0, 0, .2);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
	transition: color .2s, background-color .2s;
}

.site-nav .menu > li:first-child > a { border-top: 1px solid rgba(0, 0, 0, .2); }

.site-nav a::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #5fc6f5;
	transform: scaleY(0);
	transition: transform .2s;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: #fff;
	background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .06));
}

.site-nav .current-menu-item > a::before,
.site-nav .current_page_item > a::before,
.site-nav a:hover::before { transform: scaleY(1); }

.site-nav .current-menu-ancestor > a,
.site-nav .current_page_ancestor > a { color: #fff; }

/* Sub-menus: collapsed unless they hold the current page or are opened. */
.site-nav .sub-menu,
.site-nav .children {
	display: none;
	background: rgba(0, 0, 0, .14);
}

.site-nav .is-open > .sub-menu,
.site-nav .is-open > .children,
.site-nav .current-menu-ancestor > .sub-menu,
.site-nav .current_page_ancestor > .children,
.site-nav .current-menu-item > .sub-menu,
.site-nav .current_page_item > .children { display: block; }

.site-nav .sub-menu a,
.site-nav .children a { padding-left: 34px; font-size: 14px; }
.site-nav .sub-menu .sub-menu a,
.site-nav .children .children a { padding-left: 46px; }

.site-nav .has-toggle > a { padding-right: 44px; }

.submenu-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 40px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--blue-soft);
	cursor: pointer;
}

.submenu-toggle::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 0 auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s;
}

.submenu-toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
.submenu-toggle:hover { color: #fff; }

.sidebar__art {
	flex: 0 0 auto;
	height: 520px;
	background: #fff url(assets/img/sidebar-engine.jpg) center top / var(--sidebar-w) auto no-repeat;
}

/* ---------- Main ---------- */
.main {
	min-width: 0;
	min-height: 680px;
	background: var(--paper);
}

/* Front-page hero */
.hero { position: relative; }

.hero__img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.hero--has-links::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 70px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 70' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C200 0 400 70 600 38 S1000 10 1200 42 V70 H0Z' fill='%23fff'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
	pointer-events: none;
}

/* Quick links (round icons) */
/* Same artwork and proportions as the original site: 219px ring, 116px icon. */
.quicklinks {
	--ring: 219px;
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-around;
	gap: 8px;
	margin: calc(var(--ring) * -.46) 16px 0;
	padding: 0;
	list-style: none;
}

.quicklinks__item { flex: 0 1 var(--ring); display: flex; justify-content: center; }

.quicklinks__link {
	display: block;
	border-radius: 50%;
	text-decoration: none;
}

.quicklinks__ring {
	display: grid;
	place-items: center;
	width: var(--ring);
	aspect-ratio: 219 / 218;
	background: url(assets/img/ql-ring.png) center / contain no-repeat;
}

/* Fills the ring's hole exactly (it sits 1.5px above centre) so the photo
   never shows through around the icon. */
.quicklinks__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 54.5%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: #fff;
	transform: translateY(-1.3%);
	transition: transform .25s;
}

.quicklinks__img {
	grid-area: 1 / 1;
	display: block;
	width: 100%;
	height: auto;
	transition: opacity .25s;
}

.quicklinks__img--blue { opacity: 0; }

.quicklinks__svg {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #7a7a7a;
	color: #fff;
	transition: background-color .25s;
}
.quicklinks__svg .icon { width: 48%; height: 48%; }

.quicklinks__link:hover .quicklinks__img--blue,
.quicklinks__link:focus-visible .quicklinks__img--blue { opacity: 1; }
.quicklinks__link:hover .quicklinks__svg,
.quicklinks__link:focus-visible .quicklinks__svg { background: #6476a1; }
.quicklinks__link:hover .quicklinks__icon { transform: translateY(-1.3%) scale(1.04); }

/* ---------- Entries ---------- */
.entry { padding: 30px var(--pad) 52px; }

.entry-title {
	margin: 0 0 22px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
	font-size: 26px;
	font-weight: 300;
	color: #666;
}

.entry-meta {
	margin: -12px 0 18px;
	font-size: 13px;
	color: var(--muted);
}

.entry-thumb { margin: 0 0 24px; }
.entry-thumb img { display: block; width: 100%; border-radius: var(--radius); }

.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content p { margin: 0 0 1.1em; }

.entry-content .alignfull {
	width: auto;
	max-width: none;
	margin-left: calc(-1 * var(--pad));
	margin-right: calc(-1 * var(--pad));
}

.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }

.wp-block-image img { border-radius: var(--radius); }
.wp-element-caption,
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }

.entry-content blockquote {
	margin: 1.5em 0;
	padding: .4em 0 .4em 1.2em;
	border-left: 3px solid var(--blue);
	color: var(--heading);
	font-style: italic;
}

.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th,
.entry-content td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: #f4f7f9; }

.entry-content iframe[src*="google.com/maps"] { width: 100%; border: 0; border-radius: var(--radius); }

.button,
.wp-block-button__link {
	display: inline-block;
	padding: 10px 22px;
	border-radius: var(--radius);
	background: var(--blue);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	transition: background-color .2s;
}
.button:hover,
.wp-block-button__link:hover { background: var(--blue-deep); color: #fff; }

/* Posts list */
.post-list { display: grid; gap: 28px; }

.post-card {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 22px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--line);
}
.post-card:not(:has(.post-card__thumb)) { grid-template-columns: 1fr; }
.post-card__thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.post-card__title { margin: 0 0 4px; font-size: 20px; }
.post-card__title a { color: var(--heading); text-decoration: none; }
.post-card__title a:hover { color: var(--blue); }
.post-card .entry-meta { margin: 0 0 8px; }

.pagination,
.post-navigation { margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.page-numbers {
	padding: 4px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
}
.page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.post-navigation { padding: 0 var(--pad) 40px; }

/* ---------- Contact form ---------- */
.contact-form {
	margin: 2em 0 0;
	padding: 26px 26px 10px;
	background: #f4f7f9;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	scroll-margin-top: 20px;
}

.contact-form form { margin: 0; }

.cf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}

.cf-field { margin: 0 0 16px; }

.cf-field label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: var(--heading);
}

.cf-req { color: #c0392b; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfd8de;
	border-radius: var(--radius);
	background: #fff;
	font: inherit;
	color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(28, 127, 176, .18);
}

.has-error input,
.has-error textarea { border-color: #c0392b; }

.cf-error {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #c0392b;
}

.cf-captcha {
	margin: 4px 0 16px;
	padding: 14px 16px 0;
	border: 1px dashed #cfd8de;
	border-radius: var(--radius);
	background: #fff;
}

.cf-captcha legend {
	padding: 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--muted);
}

.cf-help { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

.contact-form #cf-captcha { display: inline-block; width: 90px; }

.cf-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cf-submit { margin: 0 0 16px; }
.cf-submit .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }

.cf-notice {
	margin: 0 0 18px;
	padding: 12px 16px;
	border-radius: var(--radius);
	border-left: 4px solid;
}
.cf-notice--ok { background: #e8f6ee; border-color: #2e9d5b; color: #1e6b3d; }
.cf-notice--error { background: #fbeaea; border-color: #c0392b; color: #8e2a20; }

/* ---------- Footer ---------- */
.site-footer {
	max-width: 1040px;
	text-align: center;
	margin: 0 auto 44px;
	padding: 14px 18px;
	background: rgba(8, 40, 60, .72);
	border-radius: 0 0 var(--radius) var(--radius);
	color: rgba(255, 255, 255, .82);
	font-size: 13px;
}

.site-footer p { margin: 0; }

.site-footer a {
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}
.site-footer a:hover { color: var(--blue-soft); }
.site-footer img {
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-right: 5px;
	object-fit: contain;
	vertical-align: -5px;
}
.site-footer__sep { margin: 0 8px; opacity: .5; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
	:root { --pad: 18px; }

	body { background-attachment: scroll; }

	.site {
		display: block;
		margin: 0;
		border-radius: 0;
	}

	.sidebar { position: relative; z-index: 10; }

	.sidebar__brand {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 6px 8px 6px 12px;
	}

	.custom-logo { width: auto; height: 64px; }

	.nav-toggle {
		display: grid;
		place-items: center;
		width: 46px;
		height: 46px;
		padding: 0;
		border: 0;
		border-radius: var(--radius);
		background: rgba(0, 0, 0, .15);
		cursor: pointer;
	}

	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block;
		width: 24px;
		height: 2px;
		background: #fff;
		border-radius: 2px;
		transition: transform .25s, background-color .25s;
	}
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before,
	.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -7px; }
	.nav-toggle__bars::after { top: 7px; }

	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

	.site-nav { display: none; padding: 0; }
	.nav-open .site-nav { display: block; }
	.site-nav a { padding-top: 13px; padding-bottom: 13px; }
	.submenu-toggle { height: 50px; }

	.sidebar__art { display: none; }

	.main { min-height: 0; }

	.quicklinks { --ring: min(219px, 30vw); margin-left: 6px; margin-right: 6px; gap: 4px; }
	.hero--has-links::after { height: 40px; }

	.entry-title { font-size: 23px; }

	.post-card { grid-template-columns: 1fr; gap: 12px; }

	.contact-form { padding: 18px 16px 4px; }
	.cf-row { grid-template-columns: 1fr; }

	.site-footer {
		margin: 0;
		border-radius: 0;
		background: rgba(8, 40, 60, .9);
	}
	.site-footer__sep { display: none; }
	.site-footer a { display: block; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
