/**
 * Components (spec §5.2): header, main menu + dropdown, language switch, responsive menu, product
 * boxes, module titles, sidebar products menu, post-it news, content panel, ZOO-style cards, item
 * list, category grid, pagination, product, news, contact form, bottom block, map, footer, to-top.
 * Every value comes from the computed styles of the live site (design-tokens.json).
 */

/* =====================================================================================
   Header
   ===================================================================================== */
.header {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	height: var(--h-header);
	margin: 0 var(--sp-gutter);
}
.logo { display: block; flex: none; height: var(--h-header); padding-top: 5px; }
.logo img { display: block; max-width: none; }

.menubar { display: flex; align-items: flex-start; flex: none; }

/* ---- Main menu (dropdown) ---- */
.menu { display: flex; margin: 0; padding: 0; list-style: none; }
.menu__item { position: relative; }
.menu__link {
	display: block;
	color: var(--c-nav);
	font-family: var(--ff-heading);
	font-size: var(--fs-nav);
	line-height: var(--lh-body);
	text-transform: uppercase;
	text-shadow: var(--ts-nav);
	cursor: pointer;
}
.menu__link > span { display: block; height: var(--h-header); padding: 0 15px; line-height: var(--lh-nav); }
.menu__item.is-active > .menu__link { color: var(--c-nav-active); }
.menu__item:hover > .menu__link,
.menu__item:focus-within > .menu__link {
	background: var(--bg-nav-hover);
	box-shadow: var(--bs-nav-hover);
	color: var(--c-nav-active);
}
/* Pointer under an open parent item. */
.menu__item.has-children:hover > .menu__link > span,
.menu__item.has-children:focus-within > .menu__link > span { position: relative; }
.menu__item.has-children:hover > .menu__link > span::after,
.menu__item.has-children:focus-within > .menu__link > span::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	margin-left: -12px;
	border: 12px solid transparent;
	border-top: 0;
	border-bottom-color: var(--c-bg-dropdown);
}

.menu__dropdown {
	display: none;
	position: absolute;
	top: var(--h-header);
	left: 0;
	z-index: 110;
	width: var(--w-dropdown);
	padding: 20px 15px;
	background: var(--c-bg-dropdown);
}
.menu__item:hover > .menu__dropdown,
.menu__item:focus-within > .menu__dropdown { display: block; }

.menu__l2, .menu__l3 { margin: 0; padding: 0; list-style: none; }
.menu__l2-link {
	display: block;
	padding-left: 20px;
	color: var(--c-nav-l2);
	font-family: var(--ff-heading);
	font-size: var(--fs-drop-l2);
	line-height: var(--lh-body);
}
.menu__l2-link > span { display: block; padding: 7px 0; line-height: var(--lh-drop-l2); }
.menu__l2-link.is-current { color: #e4e4e4; }
/* After «is-current»: the item of the current page also turns blue under the pointer, as on live. */
.menu__l2-link:hover { color: var(--c-accent); }
.menu__l2-link:hover::before,
.menu__l3-link:hover::before { content: none; }
.menu__l2-link { position: relative; }
.menu__l2-link:hover::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 9px;
	width: 9px;
	height: 14px;
	background: var(--c-accent);
	-webkit-mask: url("../img/icons/chevron-right.svg") no-repeat 0 0 / contain;
	mask: url("../img/icons/chevron-right.svg") no-repeat 0 0 / contain;
}
.menu__l3 { padding-bottom: 10px; font-size: 11px; line-height: 17px; }
.menu__l3-link {
	display: block;
	margin-left: 20px;
	color: var(--c-nav-l3);
	font-family: var(--ff-heading);
	font-size: var(--fs-drop-l3);
	line-height: var(--lh-drop-l3);
}
.menu__l3-link.is-current { color: var(--c-bottom-title); }
.menu__l3-link:hover { color: var(--c-accent); }

/* Desktop devices: menu animations and the blur of the other items while hovering the bar. */
@media (min-device-width: 1025px) {
	.menu__item:hover > .menu__link { transition: var(--t-nav); }
	/* Only the menu items blur (the live flags stay sharp, Phase 3 finding). */
	.menubar .menu__item { position: relative; z-index: 120; transition: var(--t-nav-blur); }
	.menubar:hover .menu__item { filter: blur(var(--blur-nav)); }
	.menubar .menu__item:hover { filter: blur(0); }
}

