/*
 * Home page styles — vanilla replacement for the SP Page Builder sections
 * previously used on the Αρχική (Home) page. Loaded via a <link> tag in the
 * home-1 module content (see home-sections/01-hero.html) rather than from
 * the template's index.php, so a Helix Ultimate update can't silently drop
 * it and the setup stays portable to any template. Organized in the same
 * 6-section order as home-sections/.
 *
 * Brand colors reused from custom.css: #006ca2 (blue), #ed1e24 (red),
 * #445c78 (dark blue-gray text).
 */

/* Jura is already loaded site-wide (with greek/greek-ext subsets) by the
   Helix Ultimate template's font settings — reuse it, don't re-import it. */
:root {
	--home-blue: #006ca2;
	--home-light-blue: #5faada;
	--home-red: #ed1e24;
	--home-dark: #445c78;
	--home-gray: #ebebeb;
	--home-font-heading: 'Jura', sans-serif;
}

/* Eliminate default padding and margin */
#sp-main-body {
	padding: 0;
	margin: 0;
}

.home-section {
	position: relative;
	overflow: hidden;
	font-family: var(--home-font-heading);
	/*
	 * Full-bleed breakout: escapes whatever container the article/template
	 * wraps this module content in (Bootstrap .container, article max-width,
	 * a sidebar layout, etc.) so each section always spans the full viewport
	 * width regardless of the surrounding page structure — needed now that
	 * these sections live inside a normal Article body via {loadposition}
	 * rather than a template-specific full-width layout row.
	 */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.home-section__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 15px;
}

.home-section__title {
	font-weight: 700;
	color: var(--home-dark);
	text-align: center;
}

/* Diagonal shape dividers, replicating the sppb-shape-container cut between sections */
.home-shape-divider {
	position: absolute;
	left: 0;
	width: 100%;
	height: 90px;
	line-height: 0;
	pointer-events: none;
	z-index: 2;
}

.home-shape-divider--top {
	top: -1px;
}

.home-shape-divider--bottom {
	bottom: -1px;
	transform: scaleY(-1);
}

.home-shape-divider svg {
	position: absolute;
	width: 100%;
	height: 100%;
}

/* ---------------------------------------------------------------------
 * Reveal-on-scroll (shared)
 * ------------------------------------------------------------------- */
[data-reveal] {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .8s ease, transform .8s ease;
}

[data-reveal].is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ---------------------------------------------------------------------
 * Fade slider (shared by Hero + Congress)
 * ------------------------------------------------------------------- */
.home-slider {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

/*
 * Only the active slide stays in normal flow, so it alone determines the
 * slider's height — the box hugs whichever slide is currently showing
 * instead of stretching every slide to match the tallest one (which left
 * dead space around shorter slides/slides with shorter images). Inactive
 * slides are pulled out of flow so they never affect sizing, but the
 * container can't collapse to zero (the earlier mobile bug) because
 * exactly one slide is always in flow. .home-hero/.home-congress stretch
 * this element to their own min-height floor via display:flex, and
 * align-items:center here centers the in-flow slide within that floor
 * when its own content is shorter.
 */
.home-slide {
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease;
	z-index: 1;
}

.home-slide:not(.is-active) {
	position: absolute;
	inset: 0;
}

.home-slide.is-active {
	position: relative;
	/* Fills at least the slider's full (flex-stretched) height so its
	   background-image covers the whole banner, not just its own text —
	   but can still grow taller than that floor if its content ever needs
	   more room, so nothing gets clipped either. */
	min-height: 100%;
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.home-slider-dots {
	position: absolute;
	z-index: 5;
	display: flex;
	gap: 8px;
}

.home-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .8);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background-color .3s ease;
}

.home-slider-dot.is-active {
	background-color: #fff;
}

.home-slider-prev,
.home-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, .85);
	color: var(--home-dark);
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color .3s ease;
}

.home-slider-prev:hover,
.home-slider-next:hover {
	background: #fff;
	color: var(--home-red);
}

.home-slider-prev { left: 20px; }
.home-slider-next { right: 20px; }

/*
 * Entrance animation for slide content (titles, poster image). Replayed
 * by Home.fadeSlider (home.js) every time a slide becomes active, via the
 * .is-animating class — see playEntranceAnim(). Stagger timing between
 * elements is set per-element with an inline animation-delay in the HTML.
 */
.home-anim {
	opacity: 0;
}

.home-anim--up {
	transform: translateY(28px);
}

.home-anim--left {
	transform: translateX(-40px);
}

.home-anim.is-animating {
	animation-duration: .7s;
	animation-timing-function: ease;
	animation-fill-mode: forwards;
}

.home-anim--up.is-animating { animation-name: home-fade-slide-up; }
.home-anim--left.is-animating { animation-name: home-fade-slide-left; }

