/* ==========================================================================
   Pharmabelle – theme styles (header, menu, footer, base)
   ========================================================================== */

:root {
	--pb-green: #77bd43;
	--pb-text: #666;
	--pb-dark: #0f151a;
	--pb-border: #eee;
	--pb-bg: #efefef;
	--pb-header-h: 87px;
	--pb-font: Lato, sans-serif;
	--pb-font-alt: "Noto Sans", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--pb-bg);
	color: var(--pb-text);
	font-family: var(--pb-font);
	font-weight: 300;
	font-size: 14px;
	line-height: 20px;
	text-rendering: optimizeLegibility; /* same rendering as the live site (no antialiased smoothing) */

	/* Footer πάντα στο κάτω μέρος της οθόνης */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.pb-main { flex: 1 0 auto; width: 100%; overflow-x: clip; } /* full-width blocks without horizontal scroll */
.pb-header, .pb-header-spacer, .pb-footer { flex-shrink: 0; }

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

a { color: var(--pb-green); text-decoration: none; transition: color .18s ease-in; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.pb-skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 10px; left: 10px; z-index: 100002;
	padding: 10px 15px; background: #fff; color: #000;
}

.pb-container {
	width: 100%;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.pb-section { padding-top: 60px; padding-bottom: 60px; }

/* ==========================================================================
   Header
   ========================================================================== */

.pb-header {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	z-index: 9999;
	background: #fff;
	border-bottom: 1px solid var(--pb-border);
}
.admin-bar .pb-header { top: 32px; }

.pb-header__inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.pb-logo { margin: 5px 0; line-height: 0; flex: 0 0 auto; }
.pb-logo__link { display: inline-block; }
.pb-logo__img { width: 125px; height: auto; display: block; }
.pb-logo__text {
	display: inline-block;
	font-family: var(--pb-font-alt);
	font-weight: 700;
	font-size: 22px;
	line-height: 76px;
	color: var(--pb-green);
}

.pb-header-spacer { height: var(--pb-header-h); }

/* --- Desktop menu --- */

.pb-nav { margin-top: 12px; }

.pb-menu {
	list-style: none;
	margin: 0;
	padding: 6px 8px 0 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	position: relative; /* dropdowns align to the right edge of the menu */
}

.pb-menu > li { line-height: 50px; }

.pb-menu > li > a {
	display: inline-block;
	margin: 0;
	padding: 0;
	font-family: var(--pb-font-alt);
	font-weight: 400;
	font-size: 14px;
	line-height: 14.4px;
	color: var(--pb-text);
	text-align: center;
}

/* Διαχωριστικό "/" ανάμεσα στα στοιχεία */
.pb-menu > li + li::before {
	content: "/";
	display: inline-block;
	margin: 0 17px 0 13px;
	font-family: var(--pb-font);
	font-weight: 300;
	font-size: 13px;
	line-height: 16px;
	color: #999;
}
/* Μεγαλύτερο κενό μετά τις γλώσσες (Gr / En /   About us) */
.pb-menu > li.pb-lang + li:not(.pb-lang)::before { margin-right: 41px; }

.pb-menu > li.menu-item-has-children > a,
.pb-menu > li.pb-lang > a { color: #000; }
.pb-menu > li.pb-lang > a { font-family: var(--pb-font); }

.pb-menu > li > a:hover,
.pb-menu > li > a:focus-visible,
.pb-menu > li.current-menu-item > a,
.pb-menu > li.current-menu-ancestor > a,
.pb-menu > li.current-menu-parent > a,
.pb-menu > li.pb-lang.is-active > a { color: var(--pb-green); }

/* --- Dropdown (grid, 10 rows per column, like the current site) --- */

.pb-menu .sub-menu {
	--pb-rows: 10;
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 2001;
	display: grid;
	grid-template-rows: repeat(var(--pb-rows), auto);
	grid-auto-flow: column;
	grid-auto-columns: 190px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--pb-border);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .3s, visibility .3s;
	line-height: normal;
}

.pb-menu > li:hover > .sub-menu,
.pb-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.pb-menu .sub-menu li { display: flex; }

.pb-menu .sub-menu a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px;
	text-align: center;
	font-family: var(--pb-font-alt);
	font-weight: 400;
	font-size: 14px;
	line-height: 14.4px;
	color: #000;
	border-bottom: 1px solid var(--pb-border);
	border-right: 1px solid var(--pb-border);
	transition: background-color .18s ease-in, color .18s ease-in;
}
.pb-menu .sub-menu a:hover,
.pb-menu .sub-menu a:focus-visible { background: #f5f6f8; }
.pb-menu .sub-menu .current-menu-item > a { color: var(--pb-green); }

/* Mobile-only controls hidden on desktop */
.pb-menu-toggle,
.pb-sub-toggle,
.pb-nav-overlay { display: none; }

/* ==========================================================================
   Mobile / tablet (≤ 979px, same breakpoint as the current site)
   ========================================================================== */

@media (max-width: 979px) {
	.pb-container { width: 90%; padding: 0; }

	/* z-index: auto – the body is a flex column, so a z-index here would trap the
	   menu panel under the dark overlay (nothing could be tapped). */
	.pb-header { position: static; z-index: auto; }
	.pb-header-spacer { display: none; }

	.pb-menu-toggle {
		display: block;
		position: fixed;
		top: 12px;
		right: 25px;
		z-index: 100001;
		width: 50px;
		height: 50px;
		padding: 0;
		background: transparent;
		border: 0;
		color: var(--pb-green);
		cursor: pointer;
	}
	.admin-bar .pb-menu-toggle { top: 58px; }
	.pb-menu-toggle svg { width: 30px; height: 30px; fill: currentColor; display: block; margin: 0 auto; }
	.pb-menu-toggle__close { display: none; }
	.pb-nav-open .pb-menu-toggle__open { display: none; }
	.pb-nav-open .pb-menu-toggle__close { display: block; }

	.pb-nav {
		position: fixed;
		top: 0; left: 0;
		z-index: 100000;
		width: 300px;
		max-width: 85vw;
		height: 100%;
		margin: 0;
		padding: 0 0 30px;
		overflow-y: auto;
		background: #fff;
		transform: translateX(-100%);
		transition: transform .3s ease, visibility 0s linear .3s;
		visibility: hidden;
	}
	.admin-bar .pb-nav { top: 46px; height: calc(100% - 46px); }
	.pb-nav-open .pb-nav { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }

	.pb-nav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: rgba(0, 0, 0, .35);
		opacity: 0;
		pointer-events: none;
		transition: opacity .3s;
	}
	.pb-nav-open .pb-nav-overlay { opacity: 1; pointer-events: auto; }
	body.pb-nav-open { overflow: hidden; }

	.pb-menu {
		flex-direction: column;
		flex-wrap: nowrap;
		padding: 15px 0;
	}
	.pb-menu > li { position: relative; line-height: normal; }
	.pb-menu > li.pb-lang { order: 99; } /* languages go to the bottom on mobile */

	.pb-menu > li > a {
		display: block;
		margin: 0;
		padding: 14px 55px 14px 20px;
		text-align: left;
		font-size: 15px;
		line-height: 20px;
	}
	.pb-menu > li + li::before { display: none; }

	.pb-sub-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 0; right: 0;
		width: 50px;
		height: 48px;
		padding: 0;
		background: none;
		border: 0;
		color: #000;
		cursor: pointer;
	}
	.pb-sub-toggle svg { width: 18px; height: 18px; transition: transform .25s; }
	.pb-menu li.is-open > .pb-sub-toggle svg { transform: rotate(180deg); }

	.pb-menu .sub-menu {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		border: 0;
		background: #fafafa;
		transition: none;
	}
	.pb-menu li.is-open > .sub-menu { display: block; }

	.pb-menu .sub-menu a {
		display: block;
		padding: 10px 20px 10px 32px;
		text-align: left;
		color: var(--pb-text);
		border: 0;
		border-bottom: 1px solid var(--pb-border);
	}
}

