/*
Theme Name: Travelike
Theme URI: https://travelike.example
Author: Travelike
Description: Classic (Customizer-based) theme for the Travelike travel brand. Typography and colour mirror the adakosowska.pl blog (Montserrat + Playfair Display SC, teal accent). Customize via Appearance → Customize.
Version: 0.4.43
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: travelike
*/

/*
 * Typography, base colours and block/button/heading styles live in theme.json
 * (applied on the front end and in the editor). This file styles the classic
 * chrome (header, nav, social, footer) and the content layout. The top bar's
 * background colour + sticky/transparent behaviour are injected by the
 * Customizer (see functions.php → wp_head). Modern CSS only.
 */

/* ---------- Motion ---------- */
a,
.wp-element-button,
.travelike-menu a,
.travelike-social__link,
.travelike-readmore {
	transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0.01ms !important; }
}

/* ---------- Layout ---------- */
.travelike-main {
	display: block;
}

.travelike-content {
	max-width: 1200px;
	margin-inline: auto;
	padding: 3rem 1.25rem 4rem;
}

.travelike-content--center {
	text-align: center;
}

/* Landing-page sections all share the 1200px content width. Keep "wide"/"full"
   alignment and the slider's full-width option from breaking out of the reading
   column, so every block lines up to the same width down the page. */
.travelike-content .alignwide {
	margin-inline: auto;
	max-width: 100%;
	width: auto;
}

/* Full-bleed (edge to edge): the running banner + any slider with its
   "Full width" option enabled. */
.travelike-content .alignfull,
.travelike-content .travelike-marquee,
.travelike-content .travelike-slider--full {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

/* Consistent vertical rhythm between blocks (they otherwise butt together). */
.entry-content > * + * {
	margin-block-start: 3.5rem;
}
/* A section heading sits close to the block it introduces. */
.entry-content > h2 + * {
	margin-block-start: 1.25rem;
}

:where(p) {
	margin-block: 0 1.2em;
}

/* A heading's weight comes from its own style (h2 = 700). A nested <strong>/<b>
   — e.g. carried over from imported copy — must not bump it to "bolder", which
   resolves to 900 on the variable font. */
:where(h1, h2, h3, h4, h5, h6) :is(strong, b) {
	font-weight: inherit;
}

/* Tight leading on every heading (0.86) — overrides any block-level line-height. */
.travelike-content :is(h1, h2, h3, h4, h5, h6),
.travelike-site-title {
	line-height: 0.86;
}

/* ---------- Top bar (background + sticky come from the Customizer) ---------- */
.travelike-topbar {
	-webkit-backdrop-filter: saturate(150%) blur(6px);
	backdrop-filter: saturate(150%) blur(6px);
	padding-block: 0;
}

.travelike-topbar__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	column-gap: 1.5rem;
	row-gap: 0;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 1.25rem;
}

/* ---------- Primary menu: black, weight 400, ~14px, uppercase ---------- */
.travelike-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 1.25rem;
}

.travelike-primary-menu .travelike-menu a {
	display: block;
	padding-block: 0.55rem;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.875rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
}

.travelike-primary-menu .travelike-menu a:hover {
	color: rgba(49, 49, 49, 0.6);
}

