/* Zubenel Group — site styles (rebuilt) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --ink: #16150f;
  --charcoal: #1f1e1a;
  --grey: #6f6f6a;
  --muted: #8b8b83;
  --line: #e7e3da;
  --bg: #ffffff;
  --bg-soft: #f7f5ef;
  --bg-dark: #17160f;
  --gold: #c2913c;
  --gold-dark: #a5772a;
  --gold-soft: #f4ecd8;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --wrap: 1180px;
  --radius: 14px;
  --shadow: 0 18px 40px -24px rgba(20, 18, 10, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }
.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dark);
  display: inline-block; margin-bottom: .8rem;
}
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #e9e6dd; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.08rem; color: var(--grey); }
.section--dark .lead { color: #b9b6ab; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  padding: .85rem 1.6rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: .2s ease; white-space: nowrap;
}
.btn--gold { background: var(--gold); color: #1a1509; }
.btn--gold:hover { background: var(--gold-dark); color: #fff; transform: translateY(-1px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { border-color: currentColor; color: var(--ink); }
.section--dark .btn--ghost { color: #fff; }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 78px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-weight: 500; font-size: .96rem; color: var(--charcoal); position: relative; }
.nav a:hover, .nav a.active { color: var(--gold-dark); }
.nav a.active::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--gold);
}
.header-cta { display: flex; align-items: center; gap: 1rem; }
.nav-toggle, .nav-toggle-label { display: none; }

/* hero */
.hero { position: relative; background: var(--bg-dark); color: #fff; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(1100px 500px at 82% -10%, rgba(194,145,60,.22), transparent 60%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(3rem, 6vw, 5.5rem) 0; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: .01em; margin-bottom: 1.2rem; }
.hero p { color: #cfccc1; font-size: 1.1rem; max-width: 46ch; }
.hero .btn-row { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; gap: 14px; }
.hero-collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-collage img:nth-child(1) { grid-row: span 2; }
.hero-collage img:nth-child(4) { grid-row: span 2; }
.hero-badge {
  position: absolute; left: 2rem; bottom: 1.6rem; background: var(--gold); color: #1a1509;
  padding: .8rem 1.2rem; border-radius: 12px; box-shadow: var(--shadow);
}
.hero-badge b { font-family: var(--serif); font-size: 1.6rem; display: block; line-height: 1; }
.hero-badge span { font-size: .8rem; font-weight: 600; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat b { font-family: var(--serif); font-size: 2.4rem; color: var(--gold-dark); display: block; }
.stat span { color: var(--grey); font-weight: 500; }

/* split (about intro / image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.split--media-right .media { order: 2; }

/* feature cards */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; transition: .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #dcd6c8; }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-dark);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p { color: var(--grey); font-size: .95rem; margin: 0; }

/* product cards */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: .22s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.product-card p { color: var(--grey); font-size: .92rem; flex: 1; }
.product-card .more { color: var(--gold-dark); font-weight: 600; font-size: .9rem; margin-top: .8rem; }

/* brand strip */
.brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem 3.5rem; }
.brands img { height: 54px; width: auto; filter: grayscale(1); opacity: .7; transition: .2s; }
.brands img:hover { filter: none; opacity: 1; }

/* CTA band */
.cta-band { background: var(--gold); color: #1a1509; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.2rem); text-align: center; }
.cta-band h2 { color: #1a1509; }
.cta-band .btn--dark { background: var(--ink); }

/* contact + form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-dark); display: grid; place-items: center; font-size: 1.15rem; }
.contact-list li > div { padding-top: 2px; }
.contact-list b { display: block; color: var(--ink); font-family: var(--serif); margin-bottom: .15rem; }
.contact-list a, .contact-list span { color: var(--grey); }
.section--dark .contact-list b { color: #fff; }
.section--dark .contact-list a, .section--dark .contact-list span { color: #cfccc1; }
.section--dark .contact-list a:hover { color: var(--gold); }
form.msg { display: grid; gap: 1rem; align-content: start; background: var(--bg-soft); padding: 1.8rem; border-radius: var(--radius); border: 1px solid var(--line); }
.section--dark form.msg { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
form.msg input, form.msg textarea {
  width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--charcoal);
}
form.msg textarea { min-height: 130px; resize: vertical; }
form.msg .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* footer */
.site-footer { background: var(--bg-dark); color: #b7b4a9; padding-top: 4rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer a:hover { color: var(--gold); }
.footer-logo { height: 42px; margin-bottom: 1.2rem; filter: brightness(0) invert(1); }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .93rem; }
.footer-offices { display: grid; gap: 1.1rem; font-size: .9rem; line-height: 1.5; }
.footer-offices b { color: #e9e6dd; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .85rem; }
.socials { display: flex; gap: .8rem; }
.socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; font-size: .85rem; }
.socials a:hover { background: var(--gold); color: #1a1509; border-color: var(--gold); }

/* page banner (inner pages) */
.page-banner { background: var(--bg-dark); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; position: relative; overflow: hidden; }
.page-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(800px 400px at 85% 0%, rgba(194,145,60,.2), transparent 60%); }
.page-banner .wrap { position: relative; }
.page-banner h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: .4rem; }
.page-banner p { color: #cfccc1; margin: 0; }
.crumb { font-size: .85rem; color: var(--gold); margin-bottom: 1rem; letter-spacing: .04em; }
.crumb a:hover { color: #fff; }

/* product detail */
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.spec-grid .spec { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; text-align: center; font-weight: 600; background: var(--bg-soft); }
.chip-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chip-list li { background: var(--gold-soft); color: var(--gold-dark); padding: .4rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.bullet-list { padding-left: 1.1rem; margin: 0; color: var(--grey); }
.bullet-list li { margin-bottom: .4rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.applications { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.app-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 1rem 1.2rem; font-weight: 600; color: var(--ink); }

/* FAQ (native details) */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: .8rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.faq summary { cursor: pointer; padding: 1.15rem 1.4rem; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--gold-dark); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--gold-dark); border-bottom: 1px solid var(--line); }
.faq .a { padding: 1.1rem 1.4rem 1.3rem; color: var(--grey); }
.faq .a p:last-child { margin-bottom: 0; }

/* estimator */
.estimator { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.estimator .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.estimator label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; color: var(--ink); }
.estimator .field { margin-bottom: 1.1rem; }
.estimator input, .estimator select { width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.estimator .result { background: var(--bg-dark); color: #fff; border-radius: var(--radius); padding: 2rem; text-align: center; }
.estimator .result .num { font-family: var(--serif); font-size: 3.4rem; color: var(--gold); line-height: 1; }
.estimator .result small { display: block; color: #b9b6ab; margin-top: .5rem; }
.estimator .result .split-nums { display: flex; justify-content: center; gap: 2rem; margin-top: 1.4rem; }
.estimator .result .split-nums b { display: block; font-size: 1.4rem; color: #fff; font-family: var(--serif); }
.estimator .result .split-nums span { font-size: .8rem; color: #b9b6ab; }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: .22s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.4rem; }
.post-card .date { font-size: .8rem; color: var(--gold-dark); font-weight: 600; letter-spacing: .04em; }
.post-card h3 { font-size: 1.2rem; margin: .5rem 0; }
.post-card p { color: var(--grey); font-size: .92rem; margin: 0; }
.article { max-width: 780px; margin-inline: auto; }
.article img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); }
.article p { font-size: 1.05rem; color: #38372f; }

/* utilities */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* responsive */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-collage { max-width: 460px; }
  .split, .contact-grid, .estimator { grid-template-columns: 1fr; }
  .split--media-right .media { order: 0; }
  .grid-3, .grid-4, .product-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav, .header-cta .btn { display: none; }
  .nav-toggle-label { display: inline-flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
  .nav-toggle-label span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }
  .nav-toggle:checked ~ .nav {
    display: flex; position: absolute; top: 78px; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 4%;
  }
  .nav-toggle:checked ~ .nav a { padding: .9rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .grid-2, .grid-3, .grid-4, .product-grid, .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  form.msg .row2 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============ enhancements ============ */

/* scroll reveal — no-JS safe (only hides once .js is set), reduced-motion safe */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

/* hero stat badge — anchor bottom-right (override original left) */
.hero-badge { left: auto; right: 2rem; bottom: 1.6rem; }
@media (max-width: 960px) { .hero-badge { position: static; display: inline-block; margin-top: 1.5rem; } }

/* brand marquee */
.brand-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.brand-track { display: flex; align-items: center; gap: 4rem; width: max-content; animation: marquee 32s linear infinite; }
.brand-track img { height: 56px; width: auto; filter: grayscale(1); opacity: .68; transition: .25s; flex: none; }
.brand-track img:hover { filter: none; opacity: 1; }
.brand-marquee:hover .brand-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .brand-track { animation: none; flex-wrap: wrap; justify-content: center; } }

/* 3D estimator */
.estimator3d { display: grid; grid-template-columns: 360px 1fr; gap: 1.6rem; align-items: stretch; }
.estimator3d .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.estimator3d .panel h3 { font-size: 1.05rem; margin: 0 0 .9rem; }
.est-field { margin-bottom: 1rem; }
.est-field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--ink); }
.est-field input { width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.est-dims { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.brick-opts { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.brick-opt { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: .18s; }
.brick-opt:hover { border-color: var(--gold); background: var(--gold-soft); }
.brick-opt input { accent-color: var(--gold-dark); flex: none; }
.brick-opt .txt { flex: 1; min-width: 0; }
.brick-opt .sw { flex: none; min-width: 78px; padding: .4rem .55rem; border-radius: 6px; border: 1px solid rgba(0,0,0,.14); font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.1; }
.brick-opt .nm { font-weight: 600; font-size: .92rem; }
.brick-opt .dim { font-size: .78rem; color: var(--muted); }
.brick-opt input:checked ~ .txt .nm { color: var(--gold-dark); }
.est-results { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.est-results .r { background: var(--bg-dark); color: #fff; border-radius: 10px; padding: .9rem; text-align: center; }
.est-results .r.wide { grid-column: 1 / -1; background: var(--gold); color: #1a1509; }
.est-results .r b { font-family: var(--serif); font-size: 1.7rem; display: block; line-height: 1; }
.est-results .r.wide b { font-size: 2.2rem; }
.est-results .r span { font-size: .74rem; opacity: .85; }
.viewer { position: relative; height: 580px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #efeae0, #d9d3c6); border: 1px solid var(--line); box-shadow: var(--shadow); }
.viewer canvas { display: block; }
.viewer-hint { position: absolute; left: 1rem; bottom: 1rem; background: rgba(23,22,15,.72); color: #fff; font-size: .78rem; padding: .4rem .8rem; border-radius: 999px; pointer-events: none; }
.viewer-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem; color: var(--charcoal); }

/* estimator lead-capture lock */
.estimator-wrap { position: relative; }
.estimator-wrap.is-locked .estimator3d { filter: blur(7px); pointer-events: none; user-select: none; }
.estimate-lock { position: absolute; inset: -14px; z-index: 20; display: grid; place-items: center; padding: 1rem; background: rgba(23,22,15,.5); backdrop-filter: blur(3px); border-radius: var(--radius); }
.lock-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.6rem, 4vw, 2.4rem); width: min(440px, 100%); text-align: center; }
.lock-card .lock-icon { font-size: 2rem; margin-bottom: .3rem; }
.lock-card h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.lock-card .muted { font-size: .93rem; }
.lock-card form { display: grid; gap: .8rem; margin-top: 1.3rem; }
.lock-card input { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.lock-card .form-note { text-align: left; margin: 0 0 .2rem; }
@media (max-width: 900px) {
  .estimator3d { grid-template-columns: 1fr; }
  .viewer { height: 440px; }
}

/* ============ admin ============ */
body.admin { background: var(--bg-soft); }
.admin-bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.admin-bar .brand img { height: 34px; }
.admin-nav { display: flex; align-items: center; gap: 1.4rem; }
.admin-nav a { font-weight: 500; font-size: .93rem; color: var(--charcoal); }
.admin-nav a:hover, .admin-nav a.active { color: var(--gold-dark); }
.admin-nav a.active { font-weight: 600; }

/* admin search + pager */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.admin-search { display: flex; align-items: center; gap: .6rem; }
.admin-search input[type=search] { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; min-width: 260px; background: #fff; }
.admin-search .btn { padding: .6rem 1.2rem; }
.admin-search-clear { font-size: .9rem; color: var(--muted); }
.admin-search-clear:hover { color: var(--gold-dark); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1.6rem; font-size: .92rem; }
.pager a { font-weight: 600; color: var(--gold-dark); padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; }
.pager a:hover { background: var(--gold-soft); border-color: var(--gold); }
.pager .disabled { color: var(--muted); opacity: .5; padding: .5rem .9rem; }
.pager-info { color: var(--grey); }
.admin-nav form { margin: 0; }
.linkbtn { background: none; border: 0; font: inherit; font-weight: 600; color: var(--gold-dark); cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: #b3352f; }
.admin-main { padding: 2.5rem 0 4rem; }
.admin-main .wrap { width: min(1000px, 92%); }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.admin-head h1 { font-size: 1.7rem; margin: 0; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.muted { color: var(--muted); font-size: .9rem; }
.nowrap { white-space: nowrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.admin-table th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
.admin-table td { padding: .8rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td:last-child { text-align: right; }
.row-actions { display: flex; gap: .9rem; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }
.tag { font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.tag--on { background: #e4f0e0; color: #3f7a37; }
.tag--off { background: #f0e9d6; color: #927324; }
.admin-alert { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1.2rem; font-weight: 500; font-size: .95rem; }
.admin-alert.ok { background: #e4f0e0; color: #37692f; border: 1px solid #c7e0be; }
.admin-alert.err { background: #fbe6e4; color: #a5322b; border: 1px solid #f1c7c2; }
.admin-form { display: grid; gap: 1.1rem; }
.admin-form label { display: grid; gap: .4rem; font-weight: 600; font-size: .9rem; color: var(--ink); }
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=password], .admin-form textarea {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--charcoal);
}
.admin-form textarea { resize: vertical; }
.admin-form textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; line-height: 1.6; }
.admin-form .checkline { display: flex; flex-direction: row; align-items: center; gap: .55rem; font-weight: 600; }
.admin-form .checkline input { width: auto; }
/* Sticky action bar — keeps Save visible no matter how long the post is */
.admin-form .form-actions { position: sticky; bottom: 0; z-index: 5; margin: 1rem -1.4rem -1.4rem; padding: 1rem 1.4rem; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.admin-auth { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 2rem 1rem; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.2rem; width: min(420px, 100%); }
.admin-card h1 { font-size: 1.7rem; margin: 0 0 .3rem; }
.admin-card .muted { margin-bottom: 1.4rem; }
.admin-card .admin-form { gap: 1rem; }

/* Quill editor (post editor) */
#editor { background: #fff; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; background: var(--bg-soft); }
.ql-container.ql-snow { border-radius: 0 0 10px 10px; font-family: var(--sans); font-size: 1rem; }
/* Cap the editor (the scroller) so long posts scroll internally and the Save button stays reachable */
.ql-editor { min-height: 260px; max-height: 400px; overflow-y: auto; line-height: 1.7; }
.ql-editor img { max-width: 100%; height: auto; border-radius: 8px; }

/* featured image upload field */
.upload-field { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.upload-preview { width: 190px; height: 120px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; flex: none; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-preview.is-empty span { color: var(--muted); font-size: .85rem; }
.upload-actions { display: flex; align-items: center; gap: 1.1rem; }
.ql-snow .ql-stroke { stroke: var(--charcoal); }
.ql-snow.ql-toolbar button:hover .ql-stroke { stroke: var(--gold-dark); }
.ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--gold-dark); }

/* article body lists (rendered blog post) */
.article ul, .article ol { padding-left: 1.4rem; margin: 1rem 0; color: #38372f; }
.article li { margin-bottom: .4rem; }
.article blockquote { border-left: 3px solid var(--gold); margin: 1.4rem 0; padding: .4rem 0 .4rem 1.2rem; color: var(--grey); font-style: italic; }

/* success banner on public contact forms */
.form-note { border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; font-weight: 500; font-size: .95rem; }
.form-note.ok { background: rgba(120,180,110,.18); color: #cfeac6; border: 1px solid rgba(120,180,110,.35); }
.form-note.err { background: rgba(200,90,80,.18); color: #f2c9c4; border: 1px solid rgba(200,90,80,.35); }
.section:not(.section--dark) .form-note.ok { background: #e4f0e0; color: #37692f; border-color: #c7e0be; }
.section:not(.section--dark) .form-note.err { background: #fbe6e4; color: #a5322b; border-color: #f1c7c2; }
