/*
Theme Name: HomeMendWise Child
Theme URI: https://homemendwise.com/
Description: Premium editorial child theme for HomeMendWise, built on GeneratePress.
Author: HomeMendWise
Template: generatepress
Version: 1.2.0
Text Domain: homemendwise
*/

:root {
  --hmw-navy: #0E2A47;
  --hmw-navy-deep: #081D32;
  --hmw-gold: #C9A24D;
  --hmw-gold-soft: #E5C979;
  --hmw-teal: #4F8A8B;
  --hmw-text: #46515C;
  --hmw-muted: #6F7C87;
  --hmw-line: #E3E9ED;
  --hmw-light: #F7F9FA;
  --hmw-white: #FFFFFF;
  --hmw-radius: 14px;
  --hmw-shadow: 0 16px 40px rgba(14, 42, 71, 0.10);
  --hmw-header-height: 100px;
}

html { scroll-behavior: smooth; }
body {
  color: var(--hmw-text);
  background: var(--hmw-white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title {
  color: var(--hmw-navy);
  font-family: Lora, Georgia, serif;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

a { color: var(--hmw-navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--hmw-teal); }

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  background: rgba(255,255,255,.985);
  border-bottom: 1px solid var(--hmw-line);
  box-shadow: 0 3px 18px rgba(14,42,71,.035);
}
.inside-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  max-width: 1240px;
  padding: 17px 28px;
  min-height: 98px;
}
.site-logo { flex: 0 0 auto; }
.site-logo a { display: block; line-height: 0; }
.site-logo .header-image {
  display: block;
  width: 390px;
  max-width: 35vw;
  height: auto;
  max-height: 86px;
  object-fit: contain;
}
.site-branding { margin-right: 0; }

/* Hide GeneratePress' default navigation: v1.1 renders a controlled branded header nav. */
.main-navigation { display: none !important; }

.hmw-header-nav {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.hmw-nav-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hmw-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.hmw-nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--hmw-navy);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}
.hmw-nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--hmw-gold);
  transition: transform .18s ease;
}
.hmw-nav-links a:hover,
.hmw-nav-links a:focus { color: var(--hmw-teal); }
.hmw-nav-links a:hover::after,
.hmw-nav-links a:focus::after { transform: scaleX(1); }

.hmw-search-toggle,
.hmw-menu-toggle {
  appearance: none;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--hmw-navy);
  padding: 0;
  margin: 0;
}
.hmw-search-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hmw-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.hmw-search-toggle:hover,
.hmw-search-toggle:focus {
  background: var(--hmw-light);
  border-color: #D3DEE4;
  color: var(--hmw-teal);
}
.hmw-search-toggle svg { width: 19px; height: 19px; }
.hmw-menu-toggle { display: none; cursor: pointer; }
.hmw-menu-toggle-icon { width: 24px; display: grid; gap: 5px; }
.hmw-menu-toggle-icon span { display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }

