/**
 * Otago Balustrades — presentation layer.
 *
 * theme.json owns the design tokens (fonts, colours, button + link styles,
 * content widths). This file owns layout and the pixel-level details that map
 * the original design onto the block markup produced by inc/content.php.
 * Loaded on the front end and inside the editor canvas (see functions.php).
 */

html { scroll-behavior: smooth; }

.otago-main { overflow-x: hidden; }

/* Neutralise figure margins for the images we place. */
.otago-main figure.wp-block-image { margin: 0; }

/* ------------------------------------------------------------------ *
 *  Header
 * ------------------------------------------------------------------ */
.otago-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #ffffff;
	border-bottom: 1px solid #ececec;
}
.otago-header__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: nowrap;
}
.otago-logo.wp-block-site-logo { margin: 0; line-height: 0; }
.otago-logo a { display: block; }
.otago-logo img {
	height: 64px !important;
	width: auto !important;
	max-width: none !important;
	display: block;
}

.otago-nav .wp-block-navigation__container {
	gap: 34px;
	align-items: center;
	flex-wrap: wrap;
}
.otago-nav .wp-block-navigation-item__content,
.otago-nav a {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 15px;
	color: #2b2b2b;
}
.otago-nav .current-menu-item .wp-block-navigation-item__content,
.otago-nav .current_page_item .wp-block-navigation-item__content {
	color: #1f6f8b;
	font-weight: 600;
}

/* ------------------------------------------------------------------ *
 *  Hero (cover)
 * ------------------------------------------------------------------ */