@media (max-width: 782px) {
	.admin-bar .pb-header { top: 0; }
}

@media (max-width: 767px) {
	.pb-container { width: 100%; padding: 0 15px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.pb-footer {
	position: relative;
	padding: 100px 0;
	background: var(--pb-dark);
	color: #9fa4af;
	font-size: 13px;
	line-height: 30px;
	text-align: center;
}

.pb-backtotop {
	position: absolute;
	top: 50px;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 26px;
	color: #fff;
	z-index: 1;
}
.pb-backtotop svg { display: block; width: 26px; height: 26px; }
.pb-backtotop:hover,
.pb-backtotop:focus-visible { color: var(--pb-green); }

/* Γραμμή κάτω από το βελάκι + logo */
.pb-footer__top {
	width: 470px;
	max-width: 100%;
	margin: 0 auto;
	padding: 10px 0;
	border-top: 1px solid #555;
}
.pb-footer__logo { line-height: 0; }
.pb-footer__logo img { width: 122px; height: auto; display: inline-block; }

.pb-footer a { color: #828282; }
.pb-footer a:hover,
.pb-footer a:focus-visible { color: #b2b2b2; }
.pb-footer .pb-backtotop { color: #fff; }
.pb-footer .pb-backtotop:hover,
.pb-footer .pb-backtotop:focus-visible { color: var(--pb-green); }

.pb-footer__copy {
	margin-top: 30px;
	font-size: 12px;
	line-height: 14px;
	color: #bababa;
}
.pb-footer__credit-img {
	width: 25px;
	height: 25px;
	object-fit: contain;
	vertical-align: middle;
	margin-left: 2px;
}

/* ==========================================================================
   Typography (ίδια με το live site)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	margin: 10px 0;
	font-family: var(--pb-font);
	font-weight: 400;
	color: #222;
}
h1 { font-size: 40px; line-height: 46px; }
h2 { font-size: 38px; line-height: 46px; }
h3 { font-size: 30px; line-height: 36px; }
h4 { font-size: 28px; line-height: 39px; }
h5 { font-size: 22px; line-height: 30px; }
h6 { font-size: 15px; line-height: 22px; }
p { margin: 0 0 24px; }
strong, b { font-weight: 700; }

/* ==========================================================================
   Basic content
   ========================================================================== */

.pb-page-title { margin: 0 0 25px; }

.pb-entry__thumb { margin-bottom: 25px; }

.pb-full-width > *:first-child { margin-top: 0; }

/* Default page template:
   Pharmabelle blocks control their own width/spacing (sliders stick to header/footer).
   Any other block (paragraph, heading, image…) is kept in the 1140px content width. */
.pb-page > .pb-content > :not([class*="wp-block-pharmabelle-"]):not(.alignfull) {
	width: calc(100% - 30px);
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
}
.pb-page > .pb-content > :not([class*="wp-block-pharmabelle-"]):first-child { margin-top: 60px; }
.pb-page > .pb-content > :not([class*="wp-block-pharmabelle-"]):last-child { margin-bottom: 60px; }
@media (max-width: 979px) {
	.pb-page > .pb-content > :not([class*="wp-block-pharmabelle-"]):not(.alignfull) { width: 90%; }
}
@media (max-width: 767px) {
	.pb-page > .pb-content > :not([class*="wp-block-pharmabelle-"]):not(.alignfull) { width: calc(100% - 30px); }
}

/* ==========================================================================
   Single post (like pharma-belle.com/en/articles/…)
   ========================================================================== */
.pb-single-wrap { padding: 70px 0; }
.pb-single-container {
	width: calc(100% - 30px);
	max-width: 1140px;
	margin: 0 auto;
}
.pb-single {
	display: grid;
	grid-template-columns: 458fr 652fr;
	gap: 30px;
	align-items: start;
}
.pb-single--no-image { grid-template-columns: 1fr; }

.pb-single__media { line-height: 0; }
.pb-single__media img { display: block; width: 100%; height: auto; }

.pb-single__body { position: relative; padding-bottom: 10px; }
.pb-single__badge {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 28px;
	border-radius: 2px;
	background: var(--pb-green);
	color: #fff;
}
.pb-single__badge svg { width: 16px; height: 14px; }

.pb-single__title {
	display: inline-block;
	margin: 0 0 10px;
	padding-left: 50px;
	font-family: var(--pb-font);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.1;
	color: #222;
}
.pb-single__date {
	display: block;
	margin: 5px 0;
	font-size: 13px;
	line-height: 22px;
	color: #848994;
}
.pb-single__content { padding-top: 10px; }
.pb-single__content p { margin: 0 0 10px; }
.pb-single__content ul,
.pb-single__content ol { margin: 0 0 40px; padding-left: 40px; }
.pb-single__content figure { margin: 0 0 10px; }
.pb-single__content img { max-width: 100%; height: auto; }
.pb-single__content a { color: var(--pb-green); }
.pb-single__content strong, .pb-single__content b { font-weight: 700; }

@media (max-width: 979px) {
	.pb-single-container { width: 90%; }
}
@media (max-width: 767px) {
	.pb-single-wrap { padding: 40px 0; }
	.pb-single-container { width: calc(100% - 30px); }
	.pb-single { grid-template-columns: 1fr; gap: 20px; }
}

/* Archive header (categories / search) */
.pb-archive-header { margin-bottom: 40px; }
.pb-archive { padding-top: 70px; padding-bottom: 70px; }
@media (max-width: 767px) { .pb-archive { padding-top: 40px; padding-bottom: 40px; } }