.hmw-header-search {
  display: none;
  position: absolute;
  z-index: 130;
  right: 0;
  top: calc(100% + 14px);
  width: min(390px, 88vw);
  padding: 12px;
  border: 1px solid var(--hmw-line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 18px 48px rgba(14,42,71,.16);
}
.hmw-header-nav.is-search-open .hmw-header-search { display: flex; gap: 8px; }
.hmw-header-search input[type="search"] {
  min-width: 0;
  flex: 1 1 auto;
  border: 1px solid #D8E1E6;
  border-radius: 8px;
  background: #FBFCFD;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--hmw-text);
}
.hmw-header-search button {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

/* General layout */
.site-content { padding-top: 38px; }
.grid-container { max-width: 1180px; }
.content-area .site-main { margin: 0; }
.inside-article { padding: 0; }

.single .site-content,
.page:not(.home) .site-content { max-width: 900px; }
.single .inside-article,
.page:not(.home) .inside-article { padding: 22px 18px 60px; }

.entry-title { font-size: clamp(2.2rem, 4vw, 3.6rem); margin-bottom: 16px; }
.entry-meta { color: var(--hmw-muted); font-size: 14px; margin-bottom: 28px; }
.entry-content { font-size: 18px; }
.entry-content h2 { margin-top: 2.2em; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.entry-content h3 { margin-top: 1.8em; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.entry-content p { margin-bottom: 1.35em; }
.entry-content ul, .entry-content ol { margin-left: 1.2em; }
.entry-content blockquote {
  border-left: 4px solid var(--hmw-gold);
  background: var(--hmw-light);
  padding: 20px 24px;
  margin: 32px 0;
  color: var(--hmw-navy);
}
.entry-content table {
  border: 1px solid var(--hmw-line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 16px;
}
.entry-content th { background: var(--hmw-navy); color: white; }
.entry-content th, .entry-content td { padding: 12px 14px; border-color: var(--hmw-line); }

/* Buttons */
.button, button, input[type="submit"], .wp-block-button__link, .hmw-button {
  background: var(--hmw-navy);
  color: white !important;
  border: 1px solid var(--hmw-navy);
  border-radius: 8px;
  padding: 13px 22px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover, button:hover, input[type="submit"]:hover, .wp-block-button__link:hover, .hmw-button:hover {
  background: var(--hmw-navy-deep);
  border-color: var(--hmw-navy-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(14,42,71,.16);
}

/* Front page */
.hmw-home { margin-top: -38px; }
.hmw-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F7F9FA 0%, #FFFFFF 54%, #F1F6F6 100%);
  border-bottom: 1px solid var(--hmw-line);
}
.hmw-hero::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -160px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,77,.13), rgba(201,162,77,0) 68%);
  pointer-events: none;
}
.hmw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.hmw-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 62px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 84px;
}
.hmw-hero-inner { max-width: 740px; }
.hmw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--hmw-teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hmw-eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--hmw-gold); }
.hmw-hero h1 {
  font-size: clamp(3rem, 4.35vw, 3.75rem);
  line-height: 1.16;
  margin: 0 0 22px;
  max-width: 760px;
}
.hmw-hero p {
  font-size: clamp(1.05rem, 1.7vw, 1.23rem);
  max-width: 670px;
  color: var(--hmw-text);
  margin-bottom: 30px;
}
.hmw-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hmw-button-secondary { background: transparent; color: var(--hmw-navy) !important; }
.hmw-button-secondary:hover { color: white !important; }

.hmw-hero-card {
  position: relative;
  padding: 28px 27px 24px;
  border: 1px solid #DCE5E9;
  border-top: 3px solid var(--hmw-gold);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 55px rgba(14,42,71,.10);
  backdrop-filter: blur(4px);
}
.hmw-hero-card-kicker {
  color: var(--hmw-teal);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hmw-hero-card h2 {
  margin: 0 0 22px;
  font-size: 1.33rem;
  line-height: 1.38;
}
.hmw-hero-steps { display: grid; gap: 0; }
.hmw-hero-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--hmw-line);
}
.hmw-hero-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F2F7F7;
  color: var(--hmw-teal);
  font-size: 11px;
  font-weight: 800;
}
.hmw-hero-step strong {
  display: block;
  margin-bottom: 2px;
  color: var(--hmw-navy);
  font-size: 14px;
}
.hmw-hero-step p {
  margin: 0;
  color: var(--hmw-muted);
  font-size: 12.5px;
  line-height: 1.52;
}

.hmw-section { padding: 78px 0; }
.hmw-section-alt { background: var(--hmw-light); border-top: 1px solid var(--hmw-line); border-bottom: 1px solid var(--hmw-line); }
.hmw-section-head { max-width: 720px; margin-bottom: 34px; }
.hmw-section-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 12px; }
.hmw-section-head p { margin: 0; color: var(--hmw-muted); font-size: 18px; }