@keyframes home-fade-slide-up {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes home-fade-slide-left {
	from { opacity: 0; transform: translateX(-40px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* ---------------------------------------------------------------------
 * 1. Hero
 * ------------------------------------------------------------------- */
.home-hero {
	display: flex;
	min-height: 800px;
}

.home-hero .home-slide {
	background-size: cover;
	background-position: 50% 50%;
	display: flex;
	align-items: center;
}

.home-hero .home-slide--1 { background-image: url(../../../images/home-bg-1.jpg); }
.home-hero .home-slide--2 { background-image: url(../../../images/home-bg-2.jpg); }

.home-hero__content {
	max-width: 640px;
	padding: 0 60px;
	color: var(--home-dark);
}

.home-hero__title {
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 20px;
}

.home-hero__text {
	font-size: 1.05rem;
	line-height: 1.6;
	margin-bottom: 28px;
}

.home-hero__list {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.5;
}

.home-hero__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 26px;
	background: var(--home-blue);
	color: #fff;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color .3s ease;
}

.home-hero__button:hover {
	background: var(--home-red);
	color: #fff;
}

.home-hero .home-slider-dots {
	left: 60px;
	bottom: 40px;
	flex-direction: column;
}

@media (max-width: 767.98px) {
	.home-hero { min-height: 420px; }
	.home-hero__content { padding: 0 30px; }
	.home-hero__title { font-size: 1.6rem; }
	.home-hero__list { font-size: 1.2rem; }
}

/* ---------------------------------------------------------------------
 * 2. Congress slideshow (static, hand-updated each year)
 * ------------------------------------------------------------------- */
.home-congress {
	display: flex;
	min-height: 750px;
	background: var(--home-gray);
}

.home-congress .home-slide {
	background-size: cover;
	background-position: 50% 50%;
	display: flex;
	align-items: center;
}

.home-congress__row {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 15px;
	gap: 40px;
}

.home-congress__image {
	flex: 0 0 58%;
}

.home-congress__image img {
	max-width: 100%;
	display: block;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.home-congress__info {
	flex: 1 1 auto;
	color: var(--home-dark);
}

.home-congress__date {
	color: var(--home-red);
	font-weight: 600;
	letter-spacing: .05em;
	margin-bottom: 10px;
}

.home-congress__title {
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 12px;
}

.home-congress__venue {
	margin-bottom: 22px;
}

.home-congress__link {
	display: inline-block;
	padding: 10px 24px;
	background: var(--home-light-blue);
	border: 2px solid var(--home-light-blue);
	color: #fff;
	text-decoration: none;
	border-radius: 2px;
	transition: all .3s ease;
}

.home-congress__link:hover {
	background: var(--home-blue);
	color: #fff;
}

.home-congress .home-slider-dots {
	left: 20px;
	bottom: 20px;
}

.home-congress .home-slider-prev,
.home-congress .home-slider-next {
	bottom: 20px;
	top: auto;
	transform: none;
}

.home-congress .home-slider-prev { left: auto; right: 80px; }
.home-congress .home-slider-next { right: 20px; }

@media (max-width: 767.98px) {
	.home-congress { min-height: 530px; padding: 60px 0; }
	.home-congress__row { flex-direction: column; text-align: center; }
	.home-congress__image { flex-basis: auto; }
}

/* ---------------------------------------------------------------------
 * 3. ΧΟΠΑ (FAST) awareness banner
 * ------------------------------------------------------------------- */
.home-xopa {
	padding: 100px 0 190px;
	background-image: url(../../../images/hopa.jpg);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: 50% 50%;
	color: #fff;
	text-align: center;
}

.home-xopa__title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 10px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.home-xopa__subtitle {
	font-size: clamp(1.2rem, 2vw, 2rem);
	margin-bottom: 30px;
	text-align: center;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.home-rotator {
	position: relative;
	display: block;
	font-size: clamp(2rem, 4vw, 4rem);
	font-weight: 700;
	min-height: 1.3em;
	margin-bottom: 30px;
}

.home-rotator-word {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	white-space: nowrap;
}

.home-rotator-word.is-visible {
	opacity: 1;
}

.home-rotator-word i {
	display: inline-block;
	font-style: normal;
	opacity: 0;
	transform: scale(0);
}

.home-rotator-word i.in { animation: home-scale-up .6s forwards; }
.home-rotator-word i.out { animation: home-scale-down .6s forwards; }

@keyframes home-scale-up {
	0%   { transform: scale(0); opacity: 0; }
	60%  { transform: scale(1.2); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

@keyframes home-scale-down {
	0%   { transform: scale(1); opacity: 1; }
	60%  { transform: scale(0); opacity: 0; }
	100% { transform: scale(0); opacity: 0; }
}

.home-play-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: var(--home-red);
	color: #fff;
	font-size: 22px;
	border: none;
	cursor: pointer;
	position: relative;
}

.home-play-btn::after {
	content: '';
	position: absolute;
	inset: -6px;
	border: 2px solid rgba(255, 255, 255, .6);
	border-radius: 50%;
	animation: home-ripple 1.8s ease-out infinite;
}

@keyframes home-ripple {
	0%   { transform: scale(.9); opacity: 1; }
	100% { transform: scale(1.4); opacity: 0; }
}

@media (max-width: 767.98px) {
	.home-xopa { padding: 60px 0 90px; }
	.home-xopa__title { font-size: 1.8rem; }
	.home-rotator { font-size: 1.8rem; }
}

/* ---------------------------------------------------------------------
 * 4. Guide (Οδηγός για τα ΑΕΕ)
 * ------------------------------------------------------------------- */
.home-guide {
	background-image: url(../../../images/aee.jpg);
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
	background-position: 0 0;
	color: #fff;
	padding: 90px 0;
}

.home-guide__row {
	display: flex;
}

.home-guide__spacer {
	flex: 0 0 50%;
}

.home-guide__content {
	flex: 1 1 50%;
	padding-left: 40px;
}

.home-guide__title {
	font-size: 2.4rem;
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 20px;
	text-align: left;
}

.home-guide__text {
	line-height: 1.6;
	margin-bottom: 26px;
	max-width: 480px;
}

.home-guide__button {
	display: inline-block;
	padding: 10px 26px;
	border: 2px solid #fff;
	border-radius: 30px;
	color: #fff;
	text-decoration: none;
	transition: all .3s ease;
}

.home-guide__button:hover {
	background: #fff;
	color: var(--home-dark);
}

.home-guide__features {
	display: flex;
	gap: 40px;
	margin-top: 50px;
	max-width: 560px;
}

.home-guide__feature {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.home-guide__feature-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.home-guide__feature-title {
	font-weight: 600;
	margin-bottom: 4px;
}

.home-guide__feature-text {
	font-size: .92rem;
	opacity: .9;
}

@media (max-width: 767.98px) {
	.home-guide { background-attachment: scroll; padding: 60px 0; }
	.home-guide__row { flex-direction: column; }
	.home-guide__spacer { display: none; }
	.home-guide__content { padding-left: 0; }
	.home-guide__features { flex-direction: column; gap: 24px; }
}

/* ---------------------------------------------------------------------
 * 5. Photo grid (hover reveal + lightbox)
 * ------------------------------------------------------------------- */
.home-image-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-bottom:60px;
}

.home-image-grid__item {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	cursor: zoom-in;
}

.home-image-grid__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: 50% 50%;
	transition: transform .6s ease;
}

.home-image-grid__item:hover .home-image-grid__bg {
	transform: scale(1.08);
}

.home-image-grid__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
	color: #fff;
	transform: translateX(-100%);
	transition: transform .4s ease;
}

.home-image-grid__item:hover .home-image-grid__caption {
	transform: translateX(0);
}

.home-image-grid__caption h5 {
	margin: 0;
	font-size: .95rem;
	font-weight: 700;
}

.home-image-grid__caption span {
	font-size: .8rem;
	opacity: .9;
}

.home-image-grid__zoom {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--home-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

@media (max-width: 767.98px) {
	.home-image-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------------
 * 6. CTA "Ο Σωτήρης"
 * ------------------------------------------------------------------- */
.home-cta {
	background-image: url(../../../images/sotiris.jpg);
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
	background-position: 50% 50%;
	color: #fff;
	text-align: center;
	padding: 120px 20px;
}

.home-cta__overlay {
	background: rgba(0, 0, 0, .35);
	padding: 60px 20px;
	border-radius: 4px;
}

.home-cta .home-play-btn {
	margin-bottom: 40px;
}

.home-cta__headline {
	font-size: 2.6rem;
	font-weight: 600;
	line-height: 1.5;
	max-width: 900px;
	margin: 0 auto;
}

.home-cta__highlight {
	position: relative;
	display: inline-block;
	white-space: nowrap;
}

.home-underline {
	position: absolute;
	left: 0;
	top: 100%;
	width: 100%;
	height: 0.5em;
	pointer-events: none;
	overflow: visible;
}

.home-underline path {
	fill: none;
	stroke: var(--home-red);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 1s ease;
}

@media (max-width: 767.98px) {
	.home-cta { padding: 70px 20px; }
	.home-cta__headline { font-size: 1.6rem; }
}

/* ---------------------------------------------------------------------
 * Shared lightbox overlay (images + YouTube video)
 * ------------------------------------------------------------------- */
body.home-lightbox-active {
	overflow: hidden;
}

.home-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, .9);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease;
	padding: 30px;
}

.home-lightbox-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.home-lightbox-inner {
	max-width: 1100px;
	width: 100%;
}

.home-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 85vh;
	margin: 0 auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.home-lightbox-video {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
}

.home-lightbox-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.home-lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.4rem;
	line-height: 1;
	cursor: pointer;
}
