/*
Theme Name: Green Mansions
Theme URI: https://greenmansions.pk
Author: Toru Enterprises
Author URI: https://toruenterprises.com
Description: Lightweight block theme for the Green Mansions website. No page builder required: every page is built from standard WordPress blocks and can be edited in the normal editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: green-mansions
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }
main.gm-main { margin: 0; }
.wp-block-post-content > * + * { margin-block-start: 0; }
:focus-visible { outline: 2px solid var(--wp--preset--color--gold-dark); outline-offset: 3px; }
.screen-reader-text:focus { background: #fff; color: #000; padding: 1rem; z-index: 100000; }
figure.wp-block-image { margin-left: 0; margin-right: 0; }
[id] { scroll-margin-top: 1.5rem; }

/* ---------- Sections ---------- */
.gm-section { padding-top: clamp(4rem, 9vw, 7rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.gm-section.gm-tight { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.gm-sage { background: var(--wp--preset--color--sage); }
.gm-paper { background: var(--wp--preset--color--paper); }
.gm-lined { border-top: 1px solid #E1E5DA; border-bottom: 1px solid #E1E5DA; }
.gm-dark { background: var(--wp--preset--color--forest); color: #E6EBDF; }
.gm-dark :where(h1, h2, h3, h4) { color: #FBF9F4; }
.gm-dark a:not(.wp-block-button__link) { color: var(--wp--preset--color--gold); }

.gm-eyebrow { margin: 0 0 1rem !important; color: var(--wp--preset--color--gold-dark); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.gm-dark .gm-eyebrow, .gm-hero .gm-eyebrow { color: var(--wp--preset--color--gold); }
.gm-lede { font-size: var(--wp--preset--font-size--large); max-width: 40rem; }
.gm-section-head { margin-bottom: clamp(2rem, 5vw, 3rem) !important; gap: 1rem 2rem; }
h2.wp-block-heading { margin-top: 0; }
.gm-section :where(h2 + p) { margin-top: 1.5rem; }

/* ---------- Header ---------- */
.gm-header { background: var(--wp--preset--color--paper); border-bottom: 1px solid #E1E5DA; position: relative; z-index: 50; }
.gm-header-inner { padding-top: 0.875rem; padding-bottom: 0.875rem; gap: 1rem 2rem; }
.gm-header .wp-block-site-logo img { width: auto; height: 62px; max-height: 62px; }
.gm-nav { font-size: 0.875rem; font-weight: 600; }
.gm-header .gm-nav .wp-block-navigation-item__content { color: #3E4A43; padding: 0.75rem 0; text-decoration: none; border-bottom: 2px solid transparent; }
.gm-header .gm-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--forest); }
.gm-header .gm-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--forest); border-bottom-color: var(--wp--preset--color--gold); }
.gm-nav .wp-block-navigation__container { gap: 0.25rem 1.75rem; }
.gm-nav .gm-nav-phone { display: none; }
.gm-nav .wp-block-navigation__responsive-container-open,
.gm-nav .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--forest); width: 44px; height: 44px; justify-content: center; align-items: center; }
.gm-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper) !important; color: var(--wp--preset--color--forest) !important; padding: 1.5rem; }
.gm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0.5rem; font-size: 1.25rem; }
.gm-nav .wp-block-navigation__responsive-container.is-menu-open .gm-nav-phone { display: block; margin-top: 1rem; }
.gm-nav .wp-block-navigation__responsive-container.is-menu-open .gm-nav-phone a { color: var(--wp--preset--color--green-text); font-weight: 700; }
.gm-phone .wp-block-button__link { font-size: 0.875rem; min-height: 44px; padding: 0.5rem 1.25rem; }
.gm-phone .wp-block-button__link::before { content: ""; width: 16px; height: 16px; margin-right: 0.5rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Buttons ---------- */
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; box-sizing: border-box; text-decoration: none; }
.wp-block-button.is-style-gold .wp-block-button__link { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--forest-dark); border-color: var(--wp--preset--color--gold); }
.wp-block-button.is-style-gold .wp-block-button__link:hover { background: #D9BC72; border-color: #D9BC72; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--forest); border-color: var(--wp--preset--color--forest); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--forest); color: var(--wp--preset--color--paper); }
.wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; color: #FBF9F4; border-color: #FBF9F4; }
.wp-block-button.is-style-outline-light .wp-block-button__link:hover { background: #FBF9F4; color: var(--wp--preset--color--forest); }
.wp-block-buttons { gap: 0.75rem; }

/* Arrow text links */
.gm-more-link a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 700; font-size: 0.9375rem; text-decoration: none; }
.gm-more-link a::after { content: "→"; transition: transform .2s ease; }
.gm-more-link a:hover::after { transform: translateX(4px); }
.gm-more-link.is-external a::after { content: "↗"; }

/* ---------- Home hero (Cover block) ---------- */
.wp-block-cover.gm-hero { min-height: clamp(32rem, 78vh, 42rem) !important; padding: 0; align-items: flex-end; }
.gm-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(20,42,31,0.12) 0%, rgba(20,42,31,0.32) 45%, rgba(20,42,31,0.85) 100%) !important; opacity: 1 !important; }
.gm-hero .wp-block-cover__image-background { object-position: center 70%; }
.gm-hero .wp-block-cover__inner-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 7rem clamp(1.25rem, 4vw, 2rem) clamp(3.5rem, 7vw, 5rem); box-sizing: border-box; }
.gm-hero h1 { color: #FBF9F4; margin: 0; max-width: 56rem; line-height: 0.98; }
.gm-hero .gm-lede { color: #E6EBDF; margin-top: 1.5rem; }
.gm-chips { margin-top: 2rem !important; gap: 0.75rem; }
.gm-chip { display: inline-flex; align-items: center; min-height: 36px; margin: 0 !important; padding: 0 1rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--wp--preset--color--gold); color: var(--wp--preset--color--forest-dark) !important; }
.gm-chip.is-outline { background: transparent; border: 1px solid rgba(251,249,244,0.6); color: #FBF9F4 !important; text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---------- Inner page header with leaves (Cover block) ---------- */
.wp-block-cover.gm-page-head { min-height: 0 !important; padding: clamp(5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 2rem) clamp(4.5rem, 9vw, 7.5rem); text-align: center; }
.gm-page-head .wp-block-cover__background { opacity: 0 !important; }
.gm-page-head .wp-block-cover__image-background { object-position: center 45%; }
.gm-page-head .wp-block-cover__inner-container { max-width: 760px; margin: 0 auto; color: var(--wp--preset--color--text); }
.gm-page-head h1 { margin: 0; color: var(--wp--preset--color--forest); font-size: clamp(2.75rem, 5.4vw, 4.5rem); line-height: 1; }
.gm-page-head .gm-lede { color: #3E4A43; margin: 1.5rem auto 0; max-width: 40rem; }
.gm-breadcrumb { font-size: 0.875rem; color: #3E4A43; margin: 0 0 1.5rem !important; }
.gm-breadcrumb a { color: var(--wp--preset--color--green-text); }

/* ---------- Split sections ---------- */
.gm-split { gap: clamp(2rem, 6vw, 4rem) !important; }
.gm-split .wp-block-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; display: block; }
.gm-split .wp-block-image { margin: 0; }

/* ---------- Facilities ---------- */
.gm-grid { gap: 1.25rem; }
.gm-feature { background: var(--wp--preset--color--paper); padding: 2rem; border-radius: 4px; }
.gm-feature::before { content: ""; display: block; width: 2.5rem; height: 2px; background: var(--wp--preset--color--gold-dark); margin-bottom: 1.25rem; }
.gm-feature h3 { margin: 0; }
.gm-feature p { font-size: 0.9375rem; margin: 0.5rem 0 0; color: #3E4A43; }

/* ---------- Gallery ---------- */
.gm-gallery { gap: 1rem; }
.gm-gallery .wp-block-image { margin: 0; width: 100%; }
.gm-gallery .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 4px; }
.gm-gallery .wp-block-image.is-wide { grid-column: 1 / -1; }
.gm-gallery .wp-block-image.is-wide img { aspect-ratio: 21 / 9; }
.gm-gallery figcaption { margin-top: 0.625rem; font-size: 0.875rem; color: var(--wp--preset--color--muted); text-align: left; }
.gm-closing { font-family: var(--wp--preset--font-family--serif); font-style: italic; font-size: clamp(1.375rem, 2.4vw, 1.625rem); color: var(--wp--preset--color--green-text); text-align: center; padding-top: 2.5rem; border-top: 1px solid #D5DBCD; }

/* ---------- Location ---------- */
.gm-aside { background: var(--wp--preset--color--forest); color: #E6EBDF; padding: 2.5rem; border-radius: 4px; }
.gm-aside h3 { color: #FBF9F4; margin: 0; font-size: 1.875rem; }
.gm-rows { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.gm-rows li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.95rem 0; border-top: 1px solid #36533F; color: #E6EBDF; }
.gm-rows li:last-child { border-bottom: 1px solid #36533F; }
.gm-rows li strong { color: var(--wp--preset--color--gold); white-space: nowrap; }

/* ---------- Owners band tiles ---------- */
.gm-tiles { gap: 0.75rem; }
.gm-tile { margin: 0 !important; }
.gm-tile a { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 64px; padding: 0 1.375rem; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--forest); font-weight: 600; text-decoration: none; border-radius: 4px; }
.gm-tile a::after { content: "→"; }
.gm-tile a:hover { background: #fff; }
.gm-tile.is-dark a { background: var(--wp--preset--color--forest); color: var(--wp--preset--color--paper); }

/* ---------- Values ---------- */
.gm-values-intro { font-family: var(--wp--preset--font-family--serif); font-style: italic; font-size: 1.375rem; color: var(--wp--preset--color--muted); margin: 0 0 0.5rem !important; }
.gm-values { list-style: none; padding: 0; margin: 0; counter-reset: v; }
.gm-values li { counter-increment: v; display: flex; gap: 1.25rem; align-items: baseline; padding: 1.125rem 0; border-bottom: 1px solid #D5DBCD; font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: clamp(1.375rem, 2.2vw, 1.625rem); line-height: 1.25; color: var(--wp--preset--color--forest); }
.gm-values li:last-child { border-bottom: 0; }
.gm-values li::before { content: counter(v, decimal-leading-zero); font-size: 1.375rem; color: var(--wp--preset--color--gold-dark); min-width: 1.75rem; }

/* ---------- Photo CTA (Cover block) ---------- */
.wp-block-cover.gm-cta { min-height: 0 !important; padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 2rem); }
.gm-cta .wp-block-cover__inner-container { max-width: 1240px; margin: 0 auto; width: 100%; }
.gm-cta h2 { color: #FBF9F4; }
.gm-cta p { color: #E6EBDF; font-size: 1.125rem; margin: 0.5rem 0 0; }
.gm-cta .wp-block-columns { align-items: center; gap: 2rem 3rem; margin: 0; }
.gm-cta .wp-block-buttons { flex-direction: column; align-items: stretch; }
.gm-cta .wp-block-button { width: 100%; }
.gm-cta .wp-block-button__link { width: 100%; min-height: 56px; font-size: 1.0625rem; }

/* ---------- Owners: documents ---------- */
.gm-docs { border-top: 1px solid #D5DBCD; }
.gm-doc { padding: 1.75rem 0; border-bottom: 1px solid #D5DBCD; gap: 1rem 2rem; margin: 0 !important; }
.gm-doc > .wp-block-group:first-child { flex: 1 1 26rem; min-width: 0; }
.gm-doc h3 { margin: 0; }
.gm-doc p { margin: 0.25rem 0 0; font-size: 0.9375rem; color: #3E4A43; }
.gm-doc .wp-block-button__link { min-height: 48px; font-size: 0.875rem; padding: 0.5rem 1.375rem; }
.gm-doc .wp-block-button__link::before, .gm-download .wp-block-button__link::before { content: "↓"; margin-right: 0.5rem; font-weight: 700; }
.gm-box { background: var(--wp--preset--color--sage); padding: clamp(1.75rem, 4vw, 3rem); border-radius: 4px; gap: 1.5rem 3rem; }
.gm-box > .wp-block-group:first-child { flex: 1 1 26rem; min-width: 0; }
.gm-box h2 { font-size: 2.25rem; margin: 0; }
.gm-box p { margin: 0.5rem 0 0; color: #3E4A43; }

/* ---------- Office details ---------- */
.gm-office { background: var(--wp--preset--color--forest); color: #E6EBDF; padding: 2.5rem; border-radius: 4px; }
.gm-label { margin: 1.5rem 0 0 !important; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.gm-label:first-child { margin-top: 0 !important; }
.gm-office .gm-label { color: #B9C6B6; }
.gm-value { margin: 0.375rem 0 0 !important; font-size: 1.0625rem; }
.gm-office .gm-value { color: #FBF9F4; }
.gm-office a { color: var(--wp--preset--color--gold); font-weight: 700; }
.gm-details .gm-label { padding-top: 1.25rem; border-top: 1px solid #D5DBCD; }
.gm-details .gm-label:first-child { padding-top: 1.25rem; }
.gm-details { border-bottom: 1px solid #D5DBCD; padding-bottom: 1.25rem; }
.gm-details a { font-weight: 700; }

/* ---------- Contact form ---------- */
.gm-form { background: var(--wp--preset--color--paper); border: 1px solid #E1E5DA; border-radius: 4px; padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1.25rem; }
.gm-form h2 { font-size: 2.125rem; margin: 0; }
.gm-form .gm-form-intro { margin: 0.5rem 0 0; font-size: 0.9375rem; color: #3E4A43; }
.gm-form .gm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.25rem; }
.gm-form label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--wp--preset--color--text); }
.gm-form input, .gm-form select, .gm-form textarea { width: 100%; box-sizing: border-box; min-height: 48px; padding: 0.75rem 0.875rem; border: 1px solid #A9B4A6; background: #fff; font: inherit; color: var(--wp--preset--color--text); border-radius: 4px; }
.gm-form textarea { resize: vertical; min-height: 8.5rem; }
.gm-form input:focus, .gm-form select:focus, .gm-form textarea:focus { border-color: var(--wp--preset--color--forest); outline: 2px solid var(--wp--preset--color--gold); outline-offset: 0; }
.gm-form .gm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.gm-form button { min-height: 52px; padding: 0 2rem; background: var(--wp--preset--color--forest); color: var(--wp--preset--color--paper); border: 0; font: inherit; font-weight: 700; font-size: 0.9375rem; border-radius: 999px; cursor: pointer; }
.gm-form button:hover { background: var(--wp--preset--color--forest-dark); }
.gm-form .gm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.gm-form .gm-note { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 0; }
.gm-notice { padding: 1rem 1.25rem; font-weight: 600; margin: 0; border-radius: 4px; }
.gm-notice.is-success { background: #E2EDDC; color: #24461A; }
.gm-notice.is-error { background: #F7E3DF; color: #7A2414; }

/* ---------- Footer ---------- */
.gm-footer { background: var(--wp--preset--color--forest-dark); color: #B9C6B6; font-size: 0.875rem; }
.gm-footer-main { padding-top: 4.5rem; padding-bottom: 2.5rem; gap: 3rem; }
.gm-footer p { color: #B9C6B6; }
.gm-footer a { color: #B9C6B6; text-decoration: none; }
.gm-footer a:hover { color: var(--wp--preset--color--gold); }
.gm-footer-logo { margin: 0 0 2rem !important; }
.gm-footer-logo img { width: 200px; height: auto; display: block; }
.gm-by { gap: 1rem; align-items: center; }
.gm-by .wp-block-image { margin: 0; flex: 0 0 auto; }
.gm-by img { width: 130px; height: auto; display: block; }
.gm-by p { margin: 0; max-width: 13rem; }
.gm-footer-title { color: #FBF9F4 !important; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; margin: 0 0 1rem !important; }
.gm-footer .wp-block-navigation { gap: 0.625rem; }
.gm-footer .wp-block-navigation-item__content { padding: 0.125rem 0; color: #B9C6B6; }
.gm-footer-bottom { border-top: 1px solid #2A4234; padding-top: 1.5rem; padding-bottom: 2rem; font-size: 0.8125rem; justify-content: space-between; }
.gm-footer-bottom p { color: #9FB09C; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.gm-aside, .gm-office { padding: 1.75rem; }
	.gm-hero .wp-block-cover__inner-container { padding-top: 5rem; }
	.gm-values li { gap: 1rem; }
	.gm-split.is-reversed-mobile { flex-direction: column-reverse; }
	.gm-gallery .wp-block-image.is-wide img { aspect-ratio: 4 / 3; }
}
@media (max-width: 599px) {
	.gm-header .wp-block-buttons.gm-phone { display: none; }
	.gm-header .wp-block-site-logo img { height: 50px; }
	.gm-header-inner { padding-top: 0.625rem; padding-bottom: 0.625rem; }
	.gm-page-head .wp-block-cover__image-background { object-position: 12% 45%; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
.gm-section-head .gm-note { margin: 0; font-size: 0.875rem; color: var(--wp--preset--color--muted); }

/* ---------- Fixes after first render ---------- */
.gm-hero .wp-block-cover__inner-container > *, .gm-cta .wp-block-cover__inner-container > * { margin-left: 0 !important; margin-right: 0 !important; max-width: none; }
.gm-hero .wp-block-cover__inner-container > h1 { max-width: 56rem; }
.gm-hero .wp-block-cover__inner-container > .gm-lede { max-width: 40rem; }
.gm-hero .wp-block-cover__inner-container { text-align: left; }
.gm-page-head .wp-block-cover__inner-container > * { margin-left: auto !important; margin-right: auto !important; }
.gm-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(20,42,31,0.30) 0%, rgba(20,42,31,0.45) 40%, rgba(20,42,31,0.88) 100%) !important; }
.gm-hero .gm-eyebrow { color: #E9CF8E; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
@media (max-width: 781px) {
	.gm-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(20,42,31,0.45) 0%, rgba(20,42,31,0.7) 35%, rgba(20,42,31,0.9) 100%) !important; }
	.gm-page-head .wp-block-cover__background { opacity: 0.62 !important; background: #F7F4EC !important; }
	.gm-page-head .wp-block-cover__image-background { object-position: 20% 30%; }
}