.hmw-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.hmw-card {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid var(--hmw-line);
  background: white;
  border-radius: var(--hmw-radius);
  padding: 28px;
  min-height: 240px;
  text-decoration: none;
  box-shadow: 0 2px 3px rgba(14,42,71,.02);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hmw-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hmw-gold), var(--hmw-gold-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.hmw-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hmw-shadow);
  border-color: #D3DEE4;
}
.hmw-card:hover::before { transform: scaleX(1); }
.hmw-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--hmw-navy);
  background: #F3F7F8;
  border: 1px solid #DCE6E8;
  margin-bottom: 24px;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.hmw-card:hover .hmw-card-icon { color: var(--hmw-teal); background: #F8FAFA; border-color: #C9D9DC; }
.hmw-card-icon svg { width: 25px; height: 25px; }
.hmw-card h3 { margin: 0 0 10px; font-size: 1.42rem; }
.hmw-card p { color: var(--hmw-muted); margin: 0; font-size: 15.5px; line-height: 1.65; }

/* Editorial latest-guide cards: intentionally image-free to avoid decorative filler imagery. */
.hmw-post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.hmw-post-card {
  position: relative;
  background: white;
  border: 1px solid var(--hmw-line);
  border-radius: var(--hmw-radius);
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(14,42,71,.025);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hmw-post-card::before {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin: 0 0 0 24px;
  background: var(--hmw-gold);
}
.hmw-post-card:hover { transform: translateY(-3px); border-color: #D4DEE4; box-shadow: 0 13px 32px rgba(14,42,71,.08); }
.hmw-post-card-body { padding: 22px 24px 24px; }
.hmw-post-card .hmw-kicker { color: var(--hmw-teal); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.hmw-post-card h3 { font-size: 1.38rem; margin: 9px 0 12px; line-height: 1.34; }
.hmw-post-card h3 a { text-decoration: none; }
.hmw-post-card p { color: var(--hmw-muted); font-size: 14.5px; margin: 0 0 18px; }
.hmw-read-link { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; font-weight: 750; text-decoration: none; color: var(--hmw-navy); }
.hmw-read-link span { transition: transform .18s ease; }
.hmw-read-link:hover span { transform: translateX(3px); }

.hmw-trust {
  position: relative;
  overflow: hidden;
  background: var(--hmw-navy);
  color: white;
  padding: 66px 0;
}
.hmw-trust::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -230px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,138,139,.2), rgba(79,138,139,0) 67%);
  pointer-events: none;
}
.hmw-trust-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 58px; align-items: center; }
.hmw-trust-kicker { color: var(--hmw-gold-soft); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.hmw-trust h2 { color: white; font-size: clamp(2rem,4vw,3rem); margin: 0 0 14px; }
.hmw-trust p { color: #DCE6EC; margin: 0; font-size: 17px; max-width: 650px; }
.hmw-trust-list { list-style: none; margin: 0; padding: 0; }
.hmw-trust-list li { padding: 10px 0 10px 30px; position: relative; color: #EEF4F7; }
.hmw-trust-list li::before { content: "✓"; position: absolute; left: 0; color: var(--hmw-gold-soft); font-weight: 900; }

/* Archive cards */
.blog .post, .archive .post, .search .post {
  border-bottom: 1px solid var(--hmw-line);
  padding: 30px 0 38px;
  margin-bottom: 0;
}
.blog .entry-title, .archive .entry-title, .search .entry-title { font-size: clamp(1.7rem,3vw,2.25rem); }

/* Footer */
.site-footer { background: #0A2037; color: #C9D5DC; }
.footer-widgets { background: #0A2037; color: #C9D5DC; padding-top: 52px; padding-bottom: 38px; }
.footer-widgets .widget-title { color: white; font-family: Lora, Georgia, serif; font-size: 1.25rem; }
.footer-widgets a { color: #E6EDF1; text-decoration: none; }
.footer-widgets a:hover { color: var(--hmw-gold-soft); }
.site-info { background: #071A2C; color: #B6C4CC; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.site-info a { color: #DDE7EC; }

/* Focus and accessibility */
:focus-visible { outline: 3px solid rgba(201,162,77,.55); outline-offset: 3px; }

@media (max-width: 1180px) {
  .site-logo .header-image { width: 340px; max-width: 37vw; }
  .hmw-nav-links a { padding-left: 9px; padding-right: 9px; font-size: 13px; }
}

@media (max-width: 1080px) {
  .inside-header { min-height: 82px; padding: 12px 22px; }
  .site-logo .header-image { width: 330px; max-width: 58vw; max-height: 72px; }
  .hmw-menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hmw-line);
    border-radius: 9px;
  }
  .hmw-nav-panel {
    display: none;
    position: absolute;
    z-index: 120;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 36px));
    padding: 12px;
    border: 1px solid var(--hmw-line);
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 52px rgba(14,42,71,.16);
  }
  .hmw-header-nav.is-menu-open .hmw-nav-panel { display: block; }
  .hmw-nav-links { display: grid; gap: 2px; }
  .hmw-nav-links a { min-height: 46px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
  .hmw-nav-links a::after { display: none; }
  .hmw-nav-links a:hover, .hmw-nav-links a:focus { background: var(--hmw-light); }
  .hmw-search-toggle { margin: 8px 0 0; width: 100%; height: 44px; border-radius: 8px; }
  .hmw-header-search {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
    border-radius: 8px;
  }
  .hmw-hero-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 38px; }
  .hmw-hero h1 { font-size: clamp(2.75rem, 5.7vw, 3.5rem); }
  .hmw-card-grid { grid-template-columns: repeat(2,1fr); }
  .hmw-post-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
  .hmw-hero-layout { grid-template-columns: 1fr; gap: 34px; padding-top: 66px; padding-bottom: 62px; }
  .hmw-hero-inner { max-width: 760px; }
  .hmw-hero-card { max-width: 640px; }
  .hmw-trust-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .inside-header { min-height: 72px; padding: 10px 18px; gap: 18px; }
  .site-logo .header-image { width: 275px; max-width: 68vw; max-height: 60px; }
  .hmw-menu-toggle { width: 42px; height: 42px; }
  .hmw-wrap { padding-left: 20px; padding-right: 20px; }
  .hmw-hero-layout { padding-top: 58px; padding-bottom: 56px; }
  .hmw-hero h1 { font-size: clamp(2.5rem, 10vw, 3.2rem); }
  .hmw-section { padding: 58px 0; }
  .hmw-card-grid, .hmw-post-grid, .hmw-trust-grid { grid-template-columns: 1fr; }
  .hmw-card { min-height: 0; }
  .single .inside-article, .page:not(.home) .inside-article { padding-left: 4px; padding-right: 4px; }
  .entry-content { font-size: 17px; }
}

@media (max-width: 520px) {
  .site-logo .header-image { width: 225px; max-width: 66vw; }
  .hmw-hero-actions { display: grid; grid-template-columns: 1fr; }
  .hmw-button { text-align: center; }
  .hmw-header-search { flex-direction: column; }
  .hmw-header-search button { width: 100%; }
}

/* v1.2: Keep the header search icon visible on the white header.
   GeneratePress/general button rules can otherwise force the icon to white. */
.hmw-header-nav .hmw-search-toggle {
  background: var(--hmw-white) !important;
  color: var(--hmw-navy) !important;
  border-color: var(--hmw-line) !important;
}
.hmw-header-nav .hmw-search-toggle svg {
  display: block;
  stroke: currentColor !important;
}
.hmw-header-nav .hmw-search-toggle:hover,
.hmw-header-nav .hmw-search-toggle:focus-visible {
  background: var(--hmw-light) !important;
  color: var(--hmw-teal) !important;
  border-color: #D3DEE4 !important;
}
