/*
Theme Name: Things To Do in Tirana
Template: twentytwentyfive
Description: Custom city-guide theme for thingstodointirana.com.
Version: 1.0.1
Requires at least: 6.6
Text Domain: tdit
License: GNU General Public License v2 or later
*/

/* Header: sticky, with the painted-facade stripe */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--base);
}
body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
}
.wp-site-blocks > header.wp-block-template-part::after {
	content: "";
	display: block;
	height: 5px;
	background: linear-gradient(90deg,
		var(--wp--preset--color--accent-1) 0 34%,
		var(--wp--preset--color--accent-2) 34% 52%,
		var(--wp--preset--color--accent-3) 52% 81%,
		var(--wp--preset--color--accent-4) 81% 100%);
}
.tdit-header { padding-block: 14px; }
.tdit-header .wp-block-site-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.tdit-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.tdit-header .wp-block-navigation { font-weight: 600; font-size: 1rem; }
.tdit-header .wp-block-navigation a:hover,
.tdit-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent-1); }

/* Front page rhythm */
main.tdit-front { margin-top: 0; }
main.tdit-front > .tdit-section { margin-block: clamp(56px, 8vw, 104px) 0; }
main.tdit-front > .tdit-hero { margin-top: 0; }
main.tdit-front > .tdit-section:last-child { margin-bottom: clamp(56px, 8vw, 104px); }

/* Hero */
.tdit-hero .wp-block-cover { min-height: min(78vh, 640px); padding-inline: 20px; }
.tdit-hero-title {
	color: #fff;
	font-size: clamp(2.6rem, 6.4vw, 5rem);
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.025em;
	max-width: 14ch;
	margin-inline: auto;
}
.tdit-hero-lede { color: rgba(255,255,255,.92); font-size: 1.2rem; max-width: 46ch; margin-inline: auto; }
.tdit-hero-search { max-width: 760px; margin: 28px auto 22px; }
.tdit-hero-search .wp-block-search__inside-wrapper {
	background: #fff;
	border: 0;
	border-radius: 999px;
	padding: 6px;
	box-shadow: 0 10px 30px rgba(10, 16, 34, .25);
}
.tdit-hero-search .wp-block-search__input {
	border: 0;
	background: transparent;
	padding: 12px 22px;
	font-size: 1.1rem;
	color: var(--wp--preset--color--contrast);
}
.tdit-hero-search .wp-block-search__input:focus { outline: none; }
.tdit-hero-search .wp-block-search__inside-wrapper:focus-within { box-shadow: 0 0 0 3px var(--wp--preset--color--accent-2), 0 10px 30px rgba(10,16,34,.25); }
.tdit-hero-search .wp-block-search__button {
	margin: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	padding: 12px 30px;
	font-weight: 700;
	border: 0;
}
.tdit-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: #fff;
	border: 2px solid #fff;
	background: transparent;
	border-radius: 10px;
	padding: 12px 26px;
}
.tdit-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--contrast); }

/* Section titles with short rule */
.tdit-section-title { text-align: center; margin-bottom: 36px; }
.tdit-section-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 16px auto 0;
	background: var(--wp--preset--color--accent-1);
}
.tdit-section-intro { text-align: center; color: var(--wp--preset--color--accent-6); max-width: 56ch; margin: -18px auto 36px; }

