/* ==========================================================================
   AP Transportas: front page sections
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: min(100svh, 860px);
	padding-top: var(--header-h);
	color: var(--white);
	background: var(--navy-900);
	isolation: isolate;
}
.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}
.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 50%;
	filter: brightness(1.12) saturate(1.05);
}
/* Only the text side is shaded, so the photo itself stays bright. */
.hero__media::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgb(6 20 30 / 58%) 0%, rgb(6 20 30 / 26%) 40%, rgb(6 20 30 / 0%) 65%),
		linear-gradient(180deg, rgb(6 20 30 / 40%) 0%, rgb(6 20 30 / 0%) 20%);
}

.hero__inner { padding-block: clamp(48px, 8vw, 96px); }
.hero__title {
	max-width: 17ch;
	margin-bottom: 22px;
	font-size: clamp(2.1rem, 1.3rem + 3vw, 3.7rem);
	line-height: 1.08;
	letter-spacing: -.03em;
	text-shadow: 0 2px 24px rgb(6 20 30 / 30%);
}
.hero__text {
	max-width: 520px;
	margin-bottom: 34px;
	font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
	color: rgb(255 255 255 / 92%);
	text-shadow: 0 1px 12px rgb(6 20 30 / 45%);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .eyebrow { text-shadow: 0 1px 10px rgb(6 20 30 / 60%); }

@media (max-width: 700px) {
	.hero__media img { object-position: 68% 50%; }
	.hero__media::after {
		background: linear-gradient(180deg, rgb(6 20 30 / 40%) 0%, rgb(6 20 30 / 58%) 35%, rgb(6 20 30 / 62%) 100%);
	}
}

/* About ------------------------------------------------------------------- */
.about__grid {
	display: grid;
	grid-template-columns: 1.3fr .7fr;
	gap: clamp(40px, 7vw, 104px);
	align-items: center;
}
.about__content .lead { margin-bottom: 18px; }
.about__note {
	margin: 0;
	padding-left: 18px;
	border-left: 3px solid var(--blue);
	color: var(--muted);
}

.facts { display: grid; gap: 14px; }
.facts__item {
	display: grid;
	gap: 4px;
	padding: 22px 26px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: var(--shadow-sm);
}
.facts__item:first-child { background: var(--navy-900); border-color: var(--navy-900); }
.facts__value {
	font-family: var(--font-head);
	font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem);
	font-weight: 600;
	line-height: 1;
	color: var(--blue-600);
	font-variant-numeric: tabular-nums;
}
.facts__item:first-child .facts__value { color: #6cc8f2; }
.facts__label { font-size: .95rem; color: var(--muted); }
.facts__item:first-child .facts__label { color: rgb(255 255 255 / 78%); }

/* Licences and certificates: a quiet strip under the about text. */
.certs {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(20px, 4vw, 56px);
	align-items: center;
	margin-top: clamp(48px, 6vw, 80px);
	padding-top: clamp(28px, 3vw, 40px);
	border-top: 1px solid var(--line);
}
.certs__label {
	margin: 0;
	max-width: 15ch;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .12em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--blue-700);
}
.certs__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.4vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.certs__item { display: flex; gap: 16px; align-items: center; }
.certs__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--blue-100);
	color: var(--blue-700);
	font-family: var(--font-head);
	font-size: .95rem;
	font-weight: 800;
	letter-spacing: .02em;
}
.certs__icon--cmr { background: #fdecea; color: #c8372d; }
.certs__icon--eu { background: #003399; color: #ffcc00; }
.certs__icon--eu .icon { width: 38px; height: 38px; }
.certs__body { display: grid; gap: 2px; }
.certs__title { font-family: var(--font-head); font-size: 1.02rem; font-weight: 600; color: var(--navy-900); }
.certs__text { font-size: .88rem; line-height: 1.45; color: var(--muted); }

@media (max-width: 900px) {
	.about__grid { grid-template-columns: 1fr; }
	.certs { grid-template-columns: 1fr; }
	.certs__label { max-width: none; }
	.facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.facts__item { padding: 18px; }
}
@media (max-width: 520px) {
	.facts { gap: 8px; }
	.facts__item { padding: 14px 12px; }
	.facts__value { font-size: 1.55rem; }
	.facts__label { font-size: .8rem; line-height: 1.3; }
}

/* Fleet ------------------------------------------------------------------- */
.fleet__head {
	display: grid;
	grid-template-columns: .8fr 1.2fr;
	gap: clamp(24px, 6vw, 80px);
	align-items: start;
	margin-bottom: clamp(32px, 5vw, 56px);
}
.fleet__head .section-title { margin-bottom: 0; }
.fleet__text p { color: var(--muted); }
.fleet__text p:last-child { margin-bottom: 0; }

.fleet__photos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 24px);
}
.fleet__photo .photo { aspect-ratio: 3 / 2; }

