/*
Theme Name: Catering Theme
Theme URI: http://catering-website.local
Author: Ivan
Author URI: http://catering-website.local
Description: A custom WordPress block theme for a catering business. Warm, elegant, and built with full-site editing (block templates + theme.json).
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
Version: 1.0.29
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catering
Tags: block-templates, full-site-editing, custom-colors, custom-menu, block-styles, food-and-drink
*/

/* Block themes are styled almost entirely through theme.json.
   Add small, targeted custom CSS below only when theme.json can't express it. */

/* These rules define the header/footer layout explicitly instead of relying
   on WordPress' per-instance block layout CSS, which is not reliably emitted
   when the header/footer template parts are rendered inside front-page.php. */

/* ---- Header: logo left, nav right, one slim line ----
   !important is required because, on front-page.php, WordPress does not emit
   the per-instance flex layout rule for this group, and the core wp-block-image
   stylesheet (img{height:auto}) loads after this file and would otherwise win. */
.catering-header > .wp-block-group {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: nowrap !important;
	gap: 1.5rem;
}
.catering-logo,
.catering-logo figure {
	margin: 0;
	line-height: 0;
	flex: 0 0 auto;
}
.catering-logo img {
	height: 56px !important;
	width: auto !important;
	max-width: none !important;
	display: block;
}
.catering-header .wp-block-navigation {
	flex: 0 1 auto;
}

/* ---- Footer layout ----
   Forced with !important so the footer renders identically on every page,
   including front-page.php where WordPress omits the per-instance layout CSS. */
.catering-footer .wp-block-columns {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	gap: 2.5rem !important;
	align-items: flex-start;
}
.catering-footer .wp-block-column {
	flex: 1 1 160px !important;
}
.catering-footer .wp-block-column:first-child {
	flex: 1.7 1 260px !important;
}
/* Bottom bar: copyright left, legal right */
.catering-footer > .wp-block-group {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: space-between !important;
	gap: 1rem;
}

/* Footer logo — slightly larger than the header logo */
.catering-footer-logo,
.catering-footer-logo figure {
	margin: 0 0 1.25rem;
	line-height: 0;
}
.catering-footer-logo img {
	height: 72px !important;
	width: auto !important;
	max-width: none !important;
	display: block;
}

/* Footer links: legible on the dark background */
.catering-footer a {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}
.catering-footer a:hover {
	color: #ffffff;
	text-decoration: underline;
}

/* Compact, reorganized footer on mobile & small tablets */
@media (max-width: 820px) {
	.catering-footer {
		padding: 2.5rem 1.25rem 1.75rem !important;
	}
	.catering-footer .wp-block-columns {
		gap: 1.25rem 1rem !important;
	}
	/* Default each column to full width... */
	.catering-footer .wp-block-column {
		flex: 1 1 100% !important;
	}
	/* ...but put the two short link lists (Explore + Follow) side by side */
	.catering-footer .wp-block-column:nth-child(2),
	.catering-footer .wp-block-column:nth-child(4) {
		flex: 1 1 44% !important;
	}
	.catering-footer .wp-block-column:first-child { order: 0; }
	.catering-footer .wp-block-column:nth-child(2) { order: 1; } /* Explore */
	.catering-footer .wp-block-column:nth-child(4) { order: 2; } /* Follow */
	.catering-footer .wp-block-column:nth-child(3) { order: 3; } /* Contact, full width below */
	.catering-footer h3 {
		margin-bottom: 0.4rem !important;
	}
	.catering-footer-logo img {
		height: 60px !important;
	}
	.catering-footer .wp-block-separator {
		margin-top: 1.5rem !important;
		margin-bottom: 1rem !important;
	}
}

@media (max-width: 600px) {
	.catering-logo img { height: 44px !important; }
}
