/* ==========================================================================
   Maxi24 Azərbaycan — maxi24-az.com
   Modernized early-2010s AZ classifieds-portal identity:
   white base, fresh apple-green action color, red brand accent,
   pale yellow-green panel tints, flat square panels with 1px borders.
   ========================================================================== */

:root {
  /* Primary — evolved from the original #76a212 search/login green */
  --green-50: #f4f8df;
  --green-100: #eef4d2;
  --green-200: #dde5c2;
  --green-500: #76a212;
  --green-600: #648c0d;
  --green-700: #4f7008;
  --green-900: #283a06;

  /* Brand red — the "24" in the logo and the Pulsuz badge */
  --red-500: #c81e1e;
  --red-600: #a81616;

  /* Portal link blue (original sidebar/category links) */
  --link-blue: #1d6fb8;
  --link-blue-dark: #14538c;

  /* Neutrals */
  --paper: #ffffff;
  --paper-warm: #fafbf5;
  --ink: #2b2f26;
  --ink-soft: #5b6152;
  --line: #e2e6d8;

  --radius: 3px;
  --font-head: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Noto Sans", "Segoe UI", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper-warm);
  font-size: 1rem;
  line-height: 1.65;
}

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

h1, h2, h3, h4, h5, .title, .side-title {
  font-family: var(--font-head);
  color: var(--ink);
}

a { color: var(--link-blue); }
a:hover { color: var(--link-blue-dark); }

/* --------------------------------------------------------------------------
   Header: utility strip + brand bar + category nav band
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--green-900);
  color: #dce8bf;
  font-size: 0.8rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.1rem;
  flex-wrap: wrap;
  padding: 0.15rem 0.75rem;
}
.topbar-tag { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar-tag .fa-circle-check { color: var(--green-500); }
.topbar-links { display: flex; gap: 1.1rem; }
.topbar-links a { color: #eef4d2; text-decoration: none; }
.topbar-links a:hover { color: #ffffff; text-decoration: underline; }

.brandbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.brandbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.75rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--red-500);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: var(--radius);
  letter-spacing: -0.03em;
}
.brand-text { line-height: 1.1; }
.brand-word {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-word .brand-num { color: var(--red-500); }
.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cta-elan {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-500);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--green-600);
  text-decoration: none;
  white-space: nowrap;
}
.cta-elan:hover { background: var(--green-600); color: #fff; }
.badge-pulsuz {
  background: var(--red-500);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius);
}

.nav-toggle {
  display: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1.15rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.catnav {
  background: var(--green-50);
  border-bottom: 1px solid var(--green-200);
}
.catnav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0 0.75rem;
}
.catnav-list a {
  display: block;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--green-900);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.catnav-list a:hover { color: var(--green-700); border-bottom-color: var(--green-200); }
.catnav-list a.is-current { color: var(--green-700); border-bottom-color: var(--green-500); }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .cta-elan { display: none; }
  .catnav-list { display: none; flex-direction: column; padding: 0.4rem 0.75rem 0.8rem; }
  .catnav-list.is-active { display: flex; }
  .catnav-list a { border-bottom: 1px solid var(--green-200); border-left: 3px solid transparent; }
  .catnav-list a.is-current { border-left-color: var(--green-500); border-bottom-color: var(--green-200); }
}

/* --------------------------------------------------------------------------
   Homepage hero + stats band + category grid
   -------------------------------------------------------------------------- */