@media (max-width: 860px) {
	.fleet__head { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.fleet__photos { grid-template-columns: 1fr; }
}

/* Clickable photo (fleet + gallery) ---------------------------------------- */
.photo {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--line);
	box-shadow: var(--shadow-sm);
	cursor: zoom-in;
}
.photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s var(--ease);
}
.photo::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgb(6 20 30 / 35%), transparent 45%);
	opacity: 0;
	transition: opacity .3s;
}
.photo__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgb(255 255 255 / 92%);
	color: var(--navy-900);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .3s, transform .3s var(--ease);
}
.photo:hover img,
.photo:focus-visible img { transform: scale(1.04); }
.photo:hover::after,
.photo:focus-visible::after,
.photo:hover .photo__zoom,
.photo:focus-visible .photo__zoom { opacity: 1; transform: none; }
@media (hover: none) {
	.photo__zoom { opacity: 1; transform: none; width: 38px; height: 38px; }
}

/* Why us ------------------------------------------------------------------ */
.why__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 24px);
}
.why__card {
	position: relative;
	padding: clamp(28px, 3vw, 40px);
	transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.why__card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	border-color: transparent;
}
.why__num {
	position: absolute;
	top: clamp(24px, 3vw, 34px);
	right: clamp(24px, 3vw, 36px);
	font-family: var(--font-head);
	font-size: 1.1rem;
	font-weight: 500;
	letter-spacing: .08em;
	color: var(--line);
}
.why__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: 24px;
	border-radius: 16px;
	background: var(--blue-100);
	color: var(--blue-700);
	transition: background-color .3s, color .3s;
}
.why__icon .icon { width: 30px; height: 30px; }
.why__card:hover .why__icon { background: var(--blue-600); color: var(--white); }
.why__title { margin-bottom: 14px; font-size: 1.3rem; color: var(--navy-900); }
.why__text p { margin: 0 0 12px; color: var(--muted); }
.why__text p:last-child { margin-bottom: 0; }

@media (max-width: 700px) { .certs__list { grid-template-columns: 1fr; } }

@media (max-width: 1000px) { .why__grid { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; } }

/* Gallery ----------------------------------------------------------------- */
/* Justified rows: each photo keeps its own shape (--ar = width / height), nothing is cropped. */
.gallery__grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.gallery__row {
	display: flex;
	gap: clamp(12px, 1.6vw, 20px);
	margin: 0;
	padding: 0;
	list-style: none;
}
/* Growing by the aspect ratio gives every photo in a row the same height. */
.gallery__item { flex: var(--ar) 1 0; min-width: 0; aspect-ratio: var(--ar); }
@media (max-width: 600px) {
	.gallery__row { flex-direction: column; }
	.gallery__item { flex: none; }
}

/* Coverage ---------------------------------------------------------------- */
.coverage { overflow: hidden; isolation: isolate; }
.coverage::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(60% 80% at 80% 40%, rgb(0 148 222 / 22%) 0%, transparent 70%);
}
.coverage__grid {
	display: grid;
	grid-template-columns: .9fr 1.1fr;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
}

