/* =============================================================================
   OC Rental Data — Shared Components
   Components used on 2+ pages. Page-unique components stay inline.
   Tokens come from main.css. Loaded by sub-sections/head.php after main.css.
   ============================================================================= */

/* ── Section header pattern ───────────────────────────────────────────────── */
/* Used by: pricing-your-rental, rent-by-property-type, historical-trends, index */

.section-header { margin-bottom: 2rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

.section-label {
  display: inline-block;
  background: var(--pri-l);
  color: var(--pri);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.section-sub {
  color: var(--gray);
  font-size: .97rem;
  max-width: 660px;
}

/* ── FAQ accordion (text-only, padded list) ───────────────────────────────── */
/* Used by: market-trends, landlord-resources, city-profiles */

.faq            { margin: 3rem 0; }
.faq-item       { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1rem; overflow: hidden; background: #fff; }
.faq-q          { background: var(--light); padding: 1rem 1.2rem; font-weight: 600; color: var(--pri); font-size: .97rem; }
.faq-a          { padding: 1rem 1.2rem; font-size: .93rem; line-height: 1.7; color: var(--dark); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
/* .btn         — accent gold (cta) — used by market-trends, landlord-resources, city-profiles
   .btn-primary — pri brand (cta)   — used by index, pricing-your-rental
   .btn-outline — outlined ghost     — used by market-trends, landlord-resources */

.btn,
.btn-primary,
.btn-outline {
  display: inline-block;
  font-weight: 700;
  padding: .8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn               { background: var(--accent); color: #fff; }
.btn:hover         { opacity: .92; }
.btn-primary       { background: var(--pri); color: #fff; }
.btn-primary:hover { background: var(--pri-d); }
.btn-outline       { background: transparent; color: var(--pri); border-color: var(--pri); }
.btn-outline:hover { background: var(--pri); color: #fff; }

/* ── Visually-hidden a11y helper ──────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout primitive ─────────────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

main section { padding: 3.5rem 0; }
main section:nth-child(even):not(.cta-banner):not(.hero) { background: var(--light); }

/* ── Hero pattern ─────────────────────────────────────────────────────────── */
/* Used by: rental-amenities-roi, rental-pricing-mistakes, seasonal-rental-pricing,
   when-to-raise-rent, landlord-tips, and others. Pages with custom heroes
   (homepage, market-trends, calculator, charts) override inline. */

.hero {
  background: linear-gradient(145deg, #001e4a 0%, var(--pri-d) 45%, var(--pri) 100%);
  color: #fff;
  padding: 3.5rem 1.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg     { position: absolute; inset: 0; opacity: .35; z-index: 0; pointer-events: none; }
.hero-inner  { max-width: 1140px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1     { font-size: clamp(1.65rem, 3.5vw, 2.55rem); font-weight: 900; line-height: 1.15; margin-bottom: .75rem; }
.hero h1 span{ color: var(--accent); }
.hero p, .hero-sub { font-size: 1.05rem; opacity: .9; max-width: 720px; line-height: 1.65; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.92);
}
.hero-eyebrow .dot,
.dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: dot-pulse 2s infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(.85); }
}

.hero .badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .75rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Tables (data + comparison) ───────────────────────────────────────────── */
/* Used by ~10 pages. Page can override with inline if needed. */

.tbl-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  background: #fff;
}
.tbl-wrap table { width: 100%; border-collapse: collapse; background: #fff; font-size: .88rem; }
.tbl-wrap thead { background: var(--pri); color: #fff; }
.tbl-wrap thead th {
  padding: .8rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbl-wrap thead th:not(:first-child) { text-align: right; }
.tbl-wrap tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.tbl-wrap tbody tr:last-child { border-bottom: none; }
.tbl-wrap tbody tr:hover { background: var(--pri-l); }
.tbl-wrap tbody td { padding: .75rem 1rem; white-space: nowrap; }
.tbl-wrap tbody td:not(:first-child) { text-align: right; }

.tbl-note { font-size: .78rem; color: var(--gray); font-style: italic; margin-top: .75rem; }

/* Row tints (used in amenities ROI, when-to-raise-rent, etc.) */
.amen-high  { background: var(--green-l) !important; }
.amen-mid   { background: #fef9c3 !important; }
.row-danger { background: var(--red-l) !important; }
.row-safe   { background: var(--green-l) !important; }

/* Cell helpers */
.td-type    { font-weight: 700; color: var(--gray-d); }
.td-type small { display: block; font-weight: 400; color: var(--gray); font-size: .78rem; }
.td-price   { font-weight: 700; color: var(--pri); }

/* ── Clickable table rows ─────────────────────────────────────────────────── */
tr.row-link              { cursor: pointer; transition: background .12s, transform .12s; }
tr.row-link:hover        { background: var(--pri-l); }
tr.row-link:focus-visible{ outline: 2px solid var(--pri); outline-offset: -2px; background: var(--pri-l); }
tr.row-link td a         { color: inherit; text-decoration: none; }
tr.row-link td a:hover   { color: var(--pri); }

/* ── "Premium" feature card grid (used by amenities ROI + rent-by-property-type) */
.premium-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}
@media (max-width: 680px) { .premium-grid { grid-template-columns: 1fr; } }
.premium-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.premium-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: .1rem; }
.premium-card h3 { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: .35rem; }
.premium-card .add-val { font-size: 1.2rem; font-weight: 900; color: var(--green); margin-bottom: .35rem; }
.premium-card p { font-size: .88rem; color: var(--gray-d); line-height: 1.65; }

/* ── Body list (related-resources, simple bulleted link list) ─────────────── */
.body-list { list-style: none; padding: 0; margin: 1rem 0; }
.body-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  line-height: 1.55;
}
.body-list li:last-child { border-bottom: none; }
.body-list a { color: var(--pri); font-weight: 600; text-decoration: none; }
.body-list a:hover { text-decoration: underline; }

/* ── CTA banner + large button (footer-of-content call-to-action) ─────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--pri-d), var(--pri));
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 3rem;
}
.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 900;
  margin-bottom: .75rem;
  line-height: 1.2;
}
.cta-banner h2 span { color: var(--accent); }
.cta-banner p {
  opacity: .92;
  max-width: 620px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.btn-large {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  padding: 1rem 2.4rem;
  border-radius: 9px;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-large:hover { background: #d9911a; transform: translateY(-1px); color: #fff; text-decoration: none; }

/* =============================================================================
   PAGE-LAYOUT BLOCKS
   Patterns that appear on a small number of related pages but are too specific
   to be top-level utilities. Kept here vs. inline so all rental-guide pages
   share consistent design without repeating definitions.
   ============================================================================= */

/* ── Cost-comparison cards (rental-pricing-mistakes) ──────────────────────── */
.cost-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.5rem 0;
}
@media (max-width: 760px) { .cost-compare { grid-template-columns: 1fr; } }

.cost-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.cost-card.danger { border-left: 4px solid var(--red); background: #fff7f7; }
.cost-card.safe   { border-left: 4px solid var(--green); background: #f0fdf4; }
.cost-card h3     { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: .8rem; }

.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  font-size: .9rem;
  border-bottom: 1px dashed var(--border);
}
.cost-row:last-child       { border-bottom: none; }
.cost-row.total-row        { font-weight: 800; font-size: 1.05rem; padding-top: .9rem; margin-top: .3rem; border-top: 2px solid var(--gray-d); border-bottom: none; }
.cost-card.danger .total-row { color: var(--red); }
.cost-card.safe   .total-row { color: var(--green); }

.danger-box {
  background: var(--red-l);
  border-left: 4px solid var(--red);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: .93rem;
  line-height: 1.7;
  color: #7f1d1d;
}
.td-red { color: var(--red); font-weight: 700; }

/* ── Seasonal cards (seasonal-rental-pricing) ─────────────────────────────── */
.season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 980px) { .season-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .season-grid { grid-template-columns: 1fr; } }

.season-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.season-card.s-peak { border-top: 4px solid var(--red);    background: #fff7f7; }
.season-card.s-mid  { border-top: 4px solid var(--accent); background: #fffbf0; }
.season-card.s-cool { border-top: 4px solid var(--pri);    background: #f5f8fc; }
.season-card.s-cold { border-top: 4px solid #93c5fd;       background: #f0f9ff; }

.s-season { font-size: .95rem; font-weight: 800; color: #111827; margin-bottom: .35rem; }
.s-demand { font-size: 1.4rem; font-weight: 900; color: var(--pri); margin-bottom: .25rem; }
.s-days   { font-size: .8rem; color: var(--gray); margin-bottom: .8rem; }
.s-action { font-size: .85rem; color: var(--gray-d); padding-top: .8rem; border-top: 1px solid var(--border); line-height: 1.45; }

/* ── Vertical timeline (when-to-raise-rent) ───────────────────────────────── */
.timeline { position: relative; padding-left: 2.4rem; margin: 1.5rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.tl-item { position: relative; padding-bottom: 1.5rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -2.4rem;
  top: .15rem;
  width: 26px; height: 26px;
  background: var(--pri);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--pri);
}
.tl-item.tl-accent .tl-dot { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tl-item.tl-green  .tl-dot { background: var(--green);  box-shadow: 0 0 0 2px var(--green); }
.tl-label { font-size: .75rem; font-weight: 700; color: var(--gray); letter-spacing: .5px; text-transform: uppercase; margin-bottom: .25rem; }
.tl-head  { font-size: 1.05rem; font-weight: 800; color: #111827; margin-bottom: .4rem; }
.tl-body  { font-size: .92rem; line-height: 1.7; color: var(--gray-d); }

/* ── Tips grid (landlord-tips, also referenced from index) ───────────────── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin: 1.5rem 0;
}
@media (max-width: 760px) { .tips-grid { grid-template-columns: 1fr; } }

.tip-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.4rem 4rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.tip-card h3 { font-size: 1.05rem; font-weight: 700; color: #111827; margin-bottom: .5rem; line-height: 1.3; }
.tip-card p  { font-size: .92rem; line-height: 1.65; color: var(--gray-d); }
.tip-num {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  width: 2rem; height: 2rem;
  background: var(--pri);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
}
