/**
 * Village page "Το χωριό μας" – Hero, cards row, content area, loading skeleton
 * BEM: vp-* (vp-hero, vp-cards, vp-card, vp-content-area, vp-content, vp-skeleton)
 */

/* ---------- Page wrapper ---------- */
.vp-page {
	--vp-content-bg: #fafafa;
	--vp-text-color: #333;
	--vp-cards-radius: 0px;
	--vp-cards-height: 120px;
	padding-bottom: 3rem;
}

.vp-page--container-normal .vp-content-area__inner,
.vp-page--container-normal .vp-content-area__skeleton {
	max-width: 1200px;
}

/* ---------- Section 1: Hero ---------- */
.vp-hero {
	position: relative;
	width: 100%;
	min-height: var(--vp-hero-h-m, 220px);
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
}

@media (min-width: 768px) {
	.vp-hero {
		min-height: var(--vp-hero-h-d, 320px);
	}
}

.vp-hero--align-center {
	justify-content: center;
	text-align: center;
}

.vp-hero--align-left .vp-hero__content {
	text-align: left;
}

.vp-hero--align-center .vp-hero__content {
	text-align: center;
}

.vp-hero__bg {
	position: absolute;
	inset: 0;
	background: #1a1a1a;
}

.vp-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.vp-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--vp-hero-overlay, 0.35));
	pointer-events: none;
}

.vp-hero__content {
	position: relative;
	z-index: 1;
	padding: 1.25rem 1.5rem 1.5rem;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	.vp-hero__content {
		padding: 2rem 2.5rem 2.5rem;
	}
}

.vp-hero__title {
	margin: 0;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.vp-hero__subtitle {
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.92);
}

/* ---------- Section 2: Cards (full-bleed, single row, SimpleBar horizontal scroll) ---------- */
.vp-cards {
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	box-sizing: border-box;
	background: #fff;
}

/* Container: no max-width, full width of section */
.vp-cards__container {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.vp-cards__title {
	margin: 0 0 1.5rem;
	padding: 0 1.5rem;
	font-size: clamp(1.25rem, 3vw, 1.5rem);
	font-weight: 600;
	color: #111;
	text-align: center;
}

/* SimpleBar host: horizontal scroll only, fixed height so no vertical scrollbar */
.vp-cards__scroll {
	min-height: 0;
}

.vp-cards__scroll .simplebar-content-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

.vp-cards__scroll .simplebar-content {
	padding: 0.25rem 1.5rem;
	min-height: 0;
	box-sizing: border-box;
}

/* Hide vertical SimpleBar scrollbar (horizontal only) */
.vp-cards__scroll .simplebar-track.simplebar-vertical {
	display: none;
}

/* Horizontal scroll: single row, never wrap. Premium thin scrollbar when needed. */
.vp-cards__scroll .simplebar-track.simplebar-horizontal {
	height: 0;
	margin: 0 1.5rem;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.06);
}

.vp-cards__scroll .simplebar-scrollbar.simplebar-horizontal {
	height: 0;
	border-radius: 3px;
}

.vp-cards__scroll .simplebar-scrollbar.simplebar-horizontal::before {
	background: rgba(0, 0, 0, 0.25);
	border-radius: 3px;
	opacity: 1;
}

/* Single horizontal row: flex nowrap, overflow scroll via SimpleBar parent */
.vp-cards__row {
	padding: 4rem 0 0 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	align-items: stretch;
	width: max-content;
	min-width: 100%;
	box-sizing: border-box;
}

/* Card inside row: stable tile width, no wrap, equal height */
.vp-cards__row > .vp-card {
	flex: 0 0 auto;
	width: clamp(160px, 22vw, 260px);
	min-width: 0;
	box-sizing: border-box;
}

@media (min-width: 600px) {
	.vp-cards__row > .vp-card {
		width: clamp(180px, 20vw, 260px);
	}
}

@media (min-width: 900px) {
	.vp-cards__row > .vp-card {
		width: clamp(200px, 18vw, 260px);
	}
}

.vp-cards__row > .vp-card.vp-card--active {
	transform: translateY(-30px);
}

/* Other .vp-card usages (outside row) unchanged */
.vp-card {
	min-width: 0;
}

.vp-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	border-bottom: 3px solid transparent;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.vp-card__link:hover {
	opacity: 0.9;
	text-decoration: none;
}

.vp-card__link:focus {
	outline: none;
}

.vp-card__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.vp-page--active-fill .vp-card--active .vp-card__link {
	border-bottom-color: transparent;
	background-color: rgba(31, 95, 23, 0.08);
}

.vp-card__media {
	position: relative;
	display: block;
	min-height: var(--vp-cards-height, 120px);
	aspect-ratio: 1;
	background: #e8e8e8;
	border-radius: var(--vp-cards-radius, 0);
}

.vp-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	vertical-align: middle;
}

.vp-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%);
}

.vp-card__label {
	display: block;
	margin-top: 0.5rem;
	font-size: 16px;
	color: #111;
	line-height: 1.3;
	text-align: center;
}

.vp-card__excerpt {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: #666;
	line-height: 1.35;
}

/* ---------- Section 3: Content area ---------- */
.vp-content-area {
	padding: 2rem 0 3rem;
	background: #fff;
}

.vp-content-area__inner {
	position: relative;
	margin: 0 auto;
	padding: 0 1.5rem;
	max-width: 840px;
	transition: opacity 0.25s ease;
}