.otago-hero.wp-block-cover {
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #ffffff;
}
.otago-hero--home { min-height: 560px; }
.otago-hero--page { min-height: 420px; }
.otago-hero .wp-block-cover__inner-container {
	max-width: 880px;
	margin: 0 auto;
	padding: 0 28px;
}
.otago-hero__title {
	color: #ffffff;
	margin: 0;
	letter-spacing: normal;
	line-height: 1.1;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.otago-hero--home .otago-hero__title { font-size: 64px; }
.otago-hero--page .otago-hero__title { font-size: 56px; }
.otago-hero__subtitle {
	color: #ffffff;
	font-weight: 400;
	font-size: 22px;
	line-height: 1.5;
	margin: 18px 0 0;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------------ *
 *  Call-to-action band
 * ------------------------------------------------------------------ */
.otago-cta {
	padding: 62px 28px;
	text-align: center;
}
.otago-cta__title {
	font-size: 30px;
	letter-spacing: normal;
	margin: 0;
}
.otago-cta .wp-block-buttons {
	margin-top: 26px;
	justify-content: center;
}

/* ------------------------------------------------------------------ *
 *  "Why get a balustrade?" (home)
 * ------------------------------------------------------------------ */
.otago-section { max-width: 1140px; margin: 0 auto; padding: 78px 32px; }
.otago-why { gap: 56px; align-items: center; }
.otago-why .otago-h2 { font-size: 30px; margin: 0 0 22px; }
.otago-prose p {
	font-size: 16.5px;
	line-height: 1.75;
	margin: 0 0 18px;
}
.otago-prose .otago-bold { font-weight: 700; margin-bottom: 0; }
.otago-why__img img { width: 100%; height: auto; display: block; border-radius: 2px; }

/* ------------------------------------------------------------------ *
 *  Products grid (home)
 * ------------------------------------------------------------------ */
.otago-products-section { padding: 78px 32px; }
.otago-products__title { font-size: 34px; text-align: center; margin: 0 0 22px; }
.otago-products__intro {
	max-width: 900px;
	margin: 0 auto 50px;
	font-size: 16.5px;
	line-height: 1.75;
}
.otago-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 36px;
	max-width: 1140px;
	margin: 0 auto;
}
.otago-card {
	background: #ffffff;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
}
.otago-card__img { margin: 0; }
.otago-card__img img { width: 100%; height: 280px; object-fit: cover; display: block; }
.otago-card__body {
	padding: 28px 30px 32px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.otago-card__title { font-size: 24px; margin: 0 0 14px; }
.otago-card__text { font-size: 16px; line-height: 1.7; flex: 1; margin: 0; }
.otago-card .wp-block-buttons { margin-top: 22px; }
.otago-card .wp-block-button__link { padding: 12px 26px; font-size: 13.5px; }

/* ------------------------------------------------------------------ *
 *  Products page
 * ------------------------------------------------------------------ */
.otago-narrow { max-width: 980px; margin-left: auto; margin-right: auto; }

.otago-products-intro {
	max-width: 980px;
	margin: 0 auto;
	padding: 72px 32px 20px;
	text-align: center;
}
.otago-products-intro__head {
	font-size: 27px;
	line-height: 1.35;
	letter-spacing: normal;
	font-weight: 500;
	margin: 0 0 24px;
}
.otago-products-intro p { font-size: 16.5px; line-height: 1.75; margin: 0; }

.otago-qa {
	max-width: 980px;
	margin: 0 auto;
	padding: 24px 32px 40px;
	gap: 48px;
	align-items: flex-start;
}
.otago-qa__head {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: normal;
	margin: 0 0 14px;
}
.otago-qa p { font-size: 16px; line-height: 1.75; margin: 0; }

.otago-product-rows {
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 32px 80px;
	display: flex;
	flex-direction: column;
	gap: 72px;
}
.otago-product-row {
	gap: 48px;
	align-items: center;
	margin: 0;
	scroll-margin-top: 100px;
}
.otago-product-row__head { font-size: 30px; margin: 0 0 18px; }
.otago-product-row p { font-size: 16px; line-height: 1.75; margin: 0 0 16px; }
.otago-product-row p:last-child { margin-bottom: 0; }
.otago-product-row figure { margin: 0; }
.otago-product-row img { width: 100%; height: auto; display: block; border-radius: 2px; }

/* ------------------------------------------------------------------ *
 *  Contact page
 * ------------------------------------------------------------------ */
.otago-contact { gap: 56px; align-items: flex-start; }
.otago-contact__details .otago-h2 { font-size: 30px; margin: 0 0 28px; }
.otago-contact__line { font-size: 17px; line-height: 2; margin: 0 0 14px; }
.otago-contact__line:last-of-type { margin-bottom: 0; }
.otago-contact__line a { color: #1f6f8b; }
.otago-contact__details .wp-block-buttons { margin-top: 34px; }

.otago-form-card {
	background: #f4f5f6;
	border-radius: 3px;
	padding: 34px 32px;
}
.otago-form-card__title { font-size: 24px; margin: 0 0 8px; }
.otago-form-card__intro {
	font-size: 15px;
	line-height: 1.6;
	color: #5a5f63;
	margin: 0 0 24px;
}

/* Gravity Forms — match the original form styling. */
.otago-form-card .gform_wrapper,
.otago-form-card .gform_wrapper form { margin: 0; }
.otago-form-card .gform_wrapper .gform_fields { gap: 16px; }
.otago-form-card .gfield { margin: 0; }
.otago-form-card .gfield_label,
.otago-form-card legend.gfield_label {
	display: block;
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #444444;
	margin: 0 0 6px;
}
.otago-form-card input[type="text"],
.otago-form-card input[type="email"],
.otago-form-card input[type="tel"],
.otago-form-card input[type="url"],
.otago-form-card input[type="number"],
.otago-form-card textarea,
.otago-form-card select {
	width: 100%;
	box-sizing: border-box;
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
	font-size: 15px;
	padding: 11px 13px;
	border: 1px solid #d3d6d8;
	border-radius: 2px;
	background: #ffffff;
	color: #2b2b2b;
}
.otago-form-card textarea { resize: vertical; min-height: 120px; }
.otago-form-card .gform_footer { margin: 6px 0 0; padding: 0; }
.otago-form-card .gform_footer input[type="submit"],
.otago-form-card .gform_footer button,
.otago-form-card .gform_button {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #ffffff;
	background: #1f6f8b;
	padding: 14px 32px;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	width: auto;
}
.otago-form-card .gform_footer input[type="submit"]:hover,
.otago-form-card .gform_footer button:hover,
.otago-form-card .gform_button:hover { background: #17576e; }
.otago-form-card .gform_confirmation_message {
	background: #e3f1ee;
	border: 1px solid #bfe0d7;
	border-radius: 3px;
	padding: 28px 26px;
	text-align: center;
	font-size: 15.5px;
	line-height: 1.65;
	color: #2b2b2b;
}

/* ------------------------------------------------------------------ *
 *  Map
 * ------------------------------------------------------------------ */
.otago-map-section { max-width: 1140px; margin: 0 auto; padding: 0 32px 78px; }
.otago-map {
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.otago-map iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ------------------------------------------------------------------ *
 *  Footer
 * ------------------------------------------------------------------ */
.otago-footer { background: #1f2529; color: #d7dadc; }
.otago-footer__inner { max-width: 1140px; margin: 0 auto; padding: 64px 32px 36px; }
.otago-footer__cols { gap: 48px; align-items: flex-start; }
.otago-footer a { color: #7cc4dc; }
.otago-footer-logo.wp-block-site-logo { margin: 0; line-height: 0; }
.otago-footer-logo img {
	height: 120px !important;
	width: auto !important;
	max-width: none !important;
	background: #ffffff;
	padding: 14px 18px;
	border-radius: 3px;
	box-sizing: border-box;
	display: block;
}
.otago-footer__head {
	font-family: 'Poppins', Helvetica, Arial, sans-serif;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	font-size: 19px;
	color: #ffffff;
	margin: 0 0 18px;
}
.otago-footer__addr { font-size: 16px; line-height: 1.7; margin: 0 0 18px; }
.otago-footer__lines { font-size: 16px; line-height: 1.9; margin: 0; }
.otago-footer__legal {
	max-width: 1140px;
	margin: 48px auto 0;
	padding-top: 24px;
	border-top: 1px solid #353c41;
	font-size: 13.5px;
	color: #9aa0a4;
	line-height: 1.7;
}
.otago-footer__legal a { color: #9aa0a4; text-decoration: underline; }

/* ------------------------------------------------------------------ *
 *  Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.otago-hero--home .otago-hero__title { font-size: 50px; }
	.otago-hero--page .otago-hero__title { font-size: 44px; }
}

@media (max-width: 782px) {
	.otago-cards { grid-template-columns: 1fr; }
	.otago-section,
	.otago-products-section,
	.otago-product-rows,
	.otago-map-section { padding-left: 22px; padding-right: 22px; }
	.otago-header__inner { padding: 12px 18px; gap: 14px; }
	.otago-logo img { height: 50px !important; }
	.otago-hero--home .otago-hero__title { font-size: 40px; }
	.otago-hero--page .otago-hero__title { font-size: 34px; }
	.otago-hero__subtitle { font-size: 18px; }
	.otago-product-rows { gap: 48px; }
}

@media (max-width: 600px) {
	.otago-cta__title,
	.otago-products__title { font-size: 26px; }
	.otago-form-card { padding: 26px 22px; }
}