/* ---- Language switch (flags) ---- */
.lang-switch { width: 49px; height: 50px; }
.lang-switch__list { display: flex; justify-content: flex-end; margin: 15px 0 10px 5px; padding: 7px 0 0; list-style: none; }
.lang-switch__list li { width: 22px; height: 15px; }
.lang-switch__list a { display: block; height: 15px; }
.lang-switch__list img { display: block; width: 18px; height: 12px; margin: -2px auto 0; }

/* ---- Responsive menu (<select>), phones only ---- */
.menu-responsive { display: none; }

@media (max-width: 767px) {
	.header { flex-direction: column; height: auto; }
	.logo { height: 94px; }
	.menubar { display: none; }
	/* Only what the live sets. Border, background, colour, corners and height stay with the browser, as on
	   live: written out, they were the look of a Chrome <select> also in Firefox and Safari (Phase 5). */
	.menu-responsive {
		display: block;
		box-sizing: border-box;
		width: 100%;
		margin: 0 0 5px;
		padding: 2px;
		font-family: var(--ff-select);
		font-size: 14px;
	}
}
/* Tablets and landscape phones: the live template hides the flags (#search) — bug-for-bug. */
@media (min-width: 480px) and (max-width: 959px) {
	.lang-switch { display: none; }
}

/* =====================================================================================
   Module titles (stripes + icon)
   ===================================================================================== */
.module-title {
	margin: 0 0 var(--sp-p);
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
}
.module-title--stripes,
.title--stripes {
	padding-bottom: var(--sp-stripes);
	background: var(--stripes) 0 100% repeat-x;
}
.module-title .icon {
	position: relative;
	top: -6px;
	float: left;
	width: 30px;
	height: 30px;
	margin-right: 5px;
}

/* =====================================================================================
   Boxes: dark / blue (product boxes in top-b, sidebar products)
   ===================================================================================== */
.box {
	position: relative;
	margin: var(--sp-gutter);
	padding: var(--sp-box);
	color: var(--c-white);
	text-shadow: var(--ts-box);
}
.box--dark { background: radial-gradient(ellipse at center, var(--c-box-dark-from) 0%, var(--c-box-dark-to) 90%); }
.box--color { background: radial-gradient(ellipse at center, var(--c-box-color-from) 0%, var(--c-box-color-to) 90%); }
.box .module-title { color: var(--c-white); }
.box--dark .module-title--stripes { background-image: var(--stripes-dark); }
.box--color a { color: var(--c-accent-pale); }
.box a:hover { color: var(--c-link-hover-box); text-shadow: var(--ts-box-link-hover); }
.box--color a:hover { color: var(--c-accent-deep); }

/* Product box (top-b): the picture is 20px wider than the text column, as on live. */
.product-box__media { margin: 0; }
.product-box__media img { max-width: none; width: 200px; height: 130px; margin: 0 -10px; }

@media (max-width: 959px) {
	.product-box__media img { width: auto; max-width: none; }
}

/* =====================================================================================
   Sidebar products menu (accordion look, always open on the active branch)
   ===================================================================================== */
.side-menu { margin: 0; padding: 0; list-style: none; font-family: var(--ff-heading); font-size: var(--fs-body); line-height: var(--lh-body); }
.side-menu__link {
	display: block;
	color: var(--c-white);
	font-size: var(--fs-side-l1);
	line-height: var(--lh-side-l1);
}
.side-menu__link > span { position: relative; display: block; margin-left: -20px; padding: 7px 0 7px 20px; }
.side-menu__item.is-active > .side-menu__link > span::before,
.side-menu__link:hover > span::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 9px;
	width: 9px;
	height: 14px;
	background: var(--c-white);
	-webkit-mask: url("../img/icons/chevron-right.svg") no-repeat 0 0 / contain;
	mask: url("../img/icons/chevron-right.svg") no-repeat 0 0 / contain;
}
/* «.side-menu …»: stronger than the general «.box a:hover», which gave these links the hover colour of the
   product boxes instead of the blue of the live. */
.side-menu .side-menu__link:hover { color: var(--c-accent); text-shadow: var(--ts-side-hover); }
.side-menu__link:hover > span::before { background: var(--c-accent); }