.vp-content-area__inner--out {
	opacity: 0;
}

.vp-content-area__inner--in {
	opacity: 1;
}

.vp-content-area__empty,
.vp-content-area__error {
	margin: 0;
	color: #666;
	font-size: 1rem;
}

.vp-content-area__error {
	color: #b00;
}

/* Content block (from section-content.php) */
.vp-content {
	padding: 0;
}

.vp-content__kicker {
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #888;
	margin: 0 0 0.5rem;
}

.vp-content__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: #111;
	margin: 0 0 1rem;
	line-height: 1.25;
}

.vp-content__intro {
	font-size: 1rem;
	color: #444;
	line-height: 1.6;
	margin-bottom: 1.25rem;
}

.vp-content__intro p {
	margin: 0 0 0.5rem;
}

.vp-content__body {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--vp-text-color, #333);
}

.vp-content__body p {
	margin: 0 0 1rem;
}

.vp-content__body img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.vp-content__quote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid #1f5f17;
	background: #f0f0f0;
	font-style: italic;
	color: #333;
}

.vp-content__quote p {
	margin: 0 0 0.5rem;
}

.vp-content__quote p:last-child {
	margin-bottom: 0;
}

.vp-content__cta {
	margin: 1.25rem 0 0;
}

.vp-content__cta-link {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #fff;
	background: #1f5f17;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.vp-content__cta-link:hover {
	color: #fff;
	opacity: 0.95;
	background: #164712;
}

.vp-content__cta-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Gallery */
.vp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.vp-gallery__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

/* ---------- Loading skeleton ---------- */
.vp-content-area__skeleton {
	padding: 0 1.5rem;
	max-width: 840px;
	margin: 0 auto;
}

.vp-skeleton__line {
	height: 1em;
	background: linear-gradient(90deg, #e0e0e0 25%, #eee 50%, #e0e0e0 75%);
	background-size: 200% 100%;
	animation: vp-skeleton-shine 1.2s ease-in-out infinite;
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

.vp-skeleton__line--title {
	height: 1.5em;
	width: 70%;
	margin-bottom: 1rem;
}

.vp-skeleton__line--short {
	width: 60%;
}

@keyframes vp-skeleton-shine {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ---------- Single village_section (shareable/SEO) ---------- */
.vp-single {
	padding: 2rem 0 3rem;
	background: #fafafa;
}

.vp-single__back {
	max-width: 840px;
	margin: 0 auto;
	padding: 0 1.5rem 1rem;
	box-sizing: border-box;
}

.vp-single__back-link {
	font-size: 0.9rem;
	color: #1f5f17;
	text-decoration: none;
}

.vp-single__back-link:hover {
	text-decoration: underline;
}

.vp-single__back-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.vp-single__article {
	max-width: 840px;
	margin: 0 auto;
	padding: 0 1.5rem;
	box-sizing: border-box;
}

/* ---------- Archive: post list & pagination (category archive) ---------- */
.vp-archive-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 1rem;
}

.vp-archive-card {
	margin: 0;
	padding: 0;
	border: none;
	border-top: 1px solid #eee;
}

.vp-archive-card:first-child {
	border-top: none;
}

.vp-archive-card:last-child a {
	border-bottom: none;
}

.vp-archive-card__link {
	display: block;
    color: inherit;
    padding-bottom: 20px;
    transition: opacity 0.2s ease;
    margin-bottom: 20px;
    border-bottom: 1px solid #b5b5b5;
	border-top-left-radius: 20px;
}

.vp-archive-card__link * {
	border-radius: inherit;
}

.vp-archive-card__link:hover {
	opacity: 0.9;
}

.vp-archive-card__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.vp-archive-card__media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #e8e8e8;
	margin-bottom: 0.75rem;
}

.vp-archive-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	vertical-align: middle;
}

.vp-archive-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%);
}

.vp-archive-card__title {
	font-size: 25px;
    color: #111;
    line-height: 1.3;
	margin-bottom: 24px;
    margin-top: 0;
}

.vp-archive-card__meta {
	font-size: 11px;
    letter-spacing: 1px;
    color: #666;
	margin-bottom: 4px;
    margin-top: 24px;
}

.vp-archive-card__excerpt {
	margin: 0;
	font-size: 0.95rem;
	color: #444;
	line-height: 1.5;
}

.vp-pagination {
	margin-top: 2rem;
	text-align: center;
}

.vp-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.35rem;
}

.vp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #333;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.vp-pagination .page-numbers:hover {
	background: #f0f0f0;
	border-color: #ccc;
}

.vp-pagination .page-numbers.current {
	background: #1f5f17;
	color: #fff;
	border-color: #1f5f17;
}

.vp-pagination .page-numbers.current:hover {
	background: #164712;
	color: #fff;
}

.vp-pagination .page-numbers:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Archive AJAX: loading state */
.archive-posts-container.is-loading {
	position: relative;
	min-height: 120px;
}

.archive-posts-container.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.7);
	pointer-events: none;
	border-radius: 4px;
}

.archive-posts-container.is-loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 3px solid #e0e0e0;
	border-top-color: #1f5f17;
	border-radius: 50%;
	animation: archive-ajax-spin 0.7s linear infinite;
	z-index: 1;
	pointer-events: none;
}

@keyframes archive-ajax-spin {
	to { transform: rotate(360deg); }
}
