/* ============================================================
   CebuRealEstate.org — assets/blog.css
   Styles for blog.php and post.php (public blog pages).
   Matches the site's brass/coral design system used by
   header.php and footer.php.

   NOTE: The section marked "SITE CHROME" below styles the
   shared header/footer on blog pages. If your other pages
   already carry canonical styles for these (inline or in a
   shared file), replace that section with your own so the
   header/footer look identical site-wide.
   ============================================================ */

:root {
  --coral: #d97757;
  --brass: #b39b7d;
  --ink: #1f2933;
  --ink-soft: #5b6770;
  --paper: #ffffff;
  --band: #17211c;      /* dark band used by hero/header/footer */
  --rule: #e3e7ea;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--coral); }

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 8px; border: 0;
  font: inherit; font-weight: 600; font-size: 0.93rem;
  cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(217,119,87,.28); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid #c9d0d4; }

/* ---------- SITE CHROME (header/footer support) ----------
   Minimal styling so header.php / footer.php render properly
   on blog pages. Replace with your site's canonical chrome
   styles if they exist elsewhere. */
header .top-bar {
  background: #10160f; color: #cfd6d0;
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end;
  padding: 7px 22px; font-size: 0.8rem;
}
header .top-bar a { color: #cfd6d0; text-decoration: none; }
header .top-bar a:hover { color: #fff; }
header .top-bar i { color: var(--brass); margin-right: 5px; }

.main-nav {
  background: var(--band); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 14px 22px; flex-wrap: wrap;
  position: relative;
}
.main-nav .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.main-nav .logo-img { height: 46px; width: auto; }
.main-nav .tagline { font-size: 0.72rem; color: #bcc7bf; max-width: 220px; line-height: 1.35; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: #e6ebe7; text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 9px 13px; border-radius: 7px;
}
.nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-links a.cta { background: var(--coral); color: #fff; font-weight: 600; }
.search-toggle, .burger {
  background: none; border: 1px solid rgba(255,255,255,.25); color: #e6ebe7;
  border-radius: 7px; padding: 8px 13px; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.burger { display: none; }
.search-panel { display: none; background: #202b24; padding: 16px 22px; }
.search-panel.open { display: block; }
.search-panel-inner { max-width: 720px; margin: 0 auto; }
.search-panel input[type=search] {
  width: 100%; padding: 12px 16px; border-radius: 8px; border: 0;
  font: inherit; font-size: 0.95rem;
}
.search-results a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; color: #e6ebe7; text-decoration: none;
  border-radius: 6px; font-size: 0.9rem;
}
.search-results a:hover { background: rgba(255,255,255,.08); }
.search-results .cat { color: var(--brass); font-size: 0.75rem; }
.search-empty { color: #9fa9a2; font-size: 0.85rem; padding: 10px 12px; }

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; order: 3;
    padding-top: 10px;
  }
  .nav-links.open { display: flex; }
}

/* footer chrome */
footer { background: var(--band); color: #cdd6cf; margin-top: 70px; }
.footer-inquire { max-width: 760px; margin: 0 auto; padding: 60px 22px 20px; text-align: center; }
.footer-inquire h4 { color: #fff; font-size: 1.5rem; margin: 10px 0 26px; }
.inquiry-form { text-align: left; }
.inquiry-form .field { margin-bottom: 16px; }
.inquiry-form label { display: block; font-size: 0.82rem; font-weight: 600; color: #b9c4be; margin-bottom: 7px; }
.inquiry-form input, .inquiry-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #fff; font: inherit; font-size: 0.93rem;
}
.inquiry-form textarea { min-height: 110px; resize: vertical; }
.inquiry-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .inquiry-form .field-row { grid-template-columns: 1fr; } }
.form-alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 18px; }
.form-alert.success { background: rgba(70,160,110,.18); color: #9fdcba; }
.form-alert.error { background: rgba(200,80,60,.18); color: #f0b3a4; }

.footer-grid {
  max-width: 1100px; margin: 0 auto; padding: 50px 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 34px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-col h4 { color: #fff; font-size: 0.95rem; margin: 0 0 14px; }
.footer-col a { display: block; color: #cdd6cf; text-decoration: none; font-size: 0.9rem; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }
.footer-tagline { color: var(--brass); font-size: 0.85rem; font-weight: 600; }
.social-icons { display: flex; gap: 10px; }
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #e6ebe7;
}
.social-icons a:hover { background: var(--coral); color: #fff; }

.agents-footer { max-width: 1100px; margin: 0 auto; padding: 10px 22px 50px; text-align: center; }
.agents-footer h4 { color: #fff; font-size: 1.2rem; margin: 8px 0 26px; }
.agent-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; text-align: left;
}
.agent-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 18px;
}
.agent-card h5 { color: #fff; margin: 0 0 10px; font-size: 0.98rem; }
.agent-card .a-row { display: flex; gap: 9px; align-items: baseline; font-size: 0.84rem; margin-bottom: 6px; }
.agent-card .a-row i { color: var(--brass); width: 15px; }
.agent-card a { color: #cdd6cf; text-decoration: none; }
.agent-card a:hover { color: #fff; }
.agent-card .licenses { margin-top: 10px; }
.agent-card .licenses span { display: block; font-size: 0.75rem; color: #9fa9a2; }
.safety-banner { margin-top: 26px; font-size: 0.82rem; color: var(--brass); font-weight: 600; }
.foot-bottom {
  text-align: center; font-size: 0.78rem; color: #8b958e;
  padding: 18px 22px; border-top: 1px solid rgba(255,255,255,.08);
}

/* ---------- BLOG STRUCTURES (from the reference design) ---------- */

.breadcrumb { background: #f6f7f7; border-bottom: 1px solid var(--rule); }
.breadcrumb-inner {
  max-width: 1100px; margin: 0 auto; padding: 11px 22px;
  font-size: 0.83rem; color: var(--ink-soft);
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--coral); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

.prop-hero {
  position: relative; background: var(--band); color: #fff;
  min-height: 300px; display: flex; align-items: flex-end; overflow: hidden;
}
.prop-hero .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.prop-hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,20,16,.88) 0%, rgba(13,20,16,.35) 60%, rgba(13,20,16,.15) 100%);
}
.prop-hero .hero-content {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; width: 100%;
  padding: 60px 22px 44px;
}
.prop-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.18;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.prop-hero .sub { color: #d6ddd7; max-width: 640px; margin-top: 12px; font-size: 0.98rem; }

section { max-width: 1100px; margin: 0 auto; padding: 48px 22px; }

.catalog-empty {
  text-align: center; padding: 70px 20px; border: 1px dashed #ccd3d7;
  border-radius: 12px; color: var(--ink-soft);
}
.catalog-empty h3 { color: var(--ink); margin: 0 0 8px; }

.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px;
}
.listing-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.listing-card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.12); transform: translateY(-3px); }
.listing-card .photo { aspect-ratio: 16 / 10; background: #eceff0; }
.listing-card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-card .no-photo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #b9c2c6; font-size: 2rem;
}
.listing-card .body { padding: 18px 20px 22px; }
.post-card .date { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.post-card h3 { font-size: 1.08rem; line-height: 1.35; margin: 8px 0 10px; color: var(--ink); }
.post-card .excerpt { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; margin: 0 0 12px; }
.post-card .read-more { font-size: 0.86rem; font-weight: 600; color: var(--coral); }
.post-card .read-more i { font-size: 0.75rem; margin-left: 4px; transition: transform .2s; }
.post-card:hover .read-more i { transform: translateX(4px); }

.pager {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin-top: 42px; font-size: 0.9rem;
}
.pager a, .pager .current {
  padding: 8px 14px; border-radius: 7px; text-decoration: none;
}
.pager a { color: var(--ink); border: 1px solid #cfd6da; }
.pager a:hover { border-color: var(--coral); color: var(--coral); }
.pager .current { background: var(--coral); color: #fff; font-weight: 600; }

/* article body typography */
.post-body {
  max-width: 760px; margin: 0 auto;
  font-size: 1.05rem; line-height: 1.78; color: var(--ink);
}
.post-body h2 { font-size: 1.45rem; line-height: 1.3; margin: 2.1em 0 0.6em; }
.post-body h3 { font-size: 1.15rem; margin: 1.7em 0 0.5em; }
.post-body p { margin: 0 0 1.25em; }
.post-body ul { margin: 0 0 1.25em; padding-left: 1.3em; }
.post-body li { margin-bottom: 0.45em; }
.post-body strong { font-weight: 700; }
.post-body a {
  color: var(--coral); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.post-body a:hover { background: #fbeee8; }

/* CTA band at the end of articles */
.cta-band { text-align: center; }
.section-head h2 { font-size: 1.5rem; margin: 10px 0 10px; }
.section-head p { color: var(--ink-soft); max-width: 560px; margin: 0 auto 26px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* scroll-reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
