/* =========================================================================
   Single Location Page — komponenty (light/dark).
   Tokeny --greco-* w assets/css/theme-tokens.css.
   Hero i lightbox pozostają ciemne w obu trybach (świadomy wybór).
   ========================================================================= */

/* Reset paddingu body — hero nakłada się na header */
html.single-lokalizacje,
body.single-lokalizacje {
	overflow-x: hidden;
}

body.single-lokalizacje {
	padding-top: 0 !important;
	background: var(--greco-bg-gradient);
	transition: background-color 0.3s ease, color 0.3s ease;
}

body.single-lokalizacje .wp-site-blocks > * {
	margin-block-start: 0 !important;
}

body.single-lokalizacje .site-main {
	margin-top: 0 !important;
}

/* Sekcja-wrapper pod hero */
.location-single-dark {
	max-width: 100% !important;
	width: 100%;
	padding: 4rem 1.5rem 5rem;
	background: var(--greco-bg-gradient);
	color: var(--greco-text);
	box-sizing: border-box;
	overflow-x: hidden;
}

.location-single-dark > * {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 600px) {
	.location-single-dark {
		padding: 2.5rem 1rem 3rem;
	}
}

/* =========================================================================
   HERO
   ========================================================================= */
.location-hero {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-height: 55vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: 0 !important;
	padding: 110px 1.5rem 50px;
	color: #fff;
	isolation: isolate;
	box-sizing: border-box;
}

/* Block themes: alignfull używa width: 100vw + ujemnego marginu, co na iOS
   nie odejmuje scrollbar i daje horizontal overflow. Wymuszamy 100% wrappera. */
.location-hero.alignfull {
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: 100% !important;
}

.location-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: -2;
}

.location-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg,
		rgba(42, 52, 64, 0.35) 0%,
		rgba(42, 52, 64, 0.55) 60%,
		rgba(42, 52, 64, 0.85) 100%);
	z-index: -1;
}

.location-hero__content {
	max-width: 900px;
	width: 100%;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.location-hero__title {
	font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
	letter-spacing: -0.01em;
}

.location-hero__title::after {
	content: "";
	display: block;
	width: 90px;
	height: 2px;
	margin: 0.75rem auto 0;
	background: var(--greco-accent);
}

.location-hero__subtitle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.location-hero__cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.85rem;
	margin-top: 0.75rem;
}

.location-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.3rem;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
}

.location-hero__btn--primary {
	background: var(--greco-accent);
	/* Light: navy + biały tekst (9:1), dark: gold + ciemny tekst (6.78:1).
	   --greco-accent-on przełącza się razem z motywem. */
	color: var(--greco-accent-on);
	/* Box-shadow pomaga navy odróżnić się od ciemnego overlay hero w light mode. */
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.location-hero__btn--primary:hover {
	background: var(--greco-accent-soft);
}

.location-hero__btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
}

.location-hero__btn--ghost:hover {
	background: rgba(255, 255, 255, 0.2);
}

.location-hero__scroll-hint {
	display: none;
}

