/*
Theme Name: Habayit Blog Theme
Description: Custom theme matching Habayit Home Loans GHL site design
Version: 1.0
Author: Merkava
Text Domain: habayit-blog
*/

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;500;600;700&display=swap');

:root {
  --brand-green: #029344;
  --brand-navy: #1a3c6e;
  --body-text: #333333;
  --heading-text: #607179;
  --meta-text: #666666;
  --muted-text: #7c7c7c;
  --surface: #ffffff;
  --card-surface: #fafbfb;
  --surface-subtle: #f5f5f5;
  --surface-footer: #f0f0f0;
  --border-light: #eeeeee;
  --border-divider: #e0e0e0;
  --max-width: 1220px;
  --content-width: 650px;
  --more-link: #188bf6;
  --shadow-soft: 0 1px 2px rgba(17, 24, 39, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--surface);
  color: var(--body-text);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.site-logo img {
  height: 130px;
  width: auto;
}

a {
  color: var(--brand-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid #ececec;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max-width);
  min-height: 130px;
  padding: 20px 28px;
}

.site-logo {
  color: var(--brand-green);
  display: inline-flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 700;
  gap: 2px;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-decoration: none;
  text-transform: uppercase;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo-mark {
  color: var(--brand-green);
  font-size: 20px;
  letter-spacing: 0.03em;
}

.site-logo-accent {
  color: var(--brand-navy);
}

.site-logo-subtext {
  color: var(--brand-navy);
  letter-spacing: 0.18em;
}

.main-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 18px;
}

.main-nav-links {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.main-nav a {
  color: #000000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--brand-green);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  left: 50%;
  min-width: 160px;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  font-size: 14px;
  padding: 8px 16px;
}

.nav-dropdown-menu a:hover {
  background: #f5f5f5;
  text-decoration: none;
}

.btn-apply {
  background: #029344;
  border-radius: 15px;
  color: #ffffff !important;
  display: inline-flex;
  font-size: 20px;
  font-weight: 700;
  padding: 10px 20px;
  text-align: center;
}

.btn-apply:hover {
  background: #027a39;
  text-decoration: none;
}

.site-main {
  margin: 0 auto;
  max-width: var(--max-width);
  min-height: 40vh;
  padding: 26px 28px 54px;
}

.blog-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 auto;
}

.post-card {
  background: var(--card-surface);
  border: 1px solid #eeeeee;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.post-card-wrapper {
  padding: 16px;
  width: 33.333%;
  box-sizing: border-box;
}

.post-card-image,
.post-card-placeholder {
  background: linear-gradient(135deg, #edf4ee 0%, #e2ecf6 100%);
  aspect-ratio: 1.9 / 1;
  object-fit: cover;
  width: 100%;
}

.post-card-placeholder {
  align-items: center;
  color: rgba(27, 107, 58, 0.25);
  display: flex;
  font-size: 46px;
  font-weight: 700;
  justify-content: center;
}

.post-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

.post-card-title {
  color: #000000;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: var(--brand-green);
  text-decoration: none;
}

.post-card-excerpt {
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
}

.post-card-excerpt .post-card-more {
  color: var(--more-link);
  font-size: 14px;
  font-weight: 400;
}

.post-card-meta {
  border-top: 1px solid #eeeeee;
  margin-top: auto;
  padding-top: 12px;
}

.post-card-category {
  color: #111827;
  display: inline-block;
  font-size: 14px;
  margin-bottom: 4px;
}

.post-card-date {
  color: #111827;
  display: block;
  font-size: 14px;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.page-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  min-width: 36px;
  padding: 6px 12px;
}

.page-btn:hover:not([disabled]):not(.active) {
  background: #f3f4f6;
}

.page-btn.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
  font-weight: 600;
}

.page-btn[disabled] {
  color: #9ca3af;
  cursor: default;
  opacity: 0.6;
}

.prev-btn,
.next-btn {
  font-weight: 500;
}

.single-post-shell,
.page-shell {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  width: 100%;
}

.single-post-content,
.page-content {
  max-width: var(--content-width);
  width: 100%;
}

.single-post-content .entry-title,
.page-content .entry-title {
  color: #202124;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 12px;
}

.single-post-content .entry-meta {
  margin-bottom: 6px;
}

.single-post-content .entry-meta a {
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 700;
}

.single-post-content .entry-date {
  color: var(--meta-text);
  font-size: 12px;
  margin-bottom: 28px;
}

.entry-featured-image {
  margin-bottom: 24px;
}

.entry-featured-image img {
  border-radius: 0;
  width: 100%;
}

.single-post-content .entry-content,
.page-content .entry-content {
  color: var(--body-text);
  font-size: 14px;
}

.single-post-content .entry-content > * + *,
.page-content .entry-content > * + * {
  margin-top: 16px;
}

.single-post-content .entry-content h2,
.page-content .entry-content h2 {
  color: #000000;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 6px;
}

.single-post-content .entry-content h3,
.page-content .entry-content h3 {
  color: #222222;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 24px;
}

.single-post-content .entry-content p,
.page-content .entry-content p,
.single-post-content .entry-content li,
.page-content .entry-content li {
  font-size: 14px;
  line-height: 1.7;
}

.single-post-content .entry-content ul,
.single-post-content .entry-content ol,
.page-content .entry-content ul,
.page-content .entry-content ol {
  margin-left: 20px;
}

.single-post-content .entry-content hr,
.page-content .entry-content hr {
  border: 0;
  border-top: 1px solid var(--border-divider);
  margin: 24px 0;
}

.post-contact-cta {
  background: #f7f7f7;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  margin-top: 32px;
  padding: 18px 20px;
}

.post-contact-cta h3 {
  color: #222222;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.post-contact-cta p {
  margin: 0;
}

.post-tags {
  border-top: 1px solid var(--border-divider);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
}

.post-tags a {
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--meta-text);
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
}

.back-to-blog {
  margin-top: 22px;
}

.back-to-blog a {
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-divider);
  margin-top: 48px;
}