.regions { display: grid; gap: 14px; margin-top: 32px; }
.regions__item {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 18px 22px;
	border: 1px solid rgb(255 255 255 / 12%);
	border-radius: var(--radius);
	background: rgb(255 255 255 / 4%);
}
.regions__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 50%;
	background: var(--blue-600);
	color: var(--white);
}
.regions__title { display: block; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; color: var(--white); }
.regions__text { font-size: .95rem; }

.euromap { position: relative; margin: 0; }
.euromap__svg {
	display: block;
	width: 100%;
	height: auto;
	/* Fade the map edges into the section background. */
	-webkit-mask-image: radial-gradient(75% 70% at 55% 50%, #000 62%, transparent 100%);
	mask-image: radial-gradient(75% 70% at 55% 50%, #000 62%, transparent 100%);
}
.euromap__routes path {
	fill: none;
	stroke: #6cc8f2;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	opacity: .85;
}
.euromap__dots circle { fill: var(--white); stroke: #0b1d2a; stroke-width: 2; }
.euromap__home circle { fill: #6cc8f2; stroke: var(--white); stroke-width: 3; }
.euromap__home .euromap__pulse { fill: rgb(108 200 242 / 45%); stroke: none; transform-origin: 786.2px 472.9px; }
.euromap__home text {
	font-family: var(--font-head);
	font-size: 26px;
	font-weight: 500;
	letter-spacing: .02em;
	fill: var(--white);
	paint-order: stroke;
	stroke: #0b1d2a;
	stroke-width: 5px;
}

/* Routes draw in when the map scrolls into view (JS adds .is-visible via data-reveal). */
@media (prefers-reduced-motion: no-preference) {
	.js .euromap__routes path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
	.js .euromap__routes path:nth-child(odd) { transition-delay: .25s; }
	.js .euromap.is-visible .euromap__routes path { stroke-dashoffset: 0; }
	.euromap__pulse { animation: ap-pulse 2.4s ease-out infinite; }
}
@keyframes ap-pulse {
	from { transform: scale(1); opacity: 1; }
	to { transform: scale(3.2); opacity: 0; }
}

@media (max-width: 900px) { .coverage__grid { grid-template-columns: 1fr; } }

/* Contact ----------------------------------------------------------------- */
.contact__grid {
	display: grid;
	grid-template-columns: .95fr 1.05fr;
	gap: clamp(40px, 6vw, 80px);
	align-items: start;
}

.contact-list { display: grid; gap: 18px; margin: 32px 0 40px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.contact-list small { display: block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-weight: 500; color: var(--navy-900); transition: color .2s; }
.contact-list a:hover { color: var(--blue-700); }
.contact-list__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 12px;
	background: var(--blue-100);
	color: var(--blue-700);
}

.team__title { margin-bottom: 16px; font-size: 1.3rem; color: var(--navy-900); }
.team { display: grid; gap: 12px; }
.team__card {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: 'role phone' 'name phone';
	align-items: center;
	gap: 2px 16px;
	padding: 16px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.team__role { grid-area: role; font-size: .85rem; color: var(--muted); }
.team__name { grid-area: name; font-family: var(--font-head); font-size: 1.08rem; font-weight: 600; color: var(--navy-900); }
.team__phone {
	grid-area: phone;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--tint);
	font-weight: 600;
	color: var(--blue-700);
	white-space: nowrap;
	transition: background-color .2s, color .2s;
}
.team__phone:hover { background: var(--blue-600); color: var(--white); }
.team__phone .icon { width: 1.05em; height: 1.05em; }

@media (max-width: 960px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
	.team__card { grid-template-columns: 1fr; grid-template-areas: 'role' 'name' 'phone'; }
	.team__phone { justify-self: start; margin-top: 10px; }
}

/* Form -------------------------------------------------------------------- */
.form { padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form__title {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 26px;
	font-size: clamp(1.5rem, 1.25rem + .8vw, 1.85rem);
	color: var(--navy-900);
}
.form__title-mark {
	width: 26px;
	height: 26px;
	flex: none;
	background: repeating-linear-gradient(110deg, var(--blue) 0 3px, transparent 3px 7px);
}
.form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 22px;
}
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__input {
	width: 100%;
	min-height: 56px;
	padding: 14px 18px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--white);
	transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #7b8a96; opacity: 1; }
textarea.field__input { min-height: 180px; resize: vertical; }
.field__input:hover { border-color: #b9c9d5; }
.field__input:focus {
	outline: none;
	border-color: var(--blue-600);
	box-shadow: 0 0 0 4px rgb(0 148 222 / 15%);
}
.was-validated .field__input:invalid { border-color: #c62828; }

.form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
}
.form__privacy { flex: 1 1 240px; margin: 0; font-size: .85rem; color: var(--muted); }
.form__privacy a { color: var(--blue-700); text-decoration: underline; }

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

.form__notice {
	margin-bottom: 22px;
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	font-weight: 500;
}
.form__notice:focus { outline: none; }
.form__notice--ok { background: #e6f6ec; color: #17622f; }
.form__notice--invalid,
.form__notice--error,
.form__notice--limit { background: #fdecec; color: #9b1c1c; }

@media (max-width: 560px) {
	.form__grid { grid-template-columns: 1fr; }
	.form__footer .btn { width: 100%; justify-content: center; }
}

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(4 12 18 / 97%);
	color: var(--white);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage {
	display: grid;
	place-items: center;
	min-height: 0;
	padding: 64px clamp(12px, 7vw, 96px) 8px;
}
.lightbox__img {
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	max-height: calc(100dvh - 150px);
	object-fit: contain;
	border-radius: var(--radius-sm);
	box-shadow: 0 30px 80px rgb(0 0 0 / 50%);
	user-select: none;
}
.lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 14px 16px 22px;
	font-size: .95rem;
	color: rgb(255 255 255 / 80%);
	text-align: center;
}
.lightbox__count { font-variant-numeric: tabular-nums; color: rgb(255 255 255 / 55%); }
.lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 50%;
	background: rgb(255 255 255 / 8%);
	color: var(--white);
	cursor: pointer;
	transition: background-color .2s;
}
.lightbox__btn:hover { background: rgb(255 255 255 / 20%); }
.lightbox__btn .icon { width: 24px; height: 24px; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev,
.lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: clamp(8px, 2vw, 24px); }
.lightbox__next { right: clamp(8px, 2vw, 24px); }
.lightbox[data-single] .lightbox__prev,
.lightbox[data-single] .lightbox__next { display: none; }
@media (max-width: 640px) {
	.lightbox__prev,
	.lightbox__next { top: auto; bottom: 12px; transform: none; width: 46px; height: 46px; }
	.lightbox__bar { padding-inline: 70px; }
}
body.lightbox-open { overflow: hidden; }

/* Map --------------------------------------------------------------------- */
.contact { padding-bottom: clamp(56px, 7vw, 88px); }

.map {
	position: relative;
	margin-top: clamp(48px, 6vw, 72px);
	height: clamp(300px, 38vw, 420px);
	overflow: hidden;
	border-radius: var(--radius-lg);
	background:
		radial-gradient(circle at 50% 45%, rgb(0 148 222 / 18%) 0, transparent 55%),
		repeating-linear-gradient(0deg, transparent 0 39px, rgb(11 29 42 / 6%) 39px 40px),
		repeating-linear-gradient(90deg, transparent 0 39px, rgb(11 29 42 / 6%) 39px 40px),
		var(--tint);
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map__placeholder {
	display: grid;
	place-content: center;
	justify-items: center;
	height: 100%;
	padding: 24px;
	text-align: center;
}
.map__pin { width: 48px; height: 48px; margin-bottom: 8px; color: var(--blue-600); }
.map__address { margin-bottom: 18px; font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--navy-900); }
.map__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.map__note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.map.is-loaded .map__placeholder { display: none; }