.hero-home { position: relative; overflow: hidden; background: var(--green-900); }
.hero-home .hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.hero-home .hero-inner {
  position: relative;
  padding: 4.5rem 0.75rem 4.75rem;
  max-width: 760px;
}
.hero-home h1 {
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 1px 3px rgba(20, 28, 8, 0.55);
}
.hero-lead {
  color: #f2f6e4;
  font-size: 1.06rem;
  text-shadow: 0 1px 2px rgba(20, 28, 8, 0.6);
  margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-green, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.btn-green { background: var(--green-500); color: #fff; border: 1px solid var(--green-600); }
.btn-green:hover { background: var(--green-600); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.stats-band { background: var(--paper); border-bottom: 1px solid var(--line); }
.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.stat-cell { background: var(--paper); text-align: center; padding: 1.2rem 0.75rem; }
.stat-cell .stat-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--green-700);
}
.stat-cell .stat-label { font-size: 0.82rem; color: var(--ink-soft); }
@media (max-width: 640px) {
  .stats-inner { grid-template-columns: 1fr; }
  .stat-cell { padding: 0.85rem 0.75rem; }
}

/* Category guide grid (homepage ul → cards, "Vitrin" echo) */
.content ul.cat-grid {
  list-style: none;
  margin: 1.4rem 0 0.6rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 0.9rem;
}
.content ul.cat-grid li {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--green-200);
  border-top: 3px solid var(--green-500);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.content ul.cat-grid li:hover { border-color: var(--green-500); transform: translateY(-2px); }
.content ul.cat-grid li > a {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--green-900);
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.content ul.cat-grid li > a:hover { color: var(--green-700); text-decoration: underline; }

.home-body { padding: 2.5rem 0.75rem 3rem; max-width: 980px; }

/* --------------------------------------------------------------------------
   Section pages: breadcrumb strip, sidebar, article
   -------------------------------------------------------------------------- */

.page-head { background: var(--green-50); border-bottom: 1px solid var(--green-200); }
.crumbs {
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.crumbs a { color: var(--green-700); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .crumb-sep { margin: 0 0.45rem; color: var(--green-200); }

.section-layout { padding: 2rem 0.75rem 3rem; }
@media (min-width: 1024px) { .section-layout .sidebar { order: -1; } }

.side-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
}
.side-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-50);
  border-bottom: 1px solid var(--green-200);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-900);
  padding: 0.6rem 0.85rem;
  margin: 0;
}
.side-title .fa-solid { color: var(--green-600); }
.side-cats { list-style: none; margin: 0; padding: 0.35rem 0; }
.side-cats li { margin: 0; }
.side-cats a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  color: var(--link-blue);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.side-cats a .fa-solid, .side-cats a .fa-regular {
  width: 1.1rem;
  text-align: center;
  color: var(--green-600);
  font-size: 0.85rem;
}
.side-cats a:hover { background: var(--paper-warm); color: var(--link-blue-dark); }
.side-cats a.is-current {
  border-left-color: var(--green-500);
  background: var(--green-50);
  color: var(--green-900);
  font-weight: 600;
}
.side-tip { padding: 0.85rem 0.95rem; font-size: 0.85rem; color: var(--ink-soft); }
.side-tip .fa-shield-halved { color: var(--green-600); margin-right: 0.35rem; }
.side-tip a { font-weight: 600; }

.article-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 2rem 2.25rem;
}
@media (max-width: 768px) { .article-body { padding: 1.2rem 1.1rem 1.6rem; } }

.page-hero { margin: -0.25rem 0 1.5rem; }
.page-hero img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}
.inline-figure { margin: 1.5rem 0; }
.inline-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
}
.inline-figure figcaption { font-size: 0.82rem; color: var(--ink-soft); padding-top: 0.4rem; }

/* Content typography refinements (on top of Bulma .content) */
.content h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.25; }
.content h2 {
  font-size: 1.32rem;
  font-weight: 700;
  border-bottom: 2px solid var(--green-100);
  padding-bottom: 0.35rem;
}
.content h3 { font-size: 1.08rem; font-weight: 600; }
.content a { color: var(--link-blue); }
.content a:hover { color: var(--link-blue-dark); }
.content ul li::marker { color: var(--green-500); }
.content ol li::marker { color: var(--green-700); font-weight: 700; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
  text-align: center;
  padding: 4.5rem 0.75rem 5rem;
  max-width: 640px;
  margin: 0 auto;
}
.notfound .nf-code {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 5rem;
  color: var(--green-200);
  line-height: 1;
}
.notfound h1 { font-size: 1.6rem; margin: 0.75rem 0 1rem; }
.notfound p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.notfound .hero-actions { justify-content: center; }
.notfound .btn-ghost {
  background: var(--green-50);
  color: var(--green-900);
  border-color: var(--green-200);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--green-900);
  color: #c9d6a8;
  padding: 2.75rem 0 0;
  font-size: 0.9rem;
}
.site-footer .footer-cols { padding: 0 0.75rem; }
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 0.45rem; }
.site-footer a { color: #dce8bf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand-mark { width: 2.2rem; height: 2.2rem; font-size: 1.05rem; }
.footer-brand-row { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.8rem; }
.footer-brand-word { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: #fff; }
.footer-brand-word .brand-num { color: #f0938f; }
.footer-bottom {
  margin-top: 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1rem 0.75rem;
  font-size: 0.8rem;
  color: #a8b884;
  text-align: center;
}
