/* =========================================================================
 * AlbaBiz.ie — design system
 * Clean, modern, mobile-first. Albanian identity via a flag-red accent used
 * sparingly. Targets WCAG AA contrast. No framework, no build step.
 * ========================================================================= */

:root {
  /* Albanian flag red (#E41E20) tuned for AA text contrast on white. */
  --red: #d11f27;
  --red-dark: #a8161d;
  --red-tint: #fdeaeb;
  --ink: #1a1a1c;
  --ink-soft: #4a4a50;
  --muted: #6c6c74;
  --line: #e6e6ea;
  --bg: #ffffff;
  --bg-soft: #f6f6f8;
  --black: #111114;
  --focus: #1d6fe0;
  --ok: #1c7c44;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,20,30,.06), 0 6px 20px rgba(20,20,30,.06);
  --shadow-hover: 0 2px 6px rgba(20,20,30,.10), 0 14px 32px rgba(20,20,30,.12);
  --maxw: 1120px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
  overflow-wrap: break-word;
}
img { max-width: 100%; display: block; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visibility for keyboard users (AA). */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.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;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 200; transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.15rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.brand small { font-weight: 600; color: var(--muted); font-size: .7rem; display: block; margin-top: -2px; }
.header-spacer { flex: 1; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg-soft); }
.lang-toggle button {
  border: 0; background: transparent; padding: 6px 12px; font-weight: 700; font-size: .82rem;
  color: var(--muted); cursor: pointer; min-height: 36px;
}
.lang-toggle button[aria-pressed="true"] { background: var(--red); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; font-weight: 700; cursor: pointer;
  padding: 10px 18px; font-size: .92rem; min-height: 44px; line-height: 1;
  transition: transform .04s ease, box-shadow .15s, background .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); text-decoration: none; }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-sm { padding: 7px 12px; min-height: 38px; font-size: .85rem; }
.cta-header { white-space: nowrap; }

/* ---- Hero / search ----------------------------------------------------- */
.hero { background: linear-gradient(180deg, var(--red-tint), #fff 70%); padding: 32px 0 8px; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0 0 6px; letter-spacing: -.03em; }
.hero p { color: var(--ink-soft); margin: 0 0 18px; max-width: 60ch; }

.searchbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.field { position: relative; flex: 1 1 220px; }
.field input, .field select {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 14px; font-size: 1rem; background: #fff; color: var(--ink); font-family: inherit;
}
.field input:focus, .field select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-tint); }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }

/* ---- Toolbar (results count + list/map toggle) ------------------------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-weight: 600; font-size: .9rem; }
.toolbar .grow { flex: 1; }
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.viewtoggle button { border: 0; background: #fff; padding: 8px 14px; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; min-height: 40px; }
.viewtoggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---- Category chips ---------------------------------------------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--red-tint); border-color: var(--red); color: var(--red-dark); }

/* ---- Card grid --------------------------------------------------------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 8px 0 28px; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .15s, transform .08s; text-decoration: none; color: inherit;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); text-decoration: none; }
.card-logo { aspect-ratio: 16/9; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-logo img { width: 100%; height: 100%; object-fit: cover; }
.card-logo .placeholder { font-size: 2rem; opacity: .35; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; margin: 0; }
.card-meta { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-desc { color: var(--ink-soft); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tag { font-size: .72rem; font-weight: 700; background: var(--bg-soft); color: var(--ink-soft); border-radius: 999px; padding: 4px 9px; }
.badge-featured { background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 4px 9px; }

/* ---- Map --------------------------------------------------------------- */
#map { width: 100%; height: 70vh; min-height: 420px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 28px; }
.leaflet-popup-content { font-family: var(--font); }
.map-pop-title { font-weight: 800; margin: 0 0 2px; }
.map-pop-meta { color: var(--muted); font-size: .82rem; }

/* ---- Detail page ------------------------------------------------------- */
.detail-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin: 22px 0 8px; }
.detail-logo { width: 96px; height: 96px; border-radius: var(--radius); background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--line); }
.detail-logo img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; }
.detail-sub { color: var(--muted); margin: 4px 0 0; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 18px 0 40px; }
@media (min-width: 760px) { .detail-grid { grid-template-columns: 1.4fr 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; box-shadow: var(--shadow); }
.panel h2 { font-size: 1rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row .ico { width: 22px; text-align: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ---- Forms ------------------------------------------------------------- */
.form-wrap { max-width: 760px; margin: 24px auto 60px; }
.form-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; background: #fff; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.form-row .hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=tel],
.form-row input[type=url], .form-row input[type=number], .form-row textarea, .form-row select {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.form-row textarea { min-height: 96px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-tint); }
.req { color: var(--red); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .checks { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--red-tint); border: 1px solid #f2c9cc; border-radius: var(--radius-sm); padding: 14px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); }
/* Honeypot — visually + semantically hidden from humans, visible to dumb bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Alerts ------------------------------------------------------------ */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0; font-weight: 600; }
.alert-ok { background: #e8f6ee; border: 1px solid #b6e2c6; color: var(--ok); }
.alert-err { background: #fdecec; border: 1px solid #f3c2c2; color: var(--red-dark); }

/* ---- Section headings / landing --------------------------------------- */
.section-title { font-size: 1.25rem; letter-spacing: -.02em; margin: 26px 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 12px; }
.breadcrumb { color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
.breadcrumb a { color: var(--muted); }

/* ---- States ------------------------------------------------------------ */
.state { text-align: center; padding: 60px 20px; color: var(--muted); }
.state .big { font-size: 2.4rem; margin-bottom: 8px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: var(--radius); height: 240px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 28px 0; margin-top: 30px; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-start; }
.footer-inner nav { display: flex; flex-direction: column; gap: 6px; }
.footer-inner a { color: var(--ink-soft); }
.footer-brand { font-weight: 800; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