/* ---------- Social icons ---------- */
.travelike-social {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.travelike-social__link {
	display: inline-flex;
}

.travelike-social__link:hover {
	transform: translateY(-1px);
	opacity: 0.7;
}

.travelike-social__link svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

/* Colour the <a> directly (it would otherwise inherit the teal link colour),
   so the currentColor-filled icons match the text. */
.travelike-social--header .travelike-social__link { color: var(--wp--preset--color--contrast); }
.travelike-social--footer .travelike-social__link { color: #fff; }

/* ---------- Mobile menu toggle (hamburger) ---------- */
.travelike-menu-toggle {
	display: none;
	align-items: center;
	background: none;
	border: 0;
	padding: 0.7rem 0.25rem;
	cursor: pointer;
	color: var(--wp--preset--color--contrast);
}

.travelike-menu-toggle__icon {
	position: relative;
	display: block;
	width: 22px;
	height: 2px;
	background-color: currentColor;
}

.travelike-menu-toggle__icon::before,
.travelike-menu-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background-color: currentColor;
}

.travelike-menu-toggle__icon::before { top: -6px; }
.travelike-menu-toggle__icon::after { top: 6px; }

@media (max-width: 781px) {
	.travelike-menu-toggle { display: inline-flex; order: 1; }
	.travelike-social--header { order: 2; }

	/* The open menu drops down as an absolute panel so the bar height is
	   unchanged whether the menu is open or closed. */
	.travelike-primary-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: var(--wp--preset--color--primary);
		padding: 0.25rem 1.25rem 0.75rem;
		box-shadow: 0 8px 14px rgba(0, 0, 0, 0.1);
		z-index: 99;
	}
	.travelike-topbar.menu-open .travelike-primary-menu { display: block; }
	.travelike-primary-menu .travelike-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.travelike-primary-menu .travelike-menu a { padding-block: 0.6rem; }
}

/* ---------- Brand: centred title/logo + tagline ---------- */
.travelike-brand {
	text-align: center;
	padding: 1.25rem 1.25rem 0.75rem;
}

.travelike-brand .custom-logo {
	height: auto;
	max-height: 90px;
	width: auto;
}

.travelike-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--3x-large);
	text-transform: uppercase;
	letter-spacing: 2px;
}

.travelike-site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.travelike-tagline {
	margin: 0.4rem 0 0;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--wp--preset--color--muted);
	font-size: 0.72rem;
}

/* ---------- Footer: thin dark bar, white, uppercase ---------- */
.travelike-footer {
	background-color: var(--wp--preset--color--contrast);
	color: #fff;
	text-align: center;
}

.travelike-footer__inner {
	max-width: 1100px;
	margin-inline: auto;
	padding: 1.75rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.travelike-footer-menu .travelike-menu {
	justify-content: center;
	gap: 0 1.25rem;
}

.travelike-footer-menu .travelike-menu a {
	color: #fff;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.625rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	text-decoration: none;
}

.travelike-footer-menu .travelike-menu a:hover {
	color: var(--wp--preset--color--primary);
}

.travelike-footer__copy {
	margin: 0;
	font-size: 0.625rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #fff;
}

/* ---------- Blog list ---------- */
.travelike-post {
	margin-block-end: 3.5rem;
}

.travelike-post__title {
	margin-block: 0 0.4rem;
}

.travelike-post__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.travelike-post__meta {
	margin: 0 0 1rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--wp--preset--color--muted);
}

.travelike-post__thumb img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-block-end: 1rem;
}

.travelike-readmore {
	display: inline-block;
	margin-block-start: 0.5rem;
	padding: 0.6rem 1.4rem;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
	border-radius: 3px;
}

.travelike-readmore:hover {
	background-color: var(--wp--preset--color--primary-hover);
	color: var(--wp--preset--color--base);
}

/* ---------- Dividers: short, centred accent rule ---------- */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	border: 0;
	height: 2px;
	width: 60px;
	margin-inline: auto;
	background-color: var(--wp--preset--color--primary);
	opacity: 1;
}

/* ---------- Content links: underline on hover ---------- */
:where(.entry-content) a {
	color: var(--wp--preset--color--primary-hover);
	text-underline-offset: 0.2em;
}

:where(.entry-content) a:hover,
:where(.entry-content) a:focus {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

/* ---------- Grey rounded box (used by hero/split blocks + core/group style) ---------- */
.travelike-greybox,
.wp-block-group.is-style-travelike-greybox {
	background-color: var(--wp--preset--color--light);
	border-radius: 14px;
	padding: 1.5rem 1.75rem;
}

/* ---------- Misc ---------- */
::selection {
	background-color: var(--wp--preset--color--primary);
	color: #fff;
}

:where(.wp-block-image img, .entry-content img) {
	border-radius: 4px;
}