/* Article cards: photo + navy caption bar */
.tdit-card {
	background: var(--wp--preset--color--contrast);
	border-radius: 10px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.tdit-card > * { margin-block: 0 !important; }
.tdit-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; display: block; }
.tdit-card__bar { padding: 18px 20px 20px; flex: 1; }
.tdit-card__bar > * { margin-block: 0 !important; }
.tdit-card__bar > * + * { margin-top: 8px !important; }
.tdit-card .wp-block-post-title { font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.tdit-card .wp-block-post-title a { color: #fff; text-decoration: none; }
.tdit-card .wp-block-post-title a:hover,
.tdit-card .wp-block-post-title a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.tdit-card .wp-block-post-terms { font-size: .9rem; }
.tdit-card .wp-block-post-terms a { color: var(--wp--preset--color--accent-2); text-decoration: none; font-weight: 600; }

/* Photo tiles (whole tile is a link) */
.wp-block-cover.tdit-tile { border-radius: 10px; overflow: hidden; isolation: isolate; padding: 22px; }
.wp-block-cover.tdit-tile .wp-block-cover__image-background { z-index: -2 !important; transition: transform .5s ease; }
.wp-block-cover.tdit-tile .wp-block-cover__background { z-index: -1 !important; }
.wp-block-cover.tdit-tile .wp-block-cover__inner-container { position: static !important; }
.wp-block-cover.tdit-tile h3 { color: #fff; font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.1; font-weight: 800; margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.wp-block-cover.tdit-tile p { color: rgba(255,255,255,.9); margin: 6px 0 0; font-size: 1rem; }
.wp-block-cover.tdit-tile a { color: inherit; text-decoration: none; }
.wp-block-cover.tdit-tile a::after { content: ""; position: absolute; inset: 0; }
.wp-block-cover.tdit-tile a:focus-visible { outline: none; }
.wp-block-cover.tdit-tile a:focus-visible::after { outline: 3px solid #fff; outline-offset: -8px; border-radius: 6px; }
.wp-block-cover.tdit-tile:hover .wp-block-cover__image-background { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
	.wp-block-cover.tdit-tile .wp-block-cover__image-background { transition: none; }
	.wp-block-cover.tdit-tile:hover .wp-block-cover__image-background { transform: none; }
}

/* Day-trip banner */
.tdit-banner .wp-block-cover { min-height: 440px; padding: clamp(32px, 6vw, 80px); }
.tdit-banner__text { max-width: 520px; }
.tdit-banner h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.tdit-banner p { color: #fff; font-size: 1.15rem; }
.tdit-banner .wp-block-button__link { background: #fff; color: var(--wp--preset--color--contrast); border-radius: 10px; padding: 12px 26px; font-weight: 700; }
.tdit-banner .wp-block-button__link:hover { background: var(--wp--preset--color--accent-2); }

/* Food & drink list */
.tdit-list .wp-block-post-template { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.tdit-list-item { gap: 20px; align-items: flex-start; }
.tdit-list-item .wp-block-post-featured-image { flex: 0 0 150px; margin: 0; }
.tdit-list-item .wp-block-post-featured-image img { width: 150px; height: 112px; object-fit: cover; border-radius: 8px; }
.tdit-list-item .wp-block-post-title { font-size: 1.2rem; line-height: 1.25; margin: 0; }
.tdit-list-item .wp-block-post-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.tdit-list-item .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-1); }
.tdit-list-item .wp-block-post-excerpt { margin-top: 6px; color: var(--wp--preset--color--accent-6); font-size: 1rem; }
.tdit-list-item .wp-block-post-excerpt__excerpt { margin: 0; }
@media (max-width: 781px) { .tdit-list .wp-block-post-template { grid-template-columns: 1fr; } }

/* Tip strip */
.tdit-tip { background: var(--wp--preset--color--accent-5); border-radius: 10px; padding: clamp(28px, 5vw, 48px); text-align: center; }
.tdit-tip h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.tdit-tip p { max-width: 54ch; margin: 10px auto 22px; }
.tdit-tip .wp-block-button__link { background: var(--wp--preset--color--accent-1); color: #fff; border-radius: 10px; padding: 12px 26px; font-weight: 700; }

/* Empty states inside queries */
.tdit-empty { text-align: center; color: var(--wp--preset--color--accent-6); padding: 28px; border: 2px dashed #d5dae1; border-radius: 10px; }

/* Footer */
.tdit-footer { background: var(--wp--preset--color--contrast); color: rgba(255,255,255,.86); padding-block: clamp(48px, 6vw, 72px) 28px; }
.tdit-footer h2, .tdit-footer .wp-block-site-title { color: #fff; }
.tdit-footer h2 { font-size: 1.15rem; margin-bottom: 14px; }
.tdit-footer .wp-block-site-title { font-size: 1.4rem; font-weight: 800; }
.tdit-footer a { color: #fff; text-decoration: none; }
.tdit-footer a:hover { color: var(--wp--preset--color--accent-2); }
.tdit-footer ul { list-style: none; padding: 0; margin: 0; }
.tdit-footer li { margin: 0 0 8px; }
.tdit-footer .tdit-footer__legal { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; margin-top: 40px; font-size: .9rem; color: rgba(255,255,255,.6); }
.wp-site-blocks > footer.wp-block-template-part { margin-top: 0; }

/* Single posts */
.tdit-single-meta { color: var(--wp--preset--color--accent-6); font-size: .95rem; gap: 14px; }
.tdit-single-meta a { color: var(--wp--preset--color--accent-1); font-weight: 600; text-decoration: none; }
.tdit-single .wp-block-post-featured-image img { border-radius: 10px; }

/* Grid of cards on archives: keep equal heights */
.tdit-grid .wp-block-post-template > li { display: flex; }
.tdit-grid .wp-block-post-template > li > .tdit-card { width: 100%; }

/* Phones: neighborhood tiles two-across, shorter */
@media (max-width: 781px) {
	.tdit-section .wp-block-columns:has(.tdit-tile) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
	.tdit-section .wp-block-columns:has(.tdit-tile) > .wp-block-column { margin: 0; }
	.tdit-section .wp-block-columns:has(.tdit-tile) .wp-block-cover.tdit-tile { min-height: 190px !important; padding: 16px; }
	.tdit-section .wp-block-columns:has(.tdit-tile) .tdit-tile h3 { font-size: 1.25rem; }
	.tdit-section .wp-block-columns:has(.tdit-tile) .tdit-tile p { display: none; }
	.tdit-hero-search .wp-block-search__input { padding: 12px 14px; font-size: 1rem; }
	.tdit-hero-search .wp-block-search__button { padding: 12px 20px; }
}

/* Hide footer columns whose list is still empty (e.g. no posts yet) */
.tdit-footer .wp-block-column:has(> .wp-block-heading:last-child) { display: none; }
