/*
Theme Name: My Ottawa Agent
Theme URI: https://myottawaagent.com/
Author: My Ottawa Agent
Description: Lean custom theme for myottawaagent.com. Supplies the header, footer and post layouts; page content is built with WPBakery and the site's custom CSS. Replaces Realtyspace.
Version: 0.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: moa
*/

/* ---------------------------------------------------------------- tokens */
:root {
	--moa-ink: #241242;
	--moa-purple: #3b2166;
	--moa-deep: #1a0e2e;
	--moa-footer: #2e1a4d;
	--moa-gold: #c8901e;
	--moa-gold-lt: #e6c46a;
	--moa-lav: #f3effa;
	--moa-text: #2c3e50;
	--moa-muted: #6b6478;
	--moa-line: #e7e1f0;
	--moa-bg: #f6f6f6;
	--moa-sans: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--moa-serif: "Source Serif Pro", Georgia, "Times New Roman", serif;
	--moa-wrap: 1170px;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--moa-sans); font-size: 16px; line-height: 1.6; color: var(--moa-text); background: var(--moa-bg); -webkit-font-smoothing: antialiased; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--moa-purple); }
a:hover { color: var(--moa-gold); }
h1, h2, h3, h4, h5, h6 { font-family: var(--moa-sans); color: var(--moa-ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
figure { margin: 0 0 1.5em; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--moa-line); margin: 2em 0; }
:focus-visible { outline: 2px solid var(--moa-gold); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10000; background: #fff; color: var(--moa-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: var(--moa-muted); }
.clearfix::after { content: ""; display: table; clear: both; }

.container { width: 94%; max-width: var(--moa-wrap); margin: 0 auto; }
.box { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.site-wrap { flex: 1; display: flex; flex-direction: column; }
.site-wrap > .footer { margin-top: auto; }

/* page-builder pages: WPBakery rows use -15px gutters */
.wrapper { padding: 0 15px; overflow-x: clip; }
.site-main { display: block; }

/* buttons & forms */
.moa-btn { display: inline-flex; align-items: center; padding: 12px 22px; border-radius: 999px; background: var(--moa-gold); color: #fff !important; font-weight: 700; text-decoration: none; border: 2px solid var(--moa-gold); transition: transform .15s, box-shadow .15s; }
.moa-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(36, 18, 66, .18); }
.moa-btn--line { background: transparent; color: var(--moa-purple) !important; border-color: currentColor; }
.moa-btns { display: flex; flex-wrap: wrap; gap: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=url], input[type=number], input[type=password], select, textarea { font: inherit; color: var(--moa-text); max-width: 100%; border: 1px solid #d9d1e6; border-radius: 10px; padding: 10px 12px; background: #fff; }
button, input[type=submit] { font: inherit; cursor: pointer; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin-bottom: 1.5em; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; }
.search-form .search-submit { border: 0; border-radius: 999px; background: var(--moa-purple); color: #fff; padding: 10px 20px; font-weight: 700; }

/* ---------------------------------------------------------------- header */
.moa-top { background: var(--moa-deep); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.moa-top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; }
.moa-top__social { display: flex; gap: 8px; }
.moa-social { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 50%; color: #fff !important; text-decoration: none; font-size: 15px; transition: background .15s, border-color .15s, color .15s; }
.moa-social:hover { background: var(--moa-gold); border-color: var(--moa-gold); }
.moa-top__contacts { display: flex; align-items: center; gap: 28px; }
.moa-top__phone, .moa-top__mail { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; }
.moa-top__phone .fa, .moa-top__mail .fa { color: var(--moa-gold); font-size: 18px; }
.moa-top__phone:hover, .moa-top__mail:hover { color: var(--moa-gold-lt) !important; }

.moa-nav { position: relative; z-index: 50; background: linear-gradient(90deg, var(--moa-ink), var(--moa-purple)); border-bottom: 2px solid var(--moa-gold-lt); color: #fff; }
.moa-nav__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }
.moa-nav__brand { font-family: var(--moa-serif); font-size: 40px; line-height: 1; letter-spacing: .01em; color: #fff !important; text-decoration: none; white-space: nowrap; }
.moa-nav__logo { max-height: 56px; width: auto; display: block; }
.moa-nav__wrap { display: flex; }
.moa-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
.moa-menu > li { position: relative; display: flex; align-items: center; }
.moa-menu__link { display: inline-block; padding: 26px 0; color: #fff !important; text-decoration: none; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; border-bottom: 2px solid transparent; line-height: 1; }
.moa-menu > li:hover > .moa-menu__link, .moa-menu > .current-menu-item > .moa-menu__link, .moa-menu > .current-menu-ancestor > .moa-menu__link { color: var(--moa-gold-lt) !important; }
.moa-menu > .current-menu-item > .moa-menu__link, .moa-menu > .current-menu-ancestor > .moa-menu__link { text-decoration: underline; text-decoration-color: var(--moa-gold-lt); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.moa-menu__toggle { display: none; background: none; border: 0; color: #fff; padding: 6px 4px; margin-left: 2px; }
.moa-menu__sub { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: -16px; min-width: 240px; max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 14px 34px rgba(36, 18, 66, .18); border-top: 2px solid var(--moa-gold-lt); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.moa-menu > li:nth-last-child(-n+3) > .moa-menu__sub { left: auto; right: -16px; }
.moa-menu > li:hover > .moa-menu__sub,.moa-menu > li:focus-within > .moa-menu__sub, .moa-menu > li.is-open > .moa-menu__sub { opacity: 1; visibility: visible; transform: none; }
.moa-menu__sublink { display: block; padding: 8px 18px; color: var(--moa-ink) !important; text-decoration: none; font-size: 15px; }
.moa-menu__sublink:hover, .moa-menu__sub .current-menu-item > .moa-menu__sublink { background: var(--moa-lav); color: var(--moa-purple) !important; }
.moa-menu > .menu-button > .moa-menu__link { background: var(--moa-gold); color: #fff !important; padding: 11px 20px; border-radius: 999px; font-weight: 700; border: 0; text-decoration: none; }
.moa-menu > .menu-button > .moa-menu__link:hover { background: #b37f16; color: #fff !important; }
.moa-nav__toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; color: #fff; }
.moa-nav__bars, .moa-nav__bars::before, .moa-nav__bars::after { display: block; width: 26px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.moa-nav__bars { position: relative; }
.moa-nav__bars::before, .moa-nav__bars::after { content: ""; position: absolute; left: 0; }
.moa-nav__bars::before { top: -8px; }
.moa-nav__bars::after { top: 8px; }
.moa-nav.is-open .moa-nav__bars { background: transparent; }
.moa-nav.is-open .moa-nav__bars::before { transform: translateY(8px) rotate(45deg); }
.moa-nav.is-open .moa-nav__bars::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1199px) {
	.moa-nav__brand { font-size: 32px; }
	.moa-menu { gap: 16px; }
	.moa-menu__link { font-size: 13px; }
}
@media (max-width: 1023px) {
	.moa-top__mail { display: none; }
	.moa-nav__row { min-height: 64px; flex-wrap: wrap; gap: 0; }
	.moa-nav__brand { font-size: 28px; }
	.moa-nav__toggle { display: inline-flex; }
	.moa-nav__wrap { display: none; width: 100%; padding: 6px 0 18px; }
	.moa-nav.is-open .moa-nav__wrap { display: block; }
	.moa-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.moa-menu > li { flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); }
	.moa-menu__link { padding: 15px 0; flex: 1; font-size: 15px; }
	.moa-menu__toggle { display: inline-flex; font-size: 22px; padding: 8px 12px; }
	.moa-menu > li.is-open > .moa-menu__toggle .fa { transform: rotate(180deg); }
	.moa-menu__sub { position: static; width: 100%; min-width: 0; max-height: none; display: none; opacity: 1; visibility: visible; transform: none; background: rgba(255, 255, 255, .06); box-shadow: none; border: 0; border-radius: 10px; margin-bottom: 12px; }
	.moa-menu > li:hover > .moa-menu__sub { display: none; }
	.moa-menu > li.is-open > .moa-menu__sub { display: block; }
	.moa-menu__sublink { color: #fff !important; padding: 10px 16px; }
	.moa-menu__sublink:hover { background: rgba(255, 255, 255, .08); color: var(--moa-gold-lt) !important; }
	.moa-menu > .menu-button { border-top: 0; padding-top: 14px; }
	.moa-menu > .menu-button > .moa-menu__link { flex: 0 0 auto; text-align: center; }
}
@media (max-width: 600px) {
	.moa-top__row { min-height: 46px; }
	.moa-top__contacts { gap: 14px; }
	.moa-top__phone { font-size: 15px; }
	.moa-social { width: 30px; height: 30px; font-size: 14px; }
	.moa-nav__brand { font-size: 24px; }
}

/* header runs full width like the old site */
.moa-top > .container, .moa-nav > .container { max-width: none; }

/* front page: header sits over the hero photo */
.home .moa-top, .home .moa-nav { position: absolute; left: 0; right: 0; z-index: 60; background: transparent; }
.home .moa-top { top: 0; border-bottom-color: rgba(255, 255, 255, .08); }
.home .moa-nav { top: 51px; border-bottom-color: transparent; }
.home .moa-nav.is-open { background: linear-gradient(90deg, var(--moa-ink), var(--moa-purple)); }
@media (max-width: 600px) { .home .moa-nav { top: 47px; } }

/* ------------------------------------------------------- breadcrumbs, head */
.breadcrumbs { background: #fff; border-bottom: 1px solid var(--moa-line); font-size: 14px; }
.breadcrumbs__list { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--moa-muted); }
.breadcrumbs__list li { display: inline-flex; align-items: center; }
.breadcrumbs__list li + li::before { content: "›"; margin: 0 10px; color: #b8aecb; }
.breadcrumbs__list a { color: var(--moa-purple); text-decoration: none; }
.breadcrumbs__list a:hover { color: var(--moa-gold); }

.moa-pagehead { padding: 48px 0 28px; text-align: center; }
.moa-pagehead__title { font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 10px; }
.moa-pagehead__desc { max-width: 760px; margin: 0 auto; color: var(--moa-muted); font-size: 18px; }

/* ------------------------------------------------------------ main area */
.center { padding: 32px 0 64px; }
.moa-entry { max-width: 860px; margin: 0 auto; font-size: 17px; }
.moa-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.moa-cols > .site--main:only-child { grid-column: 1 / -1; max-width: 900px; margin: 0 auto; width: 100%; }
@media (max-width: 991px) { .moa-cols { grid-template-columns: minmax(0, 1fr); } }

/* single post */
.article--details { background: #fff; border-radius: 18px; padding: 36px 40px; box-shadow: 0 2px 12px rgba(36, 18, 66, .07); }
.article__item-header { margin-bottom: 22px; }
.article__item-title { font-size: clamp(28px, 3vw, 38px); margin: 0 0 8px; }
.article__time { font-size: 14px; color: var(--moa-muted); text-transform: uppercase; letter-spacing: .06em; }
.article__preview { margin: 0 0 24px; border-radius: 14px; overflow: hidden; }
.article__preview img { display: block; width: 100%; }
.article__body { font-size: 17px; line-height: 1.7; }
.article__body h2 { font-size: 26px; margin-top: 1.6em; }
.article__body h3 { font-size: 21px; margin-top: 1.4em; }
.article__body table td, .article__body table th { border-bottom: 1px solid var(--moa-line); padding: 10px 12px; text-align: left; }
.article__footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--moa-line); }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article__tags a { padding: 5px 14px; border-radius: 999px; background: var(--moa-lav); color: var(--moa-purple); font-weight: 600; font-size: 14px; text-decoration: none; }
.moa-postnav { margin-top: 24px; }
.moa-postnav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.moa-postnav a { display: block; height: 100%; background: #fff; border-radius: 14px; padding: 16px 20px; text-decoration: none; color: var(--moa-ink); font-weight: 700; box-shadow: 0 1px 6px rgba(36, 18, 66, .05); }
.moa-postnav .nav-next { text-align: right; }
.moa-postnav__k { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--moa-gold); margin-bottom: 4px; }
@media (max-width: 767px) {
	.article--details { padding: 24px 20px; border-radius: 14px; }
	.moa-postnav .nav-links { grid-template-columns: 1fr; }
	.moa-postnav .nav-next { text-align: left; }
}

/* sidebar */
.site--sidebar .widget { background: #fff; border-radius: 16px; padding: 22px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(36, 18, 66, .06); }
.site--sidebar .widget__title { font-size: 18px; margin: 0 0 12px; }
.site--sidebar ul { list-style: none; padding: 0; margin: 0; }
.site--sidebar li { padding: 6px 0; border-bottom: 1px solid var(--moa-line); }
.site--sidebar li:last-child { border-bottom: 0; }

/* archive grid */
.moa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.moa-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--moa-line); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(36, 18, 66, .06); transition: transform .2s, box-shadow .2s; }
.moa-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(36, 18, 66, .14); }
.moa-card__ph { display: block; aspect-ratio: 16 / 10; background: var(--moa-lav); border-bottom: 3px solid var(--moa-gold); }
.moa-card__ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moa-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.moa-card__cat { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--moa-gold); }
.moa-card__title { font-size: 19px; margin: 0; }
.moa-card__title a { color: var(--moa-ink); text-decoration: none; }
.moa-card__title a:hover { color: var(--moa-purple); }
.moa-card__ex { font-size: 15px; margin: 0; color: var(--moa-text); }
.moa-card time { margin-top: auto; font-size: 13px; color: var(--moa-muted); }
@media (max-width: 991px) { .moa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .moa-grid { grid-template-columns: 1fr; } }

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--moa-purple); text-decoration: none; font-weight: 700; border: 1px solid var(--moa-line); }
.pagination .page-numbers.current { background: var(--moa-purple); color: #fff; border-color: var(--moa-purple); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--moa-footer); color: #d9d2e9; border-top: 4px solid var(--moa-gold-lt); padding: 56px 0 0; font-size: 15px; }
.footer a { color: #fff; }
.footer a:hover { color: var(--moa-gold-lt); }
.footer__wrap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.footer .widget + .widget { margin-top: 28px; }
.footer .widgettitle:empty { display: none; }
.moa-ftitle, .footer .widget-title, .footer .widgettitle { font-size: 12px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--moa-gold-lt) !important; margin: 0 0 16px; }
.moa-latest__list { list-style: none; margin: 0; padding: 0; }
.moa-latest__list li { padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.moa-latest__list a { display: block; font-weight: 600; line-height: 1.35; text-decoration: none; }
.moa-latest__list time { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #b9aed0; }
.footer__bottom { margin-top: 48px; padding: 22px 0 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #b9aed0; }
@media (max-width: 991px) { .footer__wrap { grid-template-columns: 1fr 1fr; } .footer__col--first { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer__wrap { grid-template-columns: 1fr; } }

.scrollup { position: fixed; right: 20px; bottom: 96px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--moa-purple); color: #fff; font-size: 22px; box-shadow: 0 6px 16px rgba(36, 18, 66, .25); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.scrollup.is-visible { opacity: 1; visibility: visible; transform: none; }
.scrollup:hover { background: var(--moa-gold); }

/* RealtyPress pages */
.moa-rps { padding-top: 24px; }
.moa-rps > .container > .row { display: block; }
.bootstrap-realtypress select.form-control { -webkit-appearance: none; appearance: none; height: 44px; padding: 0 38px 0 16px; border: 1px solid #d9d1e6; border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233b2166' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 15px center; color: var(--moa-text); font-size: 15px; box-shadow: none; }
.bootstrap-realtypress .btn { line-height: 1.4; }

/* comments */
.moa-comments { margin-top: 28px; background: #fff; border-radius: 16px; padding: 24px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