.side-menu__sub { margin: 0; padding: 8px 0; list-style: none; }
/* Live: the open sub-menu of the last group has no bottom padding (the box ends right under it). */
.side-menu__item:last-child > .side-menu__sub { padding-bottom: 0; }
.side-menu__sublink {
	position: relative;
	display: block;
	padding: 5px 0 5px 15px;
	color: var(--c-white);
	font-size: var(--fs-side-l1);
	line-height: var(--lh-side-l1);
}
.side-menu__sublink > span { display: block; font-size: var(--fs-side-l2); line-height: var(--lh-side-l2); }
.side-menu__sublink::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 10px;
	width: 8px;
	height: 8px;
	background: var(--c-white);
	-webkit-mask: url("../img/icons/ring.svg") no-repeat 0 0 / contain;
	mask: url("../img/icons/ring.svg") no-repeat 0 0 / contain;
}
.side-menu .side-menu__sublink:hover,
.side-menu .side-menu__sublink.is-current { color: var(--c-accent); text-shadow: var(--ts-side-hover); }
.side-menu__sublink:hover::before,
.side-menu__sublink.is-current::before { background: var(--c-accent); }

/* =====================================================================================
   Post-it module («Τελευταία νέα»)
   ===================================================================================== */
.postit {
	position: relative;
	margin: var(--sp-gutter);
	padding: var(--sp-postit);
	border: 1px solid var(--c-postit-border);
	background: var(--c-postit-bg);
	color: var(--c-postit-text);
}
.postit .module-title { color: var(--c-postit-text); }
/* Two sheets of paper under the note. */
.postit::before,
.postit::after {
	content: "";
	position: absolute;
	box-sizing: content-box; /* 1px sheet + 1px borders = 3px, as on the live */
	height: 1px;
	border: 1px solid var(--c-postit-border);
	background: var(--c-postit-sheet);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.postit::before { bottom: -3px; left: 0; right: 0; }
.postit::after { bottom: -5px; left: 1px; right: 1px; }
.postit a { color: var(--c-postit-link); }
.postit a:hover { color: var(--c-postit-link-hover); }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-list__meta { margin: 0; color: var(--c-meta); font-size: var(--fs-meta); line-height: var(--lh-meta); font-style: italic; }

/* =====================================================================================
   Content panel and article
   ===================================================================================== */
.panel {
	padding: var(--sp-box);
	background: var(--c-bg-content);
	box-shadow: var(--bs-article);
}
.article__title {
	margin-bottom: 10px;
	padding-bottom: var(--sp-stripes);
	background: var(--stripes) 0 100% repeat-x;
}
.article__header { margin-bottom: var(--sp-p); }

/* =====================================================================================
   Cards (rounded, light border — the ZOO product template look)
   ===================================================================================== */
.card {
	display: flow-root;
	overflow: hidden; /* as the live ZOO boxes; also keeps the text on the page layer when the share iframe loads */
	margin-bottom: 20px;
	padding: 13px 14px;
	border: 1px solid var(--c-border-card);
	border-radius: var(--radius-card);
	background: var(--c-bg-content);
}
.card--heading { padding: 9px 14px 13px; }
.card > .card__title { margin: 0 0 5px; color: #505050; font-size: var(--fs-h1); line-height: 50px; letter-spacing: -1px; }
.card__name { font-size: var(--fs-body); line-height: var(--lh-body); }

/* ---- Item list (category with products) ---- */
.items { margin-bottom: 0; padding: 9px 0; }
.items__row { padding: 15px 5px; border-top: 1px solid #e6e7e8; }
.items__row:first-child { padding-top: 5px; border-top: 0; }
.teaser { display: flow-root; padding: 0 10px; }
.teaser__media { float: left; margin-right: 15px; }
.teaser__media img { width: 150px; height: auto; }
.teaser__title { margin: 5px 0 0; color: var(--c-heading); font-size: 16px; line-height: 16px; font-weight: bold; }
.teaser__links { margin: 7px 0 0; }
.teaser__more::after { content: " \00bb"; font-size: 14px; }

/* ---- Category grid (parent category: sub-categories, two per row) ---- */
.categories { padding: 9px 0; }
.categories__row { display: flex; padding: 15px 5px; border-top: 1px solid #e6e7e8; }
.categories__row:first-child { padding-top: 5px; border-top: 0; }
.categories__cell { width: 50%; padding: 0 10px; }
.categories__title { margin: 0; color: var(--c-heading); font-size: 16px; line-height: 18px; font-weight: bold; }
.categories__count { color: #969696; font-size: 12px; font-weight: normal; }

/* ---- Pagination (ZOO) ---- */
.pagination { text-align: center; }

/* ---- Product ---- */
.product__media { float: right; width: 250px; margin-left: 15px; padding-bottom: 15px; }
.product__media img { width: 250px; height: auto; }
.product__description { margin-top: 20px; }
.product__description p { margin-bottom: 10px; }
.product__description p:last-child { margin-bottom: 0; }
.product__related { display: flow-root; margin-top: 40px; } /* own block context: keeps the 15px of the buttons, sits beside the picture */
.social-buttons { display: flow-root; margin-top: 15px; }
.social-buttons > div { float: left; margin-right: 10px; }

/* =====================================================================================
   Bottom block (contact details + map)
   ===================================================================================== */
.plain { margin: var(--sp-gutter); padding: var(--sp-plain-y) var(--sp-plain-x); }
.block-bottom .module-title { color: var(--c-bottom-title); }
.block-bottom a:hover { color: var(--c-bottom-title); text-shadow: var(--ts-bottom-link-hover); }
.map { position: relative; height: 220px; background: #e8eaed; }
.map iframe { display: block; width: 100%; height: 100%; }

/* =====================================================================================
   Footer bar + to-top
   ===================================================================================== */
.footer {
	position: relative;
	margin: 0 var(--sp-gutter);
	color: var(--c-text-muted);
	font-size: var(--fs-footer);
	line-height: var(--lh-footer);
	text-align: center;
}
.footer a:hover { color: var(--c-white); }
/* Credit table of module #112: same box as its inline styles (205×34, -8px, centred, 8pt white). */
.footer-credit { width: 205px; height: 34px; margin: -8px auto 0; }
.footer-credit td { padding: 1px; text-align: left; }
.footer-credit img { width: 41px; height: 16px; } /* width/height attributes of the module image */
.footer-credit__text,
.footer-credit__text a { color: var(--c-white); font-size: 8pt; }
/* The live #footer keeps the table's -8px margin inside its box (no margin collapsing). */
.footer { display: flow-root; }
.totop {
	position: absolute;
	right: 0;
	top: 25px;
	z-index: 1;
	width: 28px;
	height: 28px;
	color: #888888;
}
.totop .icon { display: block; width: 28px; height: 28px; }
/* «.footer …»: stronger than «.footer a:hover» (white), so that the arrow turns blue as on live. */
.footer .totop:hover { color: var(--c-accent); }

/* ---- News (list + single) ---- */
.teaser__date,
.teaser__text { margin-top: 7px; }
.news__date { font-size: var(--fs-body); line-height: var(--lh-body); }
.news__title { margin: 0; color: #505050; font-size: 21px; line-height: 32px; font-weight: bold; }
.news__bottom { display: flow-root; }
.news__bottom .social-buttons { margin-top: 20px; }

/* =====================================================================================
   Contact page (live: aiContactSafe). One centred column laid out as the component's table:
   the details and the form are two table rows. The block is as wide as its widest line (at most
   the panel) and never narrower than the 465px offices table: on phones it overflows to the
   right, as on the live.
   ===================================================================================== */
.contact { text-align: center; }
.contact__heading h1 { margin: 25px 0 15px; font-size: 35px; line-height: 35px; }
.contact__body { display: table; margin: 0 auto; } /* shrink-to-fit and centred, like the live table */
.contact__row { display: table-row; }
.contact__cell { display: table-cell; padding: 5px; vertical-align: top; }
.contact__info table { margin: 0 auto; }
.contact__info td { padding: 5px; vertical-align: top; }
.contact__info p,
.contact__info p:last-child { margin: 15px 0; }
.contact__form { padding-top: 25px; } /* 5px + the empty line above the live form */

/* Form (Contact Form 7 markup of the migrated form): label 40% right-aligned, field 60%. */
.aics__info { margin-bottom: 10px; }
.aics__info p,
.aics__info p:last-child { margin: 15px 0; }
.aics label { cursor: pointer; }
.aics__row { clear: both; padding: 2px 0; }
.aics__label { float: left; box-sizing: content-box; width: 40%; margin-left: -5px; padding-right: 5px; text-align: right; }
.aics__field { float: right; box-sizing: content-box; width: 60%; margin-right: -5px; padding-left: 5px; text-align: left; }
.aics__required { display: inline-block; margin-left: 5px; vertical-align: top; text-align: left; }
/* No border / background here: the fields keep the browser's native look, as on the live. No height either
   (fields, counter, button): each browser gives a one-line field its own height, as on the live; written
   out, the heights were those of Chrome and the form was 8px shorter than the live in Firefox (Phase 5). */
.aics__field input:not(.countdown_editbox) {
	box-sizing: content-box;
	width: 240px;
	margin: 0;
	padding: 2px;
	font: 12px Arial, sans-serif;
	vertical-align: middle;
}
.aics__field textarea {
	box-sizing: content-box;
	width: 240px;
	height: 80px;
	margin: 0;
	padding: 2px;
	font: 12px Arial, sans-serif;
	vertical-align: baseline;
}
.countdown_div { font-size: 9px; }
.countdown_editbox { /* width: from its size="3", as on the live */
	box-sizing: content-box;
	margin: 0;
	padding: 2px;
	border: 0;
	background: none;
	color: #000;
	font: 9px Arial, sans-serif;
	text-align: center;
	vertical-align: middle;
}
/* Send button: 20px below the fields, 20px above the end of the form (the two empty lines of the live). */
.aics__buttons { position: relative; clear: both; padding: 25px 0 25px 14px; } /* 14px: the empty «loading» cell left of the live button */
.aics__buttons input[type="submit"] { display: block; box-sizing: border-box; margin: 0 auto; padding: 5px; font: 12px Arial, sans-serif; }
.aics__buttons .wpcf7-spinner { position: absolute; top: 27px; left: 50%; margin: 0 0 0 48px; }
/* Messages of Contact Form 7 (shown after a submission only). */
.contact .wpcf7-not-valid-tip { color: #f00; font-size: 12px; }
.contact .wpcf7 form .wpcf7-response-output { margin: 0 0 20px; padding: 5px; }

/* =====================================================================================
   404 (live: the template's stand-alone error page, English only, no header/footer)
   ===================================================================================== */
body.error404-standalone {
	position: absolute;
	inset: 0;
	background: var(--c-white);
	color: var(--c-text);
	font: 13px/20px Arial, Helvetica, sans-serif;
}
.error-404 { position: absolute; top: 30%; left: 50%; width: 800px; margin-left: -400px; text-align: center; }
.error-404 a { color: #0000ee; }
.error-404__code {
	margin: 0;
	color: var(--c-heading);
	font: bold 200px/200px Arial, Helvetica, sans-serif;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.7);
}
.error-404__code > span { position: relative; display: inline-block; }
.error-404__code > span::before {
	content: "";
	position: absolute;
	top: 70%;
	left: -30px;
	right: -30px;
	height: 80px;
	/* The soft shadow under the digits, over their lower part as on the live. Our own drawing (a blurred
	   ellipse, fitted to the shadow of the live within 2 of 255 levels), stretched to the box. */
	background: url("../img/error-shadow.svg") no-repeat;
	background-size: 100% 100%;
}
.error-404__title { margin: 20px 0 0; color: var(--c-heading); font: 24px/24px Arial, Helvetica, sans-serif; }
.error-404__message { width: 400px; margin: 20px auto 0; }
.error-404__message p { margin: 0; } /* the text is a WYSIWYG field: its paragraph */

/* ---- Phones portrait: media above the text, one sub-category per row (live ZOO responsive rules) ---- */
@media (max-width: 479px) {
	.product__media { float: none; width: auto; margin-left: 0; padding-bottom: 0; } /* unfloated: its 15px collapse into the 20px above the text, as on the live */
	.product__media img { width: auto; }
	.teaser__media { float: none; margin-right: 0; text-align: center; }
	.categories__row { flex-direction: column; }
	.categories__cell { width: 100%; }
}

/* Module icons: grey on dark boxes, translucent black on the post-it (live sprite colours). */
.box .module-title .icon,
.postit .module-title .icon { background-color: var(--c-icon); }

/* Admin-only notice of the fallback templates (§7.2). */
.template-missing { padding: 20px; border: 2px dashed #c00; color: #c00; }

/* ---- News page: text, optional picture / gallery (live ZOO item template: 20px above each element) ---- */
.news__text { margin-top: 20px; }
.news__text > * { margin: 0 0 10px; }
.news__text > :last-child { margin-bottom: 0; }
.news__media { margin-top: 20px; }
.news__gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
