/**
 * Pivnica Child — main stylesheet.
 *
 * Design direction (not final): warm, modern hospitality.
 * Colour values below are PROVISIONAL placeholders until the client's brand
 * guidelines/logo are received. The canonical palette should also be entered in
 * Kadence's Global Palette (Customizer → Colors) so blocks and theme share it.
 */

:root {
	--pivnica-green: #1f3a2e;      /* dark green — header/footer, headings */
	--pivnica-charcoal: #2b2b2b;   /* body text */
	--pivnica-cream: #f7f1e3;      /* page background */
	--pivnica-cream-dark: #ece2cc; /* section alternation */
	--pivnica-gold: var(--pivnica-logo-gold, #cd9100); /* The one brand gold = logo gold (fonts.css). */
	--pivnica-radius: 6px;
}

/* Placeholder for images awaiting approved client photography. */
.pivnica-photo-placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	background: var(--pivnica-cream-dark);
	color: var(--pivnica-green);
	border: 1px dashed var(--pivnica-gold);
	border-radius: var(--pivnica-radius);
	font-size: 0.9rem;
	text-align: center;
	padding: 1rem;
}

/* ------------------------------------------------------------------
 * pivnica-core output: [pivnica_cjenik] and [pivnica_dnevni_meni].
 * Minimal, readable layout only — final visual design comes later.
 * ------------------------------------------------------------------ */

.pivnica-cjenik__items,
.pivnica-dnevni-meni__items {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.pivnica-cjenik__item,
.pivnica-dnevni-meni__item {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--pivnica-cream-dark);
}

.pivnica-cjenik__image {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--pivnica-radius);
	align-self: center;
}

.pivnica-cjenik__text,
.pivnica-dnevni-meni__text {
	flex: 1 1 auto;
	min-width: 0;
}

.pivnica-cjenik__name,
.pivnica-dnevni-meni__name {
	display: block;
	font-weight: 600;
}

.pivnica-cjenik__description,
.pivnica-dnevni-meni__description {
	display: block;
	font-size: 0.9em;
	opacity: 0.8;
}

.pivnica-cjenik__en,
.pivnica-cjenik__category-en {
	display: block;
	font-size: 0.85em;
	font-style: italic;
	opacity: 0.8;
}

.pivnica-cjenik__price,
.pivnica-dnevni-meni__price {
	flex: 0 0 auto;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.pivnica-cjenik__category {
	color: var(--pivnica-green);
	border-bottom: 2px solid var(--pivnica-gold);
	padding-bottom: 0.25rem;
}

.pivnica-dnevni-meni__period {
	font-weight: 600;
	color: var(--pivnica-green);
}

.pivnica-dnevni-meni__day--today .pivnica-dnevni-meni__day-name::after {
	content: " • danas";
	color: var(--pivnica-gold);
}

.pivnica-dnevni-meni__note {
	font-style: italic;
}

/* ------------------------------------------------------------------
 * Header (Kadence header builder, reusable on all pages).
 * Colours, sticky and transparent behaviour are Kadence Customizer
 * settings (seeded by scripts/seed-dev.php); this only refines them.
 * ------------------------------------------------------------------ */

/* Smooth change from transparent to the dark sticky bar. */
#masthead .site-header-row-container-inner {
	transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

#masthead .item-is-stuck .site-header-row-container-inner {
	padding-top: 10px;
	padding-bottom: 10px;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

/* Transparent header (front page), before scrolling: soft black gradient
 * behind logo and menu, fading to fully transparent at the bottom. Once the
 * header is stuck, Kadence's sticky background (rgba(0,0,0,.8)) takes over. */
body.transparent-header #main-header .site-main-header-wrap:not(.item-is-stuck) .site-header-row-container-inner,
body.mobile-transparent-header #mobile-header .site-main-header-wrap:not(.item-is-stuck) .site-header-row-container-inner {
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 55%, rgba(0, 0, 0, 0) 100%);
}

/* Before scrolling: a little breathing room above the logo (all pages).
 * Not applied to the stuck bar, which stays compact. */
#masthead .site-main-header-wrap:not(.item-is-stuck) .site-header-row-container-inner {
	padding-top: 18px;
}

/* Social icons (Kadence "Social" element) after the menu: plain icons, no
 * circle/outline; colours come from Kadence (white, gold on hover). */
#masthead .header-social-wrap {
	margin-left: 0.6em;
}

#masthead .header-social-inner-wrap .social-button,
#mobile-drawer .header-mobile-social-inner-wrap .social-button {
	border: 0 !important;
	background: transparent !important;
	padding: 0.25em;
}

/* Mobile menu button (hamburger): gold only on a mouse hover or keyboard focus.
 * Kadence also colours it on plain :focus, and closing the drawer moves focus back to the button; on
 * touch screens :hover also sticks after a tap. Both left it gold after closing the menu.
 * White = Customizer "mobile_trigger_color"; !important beats Kadence's #masthead sticky rules. */
#masthead .menu-toggle-open:focus:not(:focus-visible):not(:hover) {
	color: #fff !important;
}

@media (hover: none) {
	#masthead .menu-toggle-open:hover:not(:focus-visible) {
		color: #fff !important;
	}
}

/* Menu item with CSS class "pivnica-menu-cta" (Izgled → Izbornici →
 * Opcije zaslona → CSS klase) is shown as a button, e.g. "Kontakt". */
