/* ============================================================
   NLN Newspaper Locator — Public Site Stylesheet v2.1
   Bootstrap 5.3 · PHP 7.3 / XAMPP Windows 11 compatible
   ============================================================ */

/* ── Variables ── */
:root {
  --nln-green:  #0a5c36;
  --nln-green2: #0d7040;
  --nln-gold:   #c9a84c;
  --nln-cream:  #faf7f0;
  --nln-dark:   #0d1b0f;
  --nln-muted:  #6b7c74;
  --nln-border: #d0e4d9;
  --nln-light:  #e8f5ed;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--nln-cream);
  color: var(--nln-dark);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* ── Loading overlay ── */
.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(250,247,240,.85);
  z-index: 9999; align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem;
}
.loading-overlay.show { display: flex; }
.nln-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--nln-light);
  border-top-color: var(--nln-green);
  border-radius: 50%;
  animation: nlnSpin .7s linear infinite;
}
@keyframes nlnSpin { to { transform: rotate(360deg); } }

/* ── Navbar ── */
.nln-navbar {
  background: var(--nln-dark);
  border-bottom: 3px solid var(--nln-gold);
  position: sticky; top: 0; z-index: 1000;
  padding: 0 1rem;
}
.nln-navbar .navbar-brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; padding: .5rem 0;
}
.nln-navbar .brand-logo { width: 48px; height: 48px; object-fit: contain; }
.nln-navbar .brand-text span:first-child {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: .95rem; color: var(--nln-gold); font-weight: 700;
}
.nln-navbar .brand-text span:last-child {
  display: block; font-size: .64rem;
  color: rgba(255,255,255,.5); letter-spacing: .07em; text-transform: uppercase;
}
.nln-navbar .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: .84rem; font-weight: 500;
  padding: .4rem .75rem !important; border-radius: 5px; transition: .18s;
}
.nln-navbar .nav-link:hover { color: #fff !important; background: rgba(201,168,76,.15); }
.nln-navbar .dropdown-menu {
  background: var(--nln-dark); border: 1px solid rgba(201,168,76,.22);
  border-radius: 8px; padding: .35rem 0; min-width: 200px;
  max-height: 360px; overflow-y: auto;
}
.nln-navbar .dropdown-item { color: rgba(255,255,255,.7); font-size: .82rem; padding: .38rem 1rem; }
.nln-navbar .dropdown-item:hover { background: rgba(201,168,76,.14); color: var(--nln-gold); }
.nln-navbar .navbar-toggler { border-color: rgba(201,168,76,.4); }
.nln-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28201,168,76,.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero ── */
.nln-hero {
  background: var(--nln-dark);
  background-image:
    radial-gradient(ellipse at 75% 20%, rgba(10,92,54,.6) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(201,168,76,.07) 0%, transparent 50%);
  background-size: cover; background-position: center;
  min-height: 480px; display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.nln-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(13,27,15,.92) 0%, rgba(10,92,54,.7) 100%);
}
.nln-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 60px; background: var(--nln-cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 3rem 0 4rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(201,168,76,.14); border: 1px solid rgba(201,168,76,.35);
  border-radius: 100px; padding: .25rem .9rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--nln-gold); margin-bottom: 1rem;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800; color: #fff; line-height: 1.12; margin-bottom: .85rem;
}
.hero-title em { font-style: italic; color: var(--nln-gold); }
.hero-sub {
  color: rgba(255,255,255,.62); font-size: .95rem;
  font-weight: 300; line-height: 1.75; max-width: 480px;
}

/* ── Search card ── */
.search-card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.13), 0 0 0 1px rgba(10,92,54,.06);
  padding: 1.6rem 1.75rem; position: relative;
}
.s-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--nln-green); margin-bottom: .3rem; display: block;
}
.search-card .form-control,
.search-card .form-select {
  border: 1.5px solid var(--nln-border); border-radius: 8px;
  height: 44px; font-size: .88rem; transition: border-color .18s, box-shadow .18s;
}
.search-card .form-control:focus,
.search-card .form-select:focus {
  border-color: var(--nln-green); box-shadow: 0 0 0 3px rgba(10,92,54,.1); outline: none;
}
/* Select2 inside search card */
.search-card .select2-container--default .select2-selection--single {
  border: 1.5px solid var(--nln-border); border-radius: 8px; height: 44px;
  display: flex; align-items: center;
}
.search-card .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0 36px 0 12px; line-height: 44px; font-size: .88rem; color: var(--nln-dark);
}
.search-card .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 8px; }
.search-card .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--nln-green); box-shadow: 0 0 0 3px rgba(10,92,54,.1);
}

/* ── Search button ── */
.btn-nln {
  background: var(--nln-green); color: #fff; border: none;
  border-radius: 9px; height: 44px; font-weight: 700; font-size: .9rem;
  padding: 0 1.5rem; display: inline-flex; align-items: center;
  gap: .4rem; transition: .22s; white-space: nowrap; cursor: pointer;
}
.btn-nln:hover {
  background: var(--nln-green2); color: #fff;
  transform: translateY(-2px); box-shadow: 0 6px 18px rgba(10,92,54,.28);
}
.btn-nln:active { transform: translateY(0); }