.footer-inner,
.footer-accessibility,
.footer-legal,
.footer-bottom {
  margin: 0 auto;
  max-width: 1170px;
  padding-left: 28px;
  padding-right: 28px;
}

.footer-inner {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr 1.5fr 1fr;
  padding-bottom: 24px;
  padding-top: 32px;
}

.footer-col h3 {
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-accessibility h3 {
  color: #1f1f1f;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-col p,
.footer-col a {
  color: var(--body-text);
  font-size: 18px;
  line-height: 1.6;
}

.footer-accessibility p,
.footer-legal p,
.footer-bottom p {
  color: var(--body-text);
  font-size: 11px;
  line-height: 1.6;
}

.contact-person {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 2px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  color: var(--brand-green);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-logo img {
  height: 150px;
  width: 150px;
  object-fit: contain;
}

.footer-logo span {
  color: var(--brand-navy);
}

.footer-compliance-logos {
  align-items: center;
  display: flex;
  gap: 10px;
}

.footer-compliance-logos img {
  max-height: 80px;
  width: auto;
}

.compliance-badge {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  color: #1f1f1f;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  justify-content: center;
  min-height: 34px;
  min-width: 52px;
  padding: 6px 8px;
  text-transform: uppercase;
}

.compliance-badge-kfi {
  color: #a22124;
}

.footer-social-list,
.footer-link-list,
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.footer-social-list a,
.footer-link-list a,
.footer-contact-list a {
  font-size: 18px;
  text-decoration: none;
}

.footer-social-list a:hover,
.footer-link-list a:hover,
.footer-contact-list a:hover {
  color: var(--brand-green);
  text-decoration: none;
}

.social-link {
  align-items: center;
  color: #000000;
  display: inline-flex;
  font-size: 18px;
  font-weight: 500;
  gap: 8px;
}

.social-link-icon,
.contact-icon {
  align-items: center;
  color: #1f1f1f;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.contact-line {
  align-items: center;
  display: flex;
  gap: 8px;
}

.contact-line svg {
  flex-shrink: 0;
}

.contact-line-address {
  align-items: flex-start;
}

.contact-line-address svg {
  margin-top: 5px;
}

.contact-line span {
  color: var(--body-text);
  font-size: 18px;
  line-height: 1.6;
}

.footer-accessibility {
  border-top: 1px solid var(--border-divider);
  padding-bottom: 12px;
  padding-top: 14px;
  text-align: center;
}

.footer-accessibility p {
  font-size: 10px;
}

.footer-legal {
  border-top: 1px solid var(--border-divider);
  padding-bottom: 16px;
  padding-top: 12px;
  text-align: center;
}

.footer-legal p {
  color: var(--meta-text);
  font-size: 9px;
  margin-bottom: 10px;
}

.footer-legal .legal-italic {
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid var(--border-divider);
  padding-bottom: 14px;
  padding-top: 10px;
  text-align: center;
}

.footer-bottom p {
  color: var(--meta-text);
  font-size: 9px;
}

/* Hamburger button — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}
.hamburger-bar {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--brand-navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .blog-grid {
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .header-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0 8px;
    border-top: 1px solid #e0e0e0;
    margin-top: 12px;
    order: 4;
  }

  .main-nav.nav-open {
    display: flex;
  }

  .main-nav-links {
    flex-direction: column;
    gap: 0;
  }

  .main-nav-links > a,
  .main-nav-links .nav-dropdown > a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
  }

  .nav-dropdown-menu a {
    padding: 10px 0;
    font-size: 14px;
  }

  .btn-apply {
    font-size: 14px;
    padding: 8px 14px;
    order: 3;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .site-main,
  .footer-inner,
  .footer-accessibility,
  .footer-legal,
  .footer-bottom,
  .header-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .blog-grid {
    justify-content: center;
  }

  .post-card-wrapper {
    width: 100%;
  }

  .post-card {
    width: 100%;
  }

  .post-card-image,
  .post-card-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 1.9 / 1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .single-post-content .entry-title,
  .page-content .entry-title {
    font-size: 28px;
  }
}