@media (max-width: 768px) {
	.location-hero { min-height: 50vh; padding: 120px 1rem 40px; }
	.location-hero__btn { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
}

/* =========================================================================
   GLASS CARDS — nadpisanie jasnych styli z components.css
   ========================================================================= */
.location-single-dark .location-contact-card,
.location-single-dark .location-map-section,
.location-single-dark .location-gallery-section,
.location-single-dark .location-fb-feed-section {
	background: var(--greco-card-bg);
	border: 1px solid var(--greco-card-border);
	border-radius: 16px;
	box-shadow: var(--greco-card-shadow);
	backdrop-filter: var(--greco-card-blur);
	-webkit-backdrop-filter: var(--greco-card-blur);
	color: var(--greco-text);
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Contact card header — nadpisuje aegean gradient */
.location-single-dark .contact-card-header {
	background: var(--greco-header-strip-bg);
	border-bottom: 1px solid var(--greco-card-border);
	color: var(--greco-text);
}

.location-single-dark .contact-card-title,
.location-single-dark .contact-card-title-text {
	color: var(--greco-text);
}

/* Pinezka SVG w nagłówku karty — nadpisuje components.css (rgba 255 0.85)
   i style.css (#fff). Specyficzność 0,3,1 wygrywa z 0,3,0 z style.css. */
.location-single-dark .location-content-wrapper .contact-card-header .contact-card-title,
.location-single-dark .location-content-wrapper .contact-card-header .contact-card-title svg {
	color: var(--greco-text);
}

/* Info rows */
.location-single-dark .contact-info-row {
	border-bottom-color: var(--greco-row-divider);
}

.location-single-dark .contact-info-row:hover {
	background: var(--greco-card-hover);
}

.location-single-dark .contact-info-row:last-child {
	border-bottom: 0;
}

.location-single-dark .contact-icon {
	background: var(--greco-icon-bg);
	color: var(--greco-accent);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.location-single-dark .contact-info-row:hover .contact-icon {
	background: var(--greco-icon-bg-hover);
	color: var(--greco-accent);
}

.location-single-dark .contact-label {
	color: var(--greco-text-muted);
	letter-spacing: 0.04em;
}

.location-single-dark .contact-value,
.location-single-dark .contact-link {
	color: var(--greco-text);
}

.location-single-dark .contact-link:hover {
	color: var(--greco-accent);
}

.location-single-dark .contact-hours .contact-value .hours-row {
	color: var(--greco-text-muted);
}

/* Reservation button (header) */
.location-single-dark .reservation-btn,
.location-single-dark .reservation-btn--header {
	background: var(--greco-accent);
	color: #ffffff;
	border-color: transparent;
}

.location-single-dark .reservation-btn:hover {
	background: var(--greco-accent-soft);
	color: var(--greco-accent-on);
}

/* Social icons — light mode: brand colors widoczne (FB niebieski, IG gradient,
   TT czarny) z białymi ikonami. Spójność wizualna i czytelność na jasnym
   header strip. Dark mode (poniżej) wraca do semi-przezroczystych białych.
   `background:` shorthand resetuje również background-image — to konieczne
   dla IG, którego default w style.css ma radial-gradient. */
.location-single-dark .location-content-wrapper .contact-social-icons .social-icon.facebook {
	background: #1877F2 !important;
	border: 1.5px solid #1877F2 !important;
	color: #fff !important;
}

.location-single-dark .location-content-wrapper .contact-social-icons .social-icon.instagram {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
	border: 1.5px solid transparent !important;
	color: #fff !important;
}

.location-single-dark .location-content-wrapper .contact-social-icons .social-icon.tiktok {
	background: #000 !important;
	border: 1.5px solid #000 !important;
	color: #fff !important;
}

.location-single-dark .location-content-wrapper .contact-social-icons .social-icon svg {
	stroke: currentColor !important;
}

/* Dark mode: semi-przezroczyste białe (oryginalny styl pod ciemny header).
   `background-image: none` kasuje gradient IG odziedziczony z .social-icon.instagram. */
html.dark-mode .location-single-dark .location-content-wrapper .contact-social-icons .social-icon,
html.dark-mode .location-single-dark .location-content-wrapper .contact-social-icons .social-icon.facebook,
html.dark-mode .location-single-dark .location-content-wrapper .contact-social-icons .social-icon.instagram,
html.dark-mode .location-single-dark .location-content-wrapper .contact-social-icons .social-icon.tiktok {
	background: var(--greco-social-bg) !important;
	background-image: none !important;
	border: 1.5px solid var(--greco-card-border) !important;
	color: var(--greco-text) !important;
}

/* W dark mode hover wraca do brand colors (działa już z style.css:336/345/354). */

/* Delivery section */
.location-single-dark .location-delivery-inline {
	background: var(--greco-delivery-strip-bg);
	border-top: 1px solid var(--greco-card-border);
}

.location-single-dark .delivery-inline-title {
	color: var(--greco-text);
}

/* Ikonka samochodu obok "ZAMÓW ONLINE" — components.css ustawia ją na aegean
   navy, co w dark mode znika na ciemnym tle. Podpinamy pod akcent motywu. */
.location-single-dark .delivery-inline-title svg {
	color: var(--greco-accent);
}

.location-single-dark .delivery-btn {
	border: 1px solid transparent;
	color: #fff;
	font-weight: 600;
}

.location-single-dark .delivery-btn--uber,
.location-single-dark .location-content-wrapper .delivery-btn--uber {
	background: #06C167;
	color: #fff;
}

.location-single-dark .delivery-btn--uber:hover,
.location-single-dark .location-content-wrapper .delivery-btn--uber:hover {
	background: #05a157;
	border-color: transparent;
	color: #fff;
}

.location-single-dark .delivery-btn--wolt,
.location-single-dark .location-content-wrapper .delivery-btn--wolt {
	background: #00C2E8;
	color: #fff;
}

.location-single-dark .delivery-btn--wolt:hover,
.location-single-dark .location-content-wrapper .delivery-btn--wolt:hover {
	background: #00a8c9;
	border-color: transparent;
	color: #fff;
}

.location-single-dark .delivery-btn--pyszne,
.location-single-dark .location-content-wrapper .delivery-btn--pyszne {
	background: #FF8000;
	color: #fff;
}

.location-single-dark .delivery-btn--pyszne:hover,
.location-single-dark .location-content-wrapper .delivery-btn--pyszne:hover {
	background: #e67300;
	border-color: transparent;
	color: #fff;
}

/* Map section */
.location-single-dark .section-title {
	color: var(--greco-text);
}

.location-single-dark .section-title .info-icon {
	color: var(--greco-accent);
}

.location-single-dark .location-map-embed {
	background: var(--greco-map-placeholder-bg);
	border: 1px solid var(--greco-card-border);
}

/* Map section z components.css ma height: 100% z czasów starszego layoutu —
   wymuszamy height: auto, żeby flex-column z iframem + linkiem nie wystawał
   poza border-box rodzica (gridRight) i nie nakładał się na sąsiednie sekcje. */
.location-single-dark .location-map-section {
	height: auto !important;
	min-height: 0;
}

.location-single-dark .location-detail-right {
	display: flex;
	flex-direction: column;
}

.location-single-dark .location-detail-right > * {
	flex: 0 0 auto;
}

/* Grid items nie powinny być stretched do wysokości najwyższego itemu w wierszu. */
.location-single-dark .location-detail-grid > * {
	align-self: start;
	min-height: 0;
}

.location-single-dark .location-maps-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
	padding: 0.65rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--greco-accent);
	background: var(--greco-map-link-bg);
	border: 1px solid var(--greco-accent);
	border-radius: 999px;
	text-decoration: none;
}

.location-single-dark .location-maps-link:hover {
	background: var(--greco-accent);
	color: var(--greco-accent-on);
}

/* =========================================================================
   GALERIA — grid + tile
   ========================================================================= */
.location-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.85rem;
}

