/*
Theme Name: Catnip ARLnow Layout V4.4 (Mobile Menu + Mobile Polish)
Author: Catnip
Description: Sticky header, shrink-on-scroll logo, ARLnow-style layout. Adds hamburger mobile menu, improved mobile spacing, and font scaling.
Version: 4.4.12
Text Domain: catnip-arlnow-v44
*/

:root{
  --bg:#ffffff;
  --text:#1f2430;
  --muted:#6b7280;
  --border:#e5e7eb;
  --accent:#6d4ab7;
  --maxw:1160px;

  /* Default logo sizes (non-home pages) */
  --logo-size: 96px;
  --logo-size-stuck: 72px;

  --font-base: 18px;
  --font-small: 14px;
  --font-h1: 32px;
  --font-h2: 26px;
}

/* Larger banner on Home */
body.home{
  --logo-size: 128px;
  --logo-size-stuck: 84px;
}

*{ box-sizing:border-box; }
html{ font-size: var(--font-base); }
body{ margin:0; background:var(--bg); color:var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial; line-height:1.55; }
a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration: underline; }

/* Container adds margins from window edge */
.container{ max-width: var(--maxw); margin:0 auto; padding: 0 24px; }
@media (min-width: 1280px){ .container{ padding: 0 36px; } }

/* Sticky header wrapper: banner + nav stick together */
.site-header{ position: sticky; top: 0; z-index: 100; background:#fff; border-bottom:1px solid var(--border); }

/* Banner / logo row */
.topbar{ display:flex; align-items:center; gap:18px; padding:10px 0; transition: padding .18s ease; }
.topbar .logo-link{ display:inline-block; }
.topbar img{ height:var(--logo-size); width:auto; display:block; transition: height .18s ease; }
.is-nav-stuck .site-header{ box-shadow: 0 6px 16px rgba(0,0,0,.08); border-bottom-color:#e2e8f0; }
.is-nav-stuck .topbar img{ height: var(--logo-size-stuck); }
.is-nav-stuck .topbar{ padding: 6px 0; }

/* Nav bar */
.main-nav{ border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:#fafafa; }
.nav-inner{ display:flex; align-items:center; gap:16px; padding:10px 0; }

/* Desktop menu */
.menu-toggle{ display:none; } /* hidden on desktop */
.nav-menu{ list-style:none; margin:0; padding:0; display:flex; gap:18px; align-items:center; }
.nav-menu > li > a{ display:inline-block; padding:10px 12px; border-radius:8px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:#111827; }
.nav-menu > li > a:hover, .nav-menu .current-menu-item>a{ background:#ede9fe; color:#1f1b2e; border:1px solid #c7b8ff; }

/* Mobile menu (<=900px): hamburger + slide-down menu */
@media (max-width: 900px){
  :root{
    --font-base: 17px;
    --font-small: 13.5px;
    --font-h1: 28px;
    --font-h2: 22px;
  }
  .container{ padding: 0 16px; }
  .menu-toggle{
    display:inline-flex; align-items:center; gap:10px;
    padding:10px 12px; border-radius:10px; border:1px solid var(--border);
    background:#fff; color:#111827; font-weight:800; text-transform:uppercase;
  }
  .menu-toggle .bars{ width:22px; height:14px; position:relative; display:inline-block; }
  .menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bar{
    content:""; position:absolute; left:0; right:0; height:2px; background:#111827; border-radius:2px;
  }
  .menu-toggle .bar{ top:6px; }
  .menu-toggle .bars::before{ top:0; }
  .menu-toggle .bars::after{ bottom:0; }

  .nav-menu{
    position: relative;
    display:block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .24s ease;
    margin-top: 8px;
    border-top:1px dashed var(--border);
    padding-top: 8px;
  }
  .nav-open .nav-menu{ max-height: 600px; } /* slides down */
  .nav-menu > li{ margin: 6px 0; }
  .nav-menu > li > a{
    display:block; padding:12px 8px; border-radius:10px;
    font-weight:800; text-transform:uppercase;
  }
}

/* Content */
.content-wrap{ display:grid; grid-template-columns: 1fr; gap:24px; padding:24px 0; }
.post-list{ display:grid; gap:18px; }
.post-row{ display:grid; grid-template-columns: 320px 1fr; gap:16px; border-bottom:1px solid var(--border); padding-bottom:18px; }
.post-row:last-child{ border-bottom:none; }
.post-row .thumb { width:100%; height:190px; object-fit:cover; border-radius:10px; border:1px solid var(--border); }
.post-row .meta{ color:var(--muted); font-size:var(--font-small); display:flex; gap:12px; }
.post-row h2{ margin:6px 0 8px; font-size:var(--font-h2); line-height:1.2; color:#111827; }
.post-row p.excerpt{ margin:0 0 10px; color:#374151; }
.readmore{ font-weight:700; }

/* Mobile list stack */
@media (max-width: 900px){
  .post-row{ grid-template-columns:1fr; }
  .post-row .thumb{ height:220px; }
}

/* Single post */
.single-head{ border-bottom:1px solid var(--border); padding-bottom:8px; margin-bottom:10px; }
.single-head h1{ font-size: var(--font-h1); margin: 8px 0; }
.single-head .meta{ color:var(--muted); font-size:var(--font-small); display:flex; gap:12px; flex-wrap:wrap; }
.single .post-thumbnail img{ width:100%; height:auto !important; object-fit:contain; border-radius:10px; border:1px solid var(--border); margin:10px 0 16px; }
.entry-content{ line-height:1.75; font-size:1rem; color:#1f2430; }
.entry-content p{ margin:0 0 1em; }

/* Prevent image stretching in content */
.entry-content img, .wp-block-image img, .wp-block-cover img { width:100%; height:auto !important; max-width:100%; object-fit:contain; }
.entry-content figure img { height:auto !important; }

.archive-title{ font-size:28px; margin:10px 0; }

/* Footer */
.site-footer{ border-top:1px solid var(--border); padding:18px 0; color:#6b7280; background:#fafafa; }