/* ── Stats strip ── */
.stats-strip { background: var(--nln-green); padding: 1.3rem 0; }
.stat-item { text-align: center; color: #fff; padding: .45rem 1.25rem; }
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 800; color: var(--nln-gold);
  display: block; line-height: 1;
}
.stat-label {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: .09em; opacity: .7; margin-top: .2rem; display: block;
}
.stat-sep { width: 1px; background: rgba(255,255,255,.15); align-self: stretch; }

/* ── Section headings ── */
.sec-eyebrow {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .15em; color: var(--nln-green); margin-bottom: .35rem;
}
.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 700; color: var(--nln-dark); line-height: 1.15;
}
.sec-title em { font-style: italic; color: var(--nln-green); }

/* ── Step cards ── */
.step-card {
  background: #fff; border-radius: 12px; padding: 1.6rem;
  border: 1px solid #e4ede8; height: 100%; transition: .25s;
  position: relative; overflow: hidden;
}
.step-card::before {
  content: attr(data-step); position: absolute; top: -14px; right: 12px;
  font-family: 'Playfair Display', serif; font-size: 5rem; font-weight: 800;
  color: var(--nln-light); line-height: 1; pointer-events: none;
}
.step-card:hover {
  border-color: var(--nln-green);
  box-shadow: 0 10px 28px rgba(10,92,54,.1); transform: translateY(-3px);
}
.step-icon {
  width: 48px; height: 48px; background: var(--nln-light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .9rem; font-size: 1.3rem; color: var(--nln-green);
}
.step-h { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem; margin-bottom: .35rem; }
.step-p { font-size: .85rem; color: var(--nln-muted); line-height: 1.65; }

/* ── Newspaper tile ── */
.np-tile {
  background: #fff; border-radius: 10px; padding: 1rem .85rem;
  text-align: center; text-decoration: none; color: var(--nln-dark);
  border: 1px solid transparent; transition: .2s; display: block; height: 100%;
}
.np-tile:hover {
  border-color: var(--nln-green); color: var(--nln-dark);
  box-shadow: 0 6px 18px rgba(10,92,54,.1); transform: translateY(-2px);
}
.np-tile img { width: 44px; height: 32px; object-fit: contain; margin: 0 auto .6rem; display: block; }
.np-ph {
  width: 44px; height: 32px; background: var(--nln-light); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .6rem; color: var(--nln-green);
}
.np-name { font-size: .76rem; font-weight: 600; line-height: 1.3; }

/* ── Branch badge ── */
.branch-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff; border: 1px solid #d6e9de; border-radius: 100px;
  padding: .4rem .9rem; font-size: .78rem; font-weight: 500;
  color: var(--nln-dark); text-decoration: none; transition: .18s; margin: .2rem;
}
.branch-badge:hover { background: var(--nln-green); border-color: var(--nln-green); color: #fff; }
.branch-badge i { font-size: .76rem; color: var(--nln-green); }
.branch-badge:hover i { color: #fff; }

/* ── Result cards ── */
.result-card {
  background: #fff; border: 1px solid var(--nln-border);
  border-radius: 12px; padding: 1.3rem 1.5rem; transition: .2s; margin-bottom: .9rem;
}
.result-card:hover { border-color: var(--nln-green); box-shadow: 0 5px 18px rgba(10,92,54,.09); }
.result-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--nln-light); color: var(--nln-green);
  border-radius: 6px; padding: .18rem .55rem; font-size: .72rem; font-weight: 700;
}
.result-found-msg {
  background: var(--nln-light); border-left: 4px solid var(--nln-green);
  border-radius: 8px; padding: .85rem 1.1rem; font-size: .88rem; margin-bottom: 1.4rem;
}
.result-not-found {
  background: #fff8e6; border-left: 4px solid var(--nln-gold);
  border-radius: 8px; padding: .9rem 1.3rem; text-align: center;
}

/* ── Footer ── */
.nln-footer {
  background: var(--nln-dark); color: rgba(255,255,255,.55);
  font-size: .82rem; padding: 2.75rem 0 1.4rem;
  border-top: 3px solid var(--nln-gold); margin-top: 3rem;
}
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--nln-gold); }
.footer-link { color: rgba(255,255,255,.45); text-decoration: none; display: block; margin-bottom: .35rem; transition: color .18s; }
.footer-link:hover { color: var(--nln-gold); }
.footer-hr { border-color: rgba(255,255,255,.09); margin: 1.75rem 0 .9rem; }

/* ── Helpers ── */
.bg-nln-light { background: var(--nln-light); }
.text-nln-green { color: var(--nln-green) !important; }
.text-nln-gold  { color: var(--nln-gold) !important; }

/* ── Responsive ── */
@media (max-width: 767px) {
  .nln-hero { min-height: 360px; }
  .nln-hero::after { height: 36px; }
  .search-card { padding: 1.1rem 1.2rem; border-radius: 10px; }
  .stat-sep { display: none; }
  .hero-title { font-size: 1.7rem; }
}
