/*
 * Chrome tuning — header, footer and page-width adjustments.
 *
 * Asked for on 2026-09-21: "footer and heather must be thinner", "contact page is
 * too wide". Every value below is an override of a specific Ckarla rule, listed with
 * the original so the change is reversible by reading it:
 *
 *   .karla-start-header            padding: 25px 0   -> 12px 0
 *   .footer-section .footer-top
 *   .center-cont                   padding: 60px 0   -> 30px 0
 *   .stk-footer-extras             padding: 36px 16px 0 -> 20px 16px 0
 *
 * These are the only rules that create the vertical space, so nothing else needs
 * touching. Each one is a single number: if the header is still too tall, or now too
 * short, change the padding here rather than editing the theme — the theme is
 * replaced on update, this file is not.
 */

:root {
	--stk-header-pad: 12px;
	--stk-header-pad-scrolled: 8px;
	--stk-footer-pad: 30px;
	--stk-footer-extras-pad: 20px;
	--stk-narrow-width: 980px;
}

/* ---------------------------------------------------------------- the header */

.karla-start-header {
	padding: var(--stk-header-pad) 0;
}

/* Once the page is scrolled the bar shrinks again — keep that behaviour, tighter. */
.karla-start-header.scroll-on {
	padding: var(--stk-header-pad-scrolled) 0;
}

/* The logo drove a good deal of the height on its own. */
.karla-navigation-wrap .navbar-brand img {
	height: 44px;
	width: auto;
	transition: height 0.3s ease-out;
}

.karla-start-header.scroll-on .navbar-brand img {
	height: 34px;
}

/* Menu links had generous vertical padding that added to the bar height. */
.karla-navigation-wrap .navbar-nav .nav-link {
	padding-top: 6px;
	padding-bottom: 6px;
}

/* ---------------------------------------------------------------- the footer */

.footer-section .footer-top .center-cont {
	padding: var(--stk-footer-pad) 0;
}

.stk-footer-extras {
	padding: var(--stk-footer-extras-pad) 16px 0;
}

.stk-footer-extras__heading {
	margin-bottom: 12px;
}

/* The image strip was as tall as the rest of the footer put together. */
.stk-footer-gallery img {
	max-height: 96px;
	width: auto;
	object-fit: cover;
}

.footer-section .footer-bottom {
	padding-top: 14px;
	padding-bottom: 14px;
}

/* --------------------------------------------------- narrower reading measure */

/*
 * The contact page ran the full width of a desktop screen, which puts the form
 * fields a long way apart and makes the page tire to read. 980px is wide enough for
 * the two-column form and short enough that a line of text stays readable.
 *
 * Scoped to the contact page and the careers form rather than applied site-wide,
 * because the portfolio and homepage galleries genuinely do want the full width.
 */
body.page-template .stk-narrow .container,
.pcrm-inquiry-form-wrap,
.pbapply {
	max-width: var(--stk-narrow-width);
	margin-left: auto;
	margin-right: auto;
}

body.stk-narrow-page .container {
	max-width: var(--stk-narrow-width);
}

/* The contact details column sat too far from the form on a wide screen. */
body.stk-narrow-page .contact-info,
body.stk-narrow-page .contact-area {
	max-width: var(--stk-narrow-width);
	margin-left: auto;
	margin-right: auto;
}

/* Keep the theme's own gutters on small screens. */
@media (max-width: 1024px) {
	body.stk-narrow-page .container,
	.pcrm-inquiry-form-wrap,
	.pbapply {
		max-width: 100%;
	}
}

@media (max-width: 767px) {
	.karla-start-header {
		padding: 8px 0;
	}
	.karla-navigation-wrap .navbar-brand img {
		height: 34px;
	}
	.footer-section .footer-top .center-cont {
		padding: 22px 0;
	}
	.stk-footer-gallery img {
		max-height: 64px;
	}
}

/* =====================================================================
 * Layout repairs, 2026-09-21, from full-page screenshots.
 * ===================================================================== */

/* ---------- Gutenberg blocks the theme never styled ----------
 * The venue "at a glance" table is a <figure class="wp-block-table">. Ckarla
 * predates the block editor and styles none of it, so the figure took its
 * browser-default width and the NEXT heading rendered alongside it, overlapping
 * the rows. Affects all 178 venue guides.
 */
.wp-block-table {
	display: block;
	width: 100%;
	clear: both;
	margin: 26px 0 30px;
	overflow-x: auto;
}
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	table-layout: auto;
}
.wp-block-table td,
.wp-block-table th {
	padding: 10px 14px;
	border-bottom: 1px solid #e6e0d6;
	vertical-align: top;
	line-height: 1.55;
}
.wp-block-table tr td:first-child {
	width: 30%;
	white-space: nowrap;
	font-weight: 600;
}
.wp-block-table td strong { font-weight: 600; }

/* Any heading after a block must start on a clean line. */
.wp-block-table + h2, .wp-block-table + h3,
figure + h2, figure + h3 { clear: both; }

.wp-block-image, .wp-block-gallery, .wp-block-quote, .wp-block-embed {
	clear: both;
	margin: 26px 0;
	max-width: 100%;
}
.wp-block-image img, .wp-block-gallery img { max-width: 100%; height: auto; }
.wp-block-quote {
	border-left: 3px solid var(--stk-gold, #b8965a);
	padding: 4px 0 4px 18px;
	font-style: italic;
}

/* ---------- carousels with no JavaScript ----------
 * Elementor's swiper widgets need elementor-frontend.js to position their slides.
 * That script went when Elementor did, so every slide renders at once, stacked on
 * top of the others — which is why the testimonial text sat over the photograph.
 * Un-initialised swipers are laid out as a plain responsive row instead.
 */
.swiper-container:not(.swiper-container-initialized) .swiper-wrapper,
.elementor-widget-testimonial-carousel .swiper-wrapper:not(.swiper-wrapper-initialized) {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	transform: none !important;
	width: 100% !important;
}
.swiper-container:not(.swiper-container-initialized) .swiper-slide,
.elementor-widget-testimonial-carousel .swiper-slide {
	position: relative !important;
	flex: 1 1 320px;
	width: auto !important;
	max-width: 100%;
	left: auto !important;
	top: auto !important;
	transform: none !important;
	opacity: 1 !important;
}
/* The arrows and dots do nothing without the script. */
.swiper-container:not(.swiper-container-initialized) .swiper-pagination,
.swiper-container:not(.swiper-container-initialized) .elementor-swiper-button {
	display: none;
}

/* ---------- absurd vertical gaps ----------
 * Several homepage sections carry a min-height sized for content that renders
 * shorter without Elementor's JS, leaving screens of white space between bands.
 * Cap it and let the content decide, rather than editing the converted CSS.
 */
.elementor-section > .elementor-container,
.e-con > .e-con-inner { min-height: 0; }
.elementor-widget-empty,
.elementor-element:empty { display: none; }

/* A section whose only child is an empty container should not reserve a screen. */
.elementor-section.elementor-section-height-min-height { min-height: 0; }

/* ---------- stop content hugging one edge on wide screens ---------- */
@media (min-width: 1400px) {
	.elementor-section > .elementor-container { max-width: 1240px; }
}