.header-navigation .menu-item.pivnica-menu-cta > a {
	padding: 0.55em 1.3em;
	margin-left: 0.5em;
	border-radius: 999px;
	background: var(--pivnica-gold);
	color: var(--pivnica-charcoal) !important;
	font-weight: 700; /* Size, caps and spacing come from the navigation typography. */
	transition: background-color 0.2s ease;
}

.header-navigation .menu-item.pivnica-menu-cta > a:hover,
.header-navigation .menu-item.pivnica-menu-cta > a:focus-visible {
	background: var(--global-palette2, #8a6000); /* Deep gold + white text (AA). */
	color: #fff !important;
}

.mobile-navigation .menu-item.pivnica-menu-cta > a {
	font-weight: 700;
	color: var(--pivnica-gold);
}

/* Hero block styles live in hero.css (loaded on the front end and in the editor). */

/* Front page: the hero starts at the very top, under the transparent header. */
.home .entry-content > .pivnica-hero:first-child {
	margin-top: 0;
}

/* ------------------------------------------------------------------
 * Footer (Kadence footer builder): black, brush-stroke edge on top that
 * reaches up over the previous section (same shape as the hero's edge,
 * mirrored), logo + business info | main menu, copyright row.
 * ------------------------------------------------------------------ */

#colophon {
	--pivnica-footer-bg: #000;
	--pivnica-footer-edge-h: clamp(50px, 7vw, 120px);
	position: relative;
	background: var(--pivnica-footer-bg);
	color: #f5ecd7;
}

#colophon::before {
	content: "";
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: calc(100% - 1px);
	height: var(--pivnica-footer-edge-h);
	background: var(--pivnica-footer-bg);
	-webkit-mask: url("../images/brush-edge.svg") center bottom / 100% 100% no-repeat;
	mask: url("../images/brush-edge.svg") center bottom / 100% 100% no-repeat;
	transform: scaleX(-1); /* Mirrored, so it doesn't repeat the hero exactly. */
	pointer-events: none;
}

#colophon .site-footer-wrap,
#colophon .site-footer-row-container-inner {
	background: transparent;
}

#colophon a {
	color: var(--pivnica-logo-gold);
	text-decoration: none;
}

#colophon a:hover,
#colophon a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Column 1: logo and business info. */
#colophon .wp-block-site-logo {
	margin: 0 0 22px;
}

#colophon .wp-block-site-logo img {
	height: auto;
}

/* Column 2: the main menu as a vertical list. */
#colophon .footer-navigation .menu {
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

#colophon .footer-navigation .menu > li > a {
	padding: 6px 0;
}

#colophon .site-footer-middle-section-2 {
	justify-content: flex-end;
}

/* Copyright row. */
#colophon .site-bottom-footer-wrap .site-footer-row-container-inner {
	border-top: 1px solid rgba(205, 145, 0, 0.35);
}

@media (max-width: 767px) {
	#colophon .site-footer-middle-section-2 {
		justify-content: flex-start;
	}
}

/* ------------------------------------------------------------------
 * "Podaci o objektu" block (pivnica-core: pivnica/podaci-objekta).
 * Gold icons like the hero info: map pin, phone, e-mail, clock.
 * ------------------------------------------------------------------ */

.pivnica-podaci {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.98rem;
	line-height: 1.55;
}

.pivnica-podaci__item {
	position: relative;
	margin: 0 0 12px;
	padding-left: 30px;
}

.pivnica-podaci__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 18px;
	height: 18px;
	background-color: var(--pivnica-logo-gold, #cd9100);
	-webkit-mask: var(--pivnica-icon) center / contain no-repeat;
	mask: var(--pivnica-icon) center / contain no-repeat;
}

.pivnica-podaci__item--pin { --pivnica-icon: url("../images/map-pin.svg"); }
.pivnica-podaci__item--phone { --pivnica-icon: url("../images/phone.svg"); }
.pivnica-podaci__item--mail { --pivnica-icon: url("../images/mail.svg"); }
.pivnica-podaci__item--clock { --pivnica-icon: url("../images/clock.svg"); }

#colophon .pivnica-podaci a {
	color: #f5ecd7;
}

#colophon .pivnica-podaci a:hover,
#colophon .pivnica-podaci a:focus-visible {
	color: var(--pivnica-logo-gold);
}

/* ------------------------------------------------------------------
 * Links outside the header: gold with a gold underline ("border") on
 * hover/focus. Light backgrounds use the deep gold (palette 2, AA
 * contrast); dark sections (hero, menu, contact, footer) the logo gold.
 * The header navigation keeps its own hover (no underline).
 * ------------------------------------------------------------------ */

body :is(.site-main, #colophon) a:is(:hover, :focus-visible):not(.wp-block-button__link, .button, .social-button, .custom-logo-link, .pivnica-kontakt__submit, .pivnica-cjenik-pdf__button) {
	color: var(--global-palette2);
	text-decoration: underline;
	text-decoration-color: var(--global-palette1);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

body :is(#colophon, .pivnica-hero, .pivnica-page-hero, .pivnica-kontakt, .pivnica-tjedni-meni) a:is(:hover, :focus-visible):not(.wp-block-button__link, .button, .social-button, .custom-logo-link, .pivnica-kontakt__submit, .pivnica-cjenik-pdf__button) {
	color: var(--global-palette1);
}
