/*
Theme Name: Tahani Malla Real Estate
Theme URI: https://tahanimalla.com/
Author: Tahani Malla
Description: Bilingual English and Arabic home buying and selling theme for Guelph and Mississauga, Ontario.
Version: 1.3.1
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: tahani-malla
*/

:root {
  --tm-ink: #2f2118;
  --tm-brown: #5a3b28;
  --tm-brown-dark: #2a1b14;
  --tm-gold: #b38a47;
  --tm-gold-light: #d8bd83;
  --tm-beige: #f3eadb;
  --tm-cream: #fbf7ef;
  --tm-white: #fffdf9;
  --tm-muted: #74675d;
  --tm-border: rgba(90, 59, 40, .16);
  --tm-shadow: 0 20px 55px rgba(62, 42, 28, .12);
  --tm-radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--tm-cream);
  color: var(--tm-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: Tahoma, Arial, sans-serif; }
a { color: var(--tm-brown); text-decoration-thickness: 1px; text-underline-offset: 4px; }
img { max-width: 100%; height: auto; }
.tm-wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.tm-narrow { width: min(820px, calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.tm-topbar { background: var(--tm-brown-dark); color: #f8ead0; font-size: .83rem; letter-spacing: .03em; }
.tm-topbar .tm-wrap { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tm-topbar a { color: inherit; text-decoration: none; }
.tm-header { position: sticky; top: 0; z-index: 50; background: rgba(251,247,239,.96); border-bottom: 1px solid var(--tm-border); backdrop-filter: blur(14px); }
.tm-nav { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.tm-brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; color: var(--tm-ink); text-decoration: none; }
.tm-monogram { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--tm-gold); border-radius: 50%; color: var(--tm-gold); font-family: Georgia, serif; font-size: 1.2rem; }
.tm-brand-text strong { display: block; font-family: Georgia, serif; font-size: 1.22rem; letter-spacing: .02em; }
.tm-brand-text span { display: block; color: var(--tm-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; }
.tm-menu { display: flex; align-items: center; gap: 24px; list-style: none; padding: 0; margin: 0; }
.tm-menu a { color: var(--tm-ink); text-decoration: none; font-size: .9rem; font-weight: 650; }
.tm-menu a:hover, .tm-menu a:focus { color: var(--tm-gold); }
.tm-language { border: 1px solid var(--tm-gold); border-radius: 999px; padding: 7px 13px; color: var(--tm-brown); text-decoration: none; font-size: .83rem; font-weight: 700; white-space: nowrap; }
.tm-menu-toggle { display: none; border: 0; background: transparent; color: var(--tm-brown); font-size: 1.5rem; }

.tm-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #2b1b14 0%, #503424 55%, #8f6d3d 100%); color: white; }
.tm-hero:before { content: ""; position: absolute; inset: 0; opacity: .18; background: radial-gradient(circle at 15% 20%, #fff 0 1px, transparent 2px) 0 0/26px 26px; }
.tm-hero-grid { position: relative; min-height: 660px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: end; gap: 55px; }
.tm-hero-copy { align-self: center; padding-block: 90px; }
.tm-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--tm-gold-light); text-transform: uppercase; font-size: .78rem; font-weight: 750; letter-spacing: .16em; }
.tm-kicker:before { content: ""; width: 38px; height: 1px; background: currentColor; }
.tm-hero h1 { max-width: 800px; margin: 18px 0 22px; font-family: Georgia, serif; font-size: clamp(2.75rem, 6vw, 5.3rem); font-weight: 500; line-height: 1.01; letter-spacing: -.035em; }
.tm-hero p { max-width: 670px; color: #f3e9d9; font-size: 1.12rem; }
.tm-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.tm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 1px solid var(--tm-gold); border-radius: 999px; background: var(--tm-gold); color: #21160f; text-decoration: none; font-weight: 750; }
.tm-btn:hover { background: var(--tm-gold-light); border-color: var(--tm-gold-light); }
.tm-btn-outline { background: transparent; color: white; }
.tm-btn-outline:hover { color: #21160f; }
.tm-portrait-wrap { align-self: end; position: relative; }
.tm-portrait-wrap:before { content: ""; position: absolute; inset: 9% -7% 3% 9%; border: 1px solid rgba(216,189,131,.62); border-radius: 240px 240px 0 0; }
.tm-portrait { position: relative; display: block; width: min(100%, 520px); max-height: 610px; margin-inline: auto; object-fit: cover; object-position: 50% 12%; border-radius: 240px 240px 0 0; filter: saturate(.88) contrast(1.03); }

.tm-trust { background: var(--tm-white); border-bottom: 1px solid var(--tm-border); }
.tm-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.tm-trust-item { padding: 25px 28px; border-inline-end: 1px solid var(--tm-border); }
.tm-trust-item:last-child { border: 0; }
.tm-trust-item strong { display: block; font-family: Georgia, serif; color: var(--tm-brown); font-size: 1.08rem; }
.tm-trust-item span { color: var(--tm-muted); font-size: .84rem; }

.tm-section { padding-block: 92px; }
.tm-section-alt { background: var(--tm-beige); }
.tm-section-dark { background: var(--tm-brown-dark); color: white; }
.tm-section-head { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 38px; }
.tm-section h2, .tm-page-title { margin: 10px 0 14px; font-family: Georgia, serif; font-size: clamp(2.1rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; }
.tm-section-head p { max-width: 610px; color: var(--tm-muted); }
.tm-section-dark .tm-section-head p { color: #d8cbbf; }
.tm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tm-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tm-card { min-height: 100%; padding: 30px; border: 1px solid var(--tm-border); border-radius: var(--tm-radius); background: var(--tm-white); box-shadow: 0 10px 35px rgba(68,45,29,.06); }
.tm-card-icon { width: 45px; height: 45px; display: grid; place-items: center; margin-bottom: 30px; border-radius: 50%; background: var(--tm-beige); color: var(--tm-gold); font-family: Georgia, serif; font-size: 1.2rem; }
.tm-card h3 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 1.48rem; }
.tm-card p { color: var(--tm-muted); }
.tm-card a { font-weight: 750; }

.tm-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.tm-photo-card { position: relative; padding: 18px; border: 1px solid var(--tm-border); border-radius: 260px 260px 24px 24px; background: var(--tm-white); box-shadow: var(--tm-shadow); }
.tm-photo-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 12%; border-radius: 240px 240px 14px 14px; }
.tm-list { padding: 0; list-style: none; }
.tm-list li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--tm-border); }
.rtl .tm-list li { padding: 10px 28px 10px 0; }
.tm-list li:before { content: "✦"; position: absolute; inset-inline-start: 0; color: var(--tm-gold); }

.tm-callout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: 38px 42px; border: 1px solid rgba(216,189,131,.4); border-radius: var(--tm-radius); background: linear-gradient(135deg, rgba(179,138,71,.16), rgba(255,255,255,.04)); }
.tm-callout h2 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 3rem); }
.tm-callout p { margin: 0; color: #d8cbbf; }

.tm-page-hero { padding: 85px 0 65px; background: linear-gradient(120deg, var(--tm-brown-dark), var(--tm-brown)); color: white; }
.tm-page-hero p { max-width: 720px; color: #e6dacc; font-size: 1.08rem; }
.tm-content { padding-block: 70px 100px; }
.tm-content h2, .tm-content h3 { font-family: Georgia, serif; color: var(--tm-brown); line-height: 1.2; }
.tm-content h2 { margin-top: 2.2em; font-size: 2rem; }
.tm-content h3 { margin-top: 1.7em; font-size: 1.35rem; }
.tm-content blockquote { margin: 30px 0; padding: 25px 30px; border-inline-start: 4px solid var(--tm-gold); background: var(--tm-beige); }
.tm-content .tm-card { margin: 30px 0; }

.tm-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tm-post { overflow: hidden; border: 1px solid var(--tm-border); border-radius: var(--tm-radius); background: var(--tm-white); }
.tm-post-body { padding: 27px; }
.tm-post-meta { color: var(--tm-gold); text-transform: uppercase; font-size: .72rem; font-weight: 750; letter-spacing: .12em; }
.tm-post h2, .tm-post h3 { margin: 10px 0 12px; font-family: Georgia, serif; line-height: 1.2; }
.tm-post p { color: var(--tm-muted); }

.tm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tm-field { display: grid; gap: 7px; }
.tm-field-full { grid-column: 1 / -1; }
.tm-field label { font-size: .84rem; font-weight: 750; }
.tm-field input, .tm-field select, .tm-field textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--tm-border); border-radius: 12px; background: var(--tm-white); color: var(--tm-ink); font: inherit; }
.tm-field textarea { min-height: 150px; resize: vertical; }
.tm-consent { font-size: .78rem; color: var(--tm-muted); }
.tm-notice { padding: 14px 18px; margin-bottom: 24px; border-radius: 12px; background: #e5f4e8; color: #1e5d2a; }

.tm-footer { padding: 70px 0 25px; background: #21150f; color: #e9dece; }
.tm-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; }
.tm-footer h2, .tm-footer h3 { color: var(--tm-gold-light); font-family: Georgia, serif; }
.tm-footer a { color: #f4eadb; }
.tm-footer ul { list-style: none; padding: 0; }
.tm-footer li { margin: 8px 0; }
.tm-disclaimer { margin-top: 45px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #b9aa9d; font-size: .75rem; }

.tm-whatsapp {
  position: fixed;
  z-index: 100;
  inset-inline-end: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--tm-brown-dark);
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px) scale(.94);
  animation: tm-whatsapp-enter .65s cubic-bezier(.2,.8,.2,1) 1s forwards;
}
.tm-whatsapp-label {
  max-width: 310px;
  padding: 11px 15px;
  border: 1px solid rgba(179,138,71,.5);
  border-radius: 999px;
  background: rgba(251,247,239,.96);
  box-shadow: 0 8px 24px rgba(42,27,20,.18);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.45;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: tm-whatsapp-greeting 8s ease 1.35s forwards;
}
.tm-whatsapp-icon {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid var(--tm-gold-light);
  border-radius: 50%;
  background: #1f9d55;
  color: white;
  box-shadow: 0 10px 30px rgba(42,27,20,.3);
  transition: transform .2s ease, background .2s ease;
}
.tm-whatsapp-icon:before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(31,157,85,.42);
  border-radius: inherit;
  animation: tm-whatsapp-pulse 2.4s ease-out infinite;
}
.tm-whatsapp svg { width: 32px; height: 32px; }
.tm-whatsapp:hover .tm-whatsapp-icon,
.tm-whatsapp:focus-visible .tm-whatsapp-icon { transform: translateY(-3px) scale(1.04); background: #168746; }
.tm-whatsapp:hover .tm-whatsapp-label,
.tm-whatsapp:focus-visible .tm-whatsapp-label { opacity: 1; visibility: visible; transform: translateX(-3px); box-shadow: 0 12px 30px rgba(42,27,20,.24); animation: none; }
.rtl .tm-whatsapp:hover .tm-whatsapp-label,
.rtl .tm-whatsapp:focus-visible .tm-whatsapp-label { transform: translateX(3px); }
.tm-whatsapp:focus-visible { outline: 3px solid var(--tm-gold); outline-offset: 5px; border-radius: 999px; }

@keyframes tm-whatsapp-enter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tm-whatsapp-pulse {
  0%, 55% { opacity: .8; transform: scale(.82); }
  90%, 100% { opacity: 0; transform: scale(1.28); }
}
@keyframes tm-whatsapp-greeting {
  0%, 78% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 900px) {
  .tm-menu-toggle { display: block; }
  .tm-menu { display: none; position: absolute; top: 82px; inset-inline: 20px; flex-direction: column; align-items: stretch; padding: 20px; border: 1px solid var(--tm-border); border-radius: 14px; background: var(--tm-white); box-shadow: var(--tm-shadow); }
  .tm-menu.is-open { display: flex; }
  .tm-language { margin-inline-start: 0; }
  .tm-hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .tm-hero-copy { padding: 75px 0 20px; }
  .tm-portrait { max-height: 480px; width: min(420px, 90%); }
  .tm-trust-grid, .tm-grid-3, .tm-grid-2, .tm-posts { grid-template-columns: 1fr; }
  .tm-trust-item { border-inline-end: 0; border-bottom: 1px solid var(--tm-border); }
  .tm-split { grid-template-columns: 1fr; gap: 40px; }
  .tm-footer-grid { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 620px) {
  .tm-wrap, .tm-narrow { width: min(100% - 28px, 1180px); }
  .tm-topbar .tm-wrap { justify-content: center; text-align: center; }
  .tm-topbar span:last-child { display: none; }
  .tm-brand-text span { display: none; }
  .tm-section { padding-block: 65px; }
  .tm-section-head { display: block; }
  .tm-callout { grid-template-columns: 1fr; padding: 28px; }
  .tm-form { grid-template-columns: 1fr; }
  .tm-field-full { grid-column: auto; }
  .tm-whatsapp { inset-inline-end: 14px; bottom: 14px; }
  .tm-whatsapp-label { max-width: min(270px, calc(100vw - 92px)); border-radius: 18px; font-size: .76rem; }
  .tm-whatsapp-icon { width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-whatsapp { opacity: 1; transform: none; animation: none; }
  .tm-whatsapp-icon:before, .tm-whatsapp-label { animation: none; }
}