.location-gallery-grid .gallery-tile {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: var(--greco-tile-bg);
	border: 1px solid var(--greco-card-border);
	cursor: zoom-in;
	transition: background-color 0.3s ease, border-color 0.2s ease;
}

.location-gallery-grid .gallery-tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.location-gallery-grid .gallery-tile:hover {
	border-color: var(--greco-accent);
}

@media (max-width: 768px) {
	.location-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.6rem;
	}
}

@media (max-width: 480px) {
	.location-gallery-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
   SEKCJA FB — placeholder
   ========================================================================= */
.location-fb-feed-section {
	padding: 2rem 1.75rem;
}

.fb-feed-placeholder {
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--greco-text-muted);
	font-size: 1rem;
	border: 1px dashed var(--greco-card-border);
	border-radius: 12px;
	padding: 2rem 1rem;
	background: var(--greco-fb-placeholder-bg);
}

.fb-feed-placeholder p {
	margin: 0;
	max-width: 360px;
}

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.greco-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(20, 28, 38, 0.92);
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}

.greco-lightbox.is-open {
	display: flex;
}

.greco-lightbox__stage {
	position: relative;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.greco-lightbox__img {
	max-width: 92vw;
	max-height: 82vh;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.greco-lightbox__caption {
	position: absolute;
	bottom: -36px;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(244, 236, 216, 0.85);
	font-size: 0.9rem;
}

.greco-lightbox__btn {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

/* Lightbox jest zawsze ciemny (świadomy wybór), więc btn:hover ma stały
   złoty akcent — navy z light mode byłby słabo widoczny na ciemnym tle. */
.greco-lightbox__btn:hover {
	background: #D4A752;
	border-color: #D4A752;
	color: #1A2028;
}

.greco-lightbox__close {
	top: 24px;
	right: 24px;
}

.greco-lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.greco-lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
	.greco-lightbox__close { top: 12px; right: 12px; }
	.greco-lightbox__prev { left: 8px; }
	.greco-lightbox__next { right: 8px; }
	.greco-lightbox__btn { width: 38px; height: 38px; }
}

body.greco-lightbox-open {
	overflow: hidden;
}

/* =========================================================================
   ENSURE GRID LAYOUT JAK W CURRENT — bo nadpisaliśmy max-width
   ========================================================================= */
.location-single-dark .location-content-wrapper {
	margin: 0;
	display: block;
}

.location-single-dark .location-content-wrapper > * + * {
	margin-top: 2.5rem;
}

.location-single-dark .location-detail-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
	margin: 0;
}

@media (min-width: 768px) {
	.location-single-dark .location-detail-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

.location-single-dark .location-gallery-section {
	padding: 1.75rem;
}

/* Kolor headera transparent na hero — przezroczysty + jasne logo/tekst */
/* Reguły uzupełniające — komplementarne do .home rules w components.css.
   Sama logika scroll-toggle jest w scroll-animations.js (rozpoznaje
   .menu-hero--photo i dodaje .header-scrolled po przewinięciu > 80 px). */
