/*
Theme Name: London Accident News
Theme URI: https://londonaccidentnews.co.uk
Description: Pinterest-inspired news theme for London Accident News — built for Elementor Pro.
Author: LAN Development Team
Author URI: https://londonaccidentnews.co.uk
Template: hello-elementor
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lan-theme
*/

/* ============================================================
   LONDON ACCIDENT NEWS — Design System
   Based on Pinterest Design Language
   Font: Inter (Pin Sans substitute)
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */
:root {
  /* --- Colors: Brand & Accent --- */
  --lan-primary: #e60023;
  --lan-on-primary: #ffffff;
  --lan-primary-pressed: #cc001f;
  --lan-primary-hover: #d0001f;

  /* --- Colors: Surface --- */
  --lan-canvas: #ffffff;
  --lan-surface-soft: #fbfbf9;
  --lan-surface-card: #f6f6f3;
  --lan-surface-elevated: #ffffff;
  --lan-secondary-bg: #e5e5e0;
  --lan-secondary-pressed: #c8c8c1;
  --lan-surface-dark: #262622;
  --lan-hairline: #dadad3;
  --lan-hairline-soft: #e5e5e0;

  /* --- Colors: Text --- */
  --lan-ink: #000000;
  --lan-ink-soft: #211922;
  --lan-body: #33332e;
  --lan-charcoal: #262622;
  --lan-mute: #62625b;
  --lan-ash: #91918c;
  --lan-stone: #c8c8c1;
  --lan-on-dark: #ffffff;
  --lan-on-dark-mute: rgba(255, 255, 255, 0.7);
  --lan-on-secondary: #000000;

  /* --- Colors: Semantic --- */
  --lan-error: #9e0a0a;
  --lan-error-deep: #cc001f;
  --lan-success-deep: #103c25;
  --lan-success-pale: #c7f0da;
  --lan-focus-outer: #435ee5;
  --lan-focus-inner: #ffffff;

  /* --- Colors: Category --- */
  --lan-cat-road: #e60023;
  --lan-cat-workplace: #c76800;
  --lan-cat-transport: #0066cc;
  --lan-cat-legal: #6845ab;
  --lan-cat-health: #0f7b46;
  --lan-cat-opinion: #91918c;

  /* --- Typography --- */
  --lan-font-family: 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* --- Rounded --- */
  --lan-rounded-none: 0px;
  --lan-rounded-sm: 8px;
  --lan-rounded-md: 16px;
  --lan-rounded-lg: 32px;
  --lan-rounded-full: 9999px;

  /* --- Spacing --- */
  --lan-space-xxs: 4px;
  --lan-space-xs: 6px;
  --lan-space-sm: 8px;
  --lan-space-md: 12px;
  --lan-space-lg: 16px;
  --lan-space-xl: 24px;
  --lan-space-xxl: 32px;
  --lan-space-section: 64px;

  /* --- Layout --- */
  --lan-max-width: 1280px;
  --lan-nav-height: 64px;
  --lan-article-width: 680px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--lan-font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--lan-body);
  background-color: var(--lan-canvas);
}

::selection {
  background-color: rgba(230, 0, 35, 0.12);
  color: var(--lan-ink);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Global meta dot separator */
.lan-meta-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--lan-ash);
  flex-shrink: 0;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================================
   3. BUTTONS
   ============================================================ */
.lan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lan-space-sm);
  font-family: var(--lan-font-family);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--lan-rounded-md);
  padding: 6px 14px;
  height: 40px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.lan-btn:focus-visible {
  outline: 2px solid var(--lan-focus-outer);
  outline-offset: 2px;
}

.lan-btn-primary {
  background-color: var(--lan-primary);
  color: var(--lan-on-primary);
}
.lan-btn-primary:hover {
  background-color: var(--lan-primary-hover);
  transform: scale(1.02);
}
.lan-btn-primary:active {
  background-color: var(--lan-primary-pressed);
  transform: scale(0.98);
}

.lan-btn-secondary {
  background-color: var(--lan-secondary-bg);
  color: var(--lan-on-secondary);
}
.lan-btn-secondary:hover {
  background-color: #d8d8d2;
}

.lan-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--lan-surface-card);
  color: var(--lan-ink);
  border-radius: var(--lan-rounded-full);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.lan-btn-icon:hover {
  background-color: var(--lan-secondary-bg);
  color: var(--lan-primary);
}
.lan-btn-icon:focus-visible {
  outline: 2px solid var(--lan-focus-outer);
  outline-offset: 2px;
}

.lan-btn-lg {
  height: 48px;
  padding: 8px 20px;
  font-size: 16px;
}

/* ============================================================
   4. INPUTS
   ============================================================ */
.lan-text-input {
  width: 100%;
  background-color: var(--lan-canvas);
  color: var(--lan-ink);
  font-family: var(--lan-font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  border-radius: var(--lan-rounded-md);
  border: 1px solid var(--lan-ash);
  padding: 11px 15px;
  height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lan-text-input::placeholder {
  color: var(--lan-ash);
}
.lan-text-input:focus {
  outline: none;
  border-color: var(--lan-ink);
  border-width: 2px;
  padding: 10px 14px;
  box-shadow: 0 0 0 4px var(--lan-focus-outer);
}

/* ============================================================
   5. CATEGORY COLOR CLASSES
   ============================================================ */
.lan-cat-road { color: var(--lan-cat-road) !important; }
.lan-cat-workplace { color: var(--lan-cat-workplace) !important; }
.lan-cat-transport { color: var(--lan-cat-transport) !important; }
.lan-cat-legal { color: var(--lan-cat-legal) !important; }
.lan-cat-health { color: var(--lan-cat-health) !important; }
.lan-cat-opinion { color: var(--lan-cat-opinion) !important; }

/* ============================================================
   6. UTILITIES
   ============================================================ */
.lan-container {
  max-width: var(--lan-max-width);
  margin: 0 auto;
  padding: 0 var(--lan-space-xl);
}

.lan-section {
  max-width: var(--lan-max-width);
  margin: 0 auto;
  padding: var(--lan-space-section) var(--lan-space-xl);
}

.lan-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--lan-space-xl);
}
.lan-section-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.2px;
  color: var(--lan-ink);
}
.lan-section-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--lan-primary);
  transition: opacity 0.15s ease;
}
.lan-section-link:hover {
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lan-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   7. ANIMATION
   ============================================================ */
.lan-fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.lan-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   8. RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --lan-space-section: 48px;
  }
}

@media (max-width: 480px) {
  :root {
    --lan-space-section: 32px;
  }
}

/* ============================================================
   9. PRIMARY NAVIGATION
   ============================================================ */
.lan-primary-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--lan-canvas);
  height: var(--lan-nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--lan-space-xl);
  border-bottom: 1px solid var(--lan-hairline);
}
.lan-nav-inner {
  display: flex;
  align-items: center;
  gap: var(--lan-space-xl);
  width: 100%;
  max-width: var(--lan-max-width);
  margin: 0 auto;
}
.lan-logo {
  display: flex;
  align-items: center;
  gap: var(--lan-space-sm);
  flex-shrink: 0;
  transition: opacity 0.15s ease;
  text-decoration: none;
}
.lan-logo:hover { opacity: 0.8; }
.lan-logo-icon {
  width: 28px;
  height: 28px;
  background-color: var(--lan-primary);
  border-radius: var(--lan-rounded-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lan-on-primary);
  font-weight: 700;
  font-size: 16px;
}
.lan-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--lan-ink);
  letter-spacing: -0.3px;
}
.lan-logo-accent {
  color: var(--lan-primary);
}

/* Nav Links (desktop) */
.lan-nav-links {
  display: flex;
  align-items: center;
  gap: var(--lan-space-lg);
}
.lan-nav-links a,
.lan-nav-links .menu-item a {
  font-size: 14px;
  font-weight: 600;
  color: var(--lan-ink);
  transition: color 0.15s ease;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}
.lan-nav-links a:hover,
.lan-nav-links .menu-item a:hover {
  color: var(--lan-primary);
}
.lan-nav-links a::after,
.lan-nav-links .menu-item a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--lan-primary);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.lan-nav-links a:hover::after,
.lan-nav-links .menu-item a:hover::after {
  transform: scaleX(1);
}
.lan-nav-links a:focus-visible,
.lan-nav-links .menu-item a:focus-visible {
  outline: 2px solid var(--lan-focus-outer);
  outline-offset: 4px;
  border-radius: 2px;
}

/* wp_nav_menu <li> reset */
.lan-nav-links .menu-item {
  list-style: none;
  display: inline;
}

/* Search */
.lan-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 600px;
}
.lan-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--lan-ash);
  pointer-events: none;
}
.lan-search-bar {
  width: 100%;
  background-color: var(--lan-surface-card);
  color: var(--lan-ink);
  font-family: var(--lan-font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  border-radius: var(--lan-rounded-full);
  border: 1px solid transparent;
  padding: 11px 15px 11px 44px;
  height: 48px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.lan-search-bar::placeholder {
  color: var(--lan-ash);
}
.lan-search-bar:focus {
  background-color: var(--lan-canvas);
  border-color: var(--lan-ash);
  outline: none;
}

/* Nav Actions */
.lan-nav-actions {
  display: flex;
  align-items: center;
  gap: var(--lan-space-md);
  margin-left: auto;
  flex-shrink: 0;
}

/* Mobile search button — hidden on desktop */
.lan-nav-search-mobile {
  display: none;
}

/* Hamburger — hidden on desktop */
.lan-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.lan-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--lan-ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.lan-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.lan-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.lan-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Drawer */
.lan-mobile-nav {
  display: none;
  position: fixed;
  top: var(--lan-nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--lan-canvas);
  z-index: 99;
  padding: var(--lan-space-xl);
  flex-direction: column;
  gap: var(--lan-space-lg);
  overflow-y: auto;
}
.lan-mobile-nav.active {
  display: flex;
}
.lan-mobile-nav a,
.lan-mobile-nav .menu-item a {
  font-size: 18px;
  font-weight: 600;
  color: var(--lan-ink);
  padding: var(--lan-space-md) 0;
  border-bottom: 1px solid var(--lan-hairline-soft);
  transition: color 0.15s ease, padding-left 0.15s ease;
  text-decoration: none;
  display: block;
}
.lan-mobile-nav a:hover,
.lan-mobile-nav .menu-item a:hover {
  color: var(--lan-primary);
  padding-left: var(--lan-space-sm);
}

/* wp_nav_menu <li> reset in mobile */
.lan-mobile-nav .menu-item {
  list-style: none;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.lan-site-footer {
  background-color: var(--lan-surface-soft);
  border-top: 1px solid var(--lan-hairline);
  padding: var(--lan-space-section) var(--lan-space-xl) var(--lan-space-xxl);
}
.lan-footer-inner {
  max-width: var(--lan-max-width);
  margin: 0 auto;
}
.lan-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--lan-space-xxl);
  margin-bottom: var(--lan-space-xxl);
}
.lan-footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--lan-ink);
  margin-bottom: var(--lan-space-lg);
}
.lan-footer-col a,
.lan-footer-col .menu-item a {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--lan-mute);
  padding: var(--lan-space-xxs) 0;
  line-height: 1.6;
  transition: color 0.15s ease;
  text-decoration: none;
}
.lan-footer-col a:hover,
.lan-footer-col .menu-item a:hover {
  color: var(--lan-ink);
}

/* wp_nav_menu <li> reset in footer */
.lan-footer-col .menu-item {
  list-style: none;
}

.lan-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--lan-space-xl);
  border-top: 1px solid var(--lan-hairline-soft);
}
.lan-footer-logo {
  display: flex;
  align-items: center;
  gap: var(--lan-space-sm);
}
.lan-footer-logo-icon {
  width: 22px;
  height: 22px;
  background-color: var(--lan-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lan-on-primary);
  font-weight: 700;
  font-size: 12px;
}
.lan-footer-logo span {
  font-size: 14px;
  font-weight: 600;
  color: var(--lan-ink);
}
.lan-footer-copyright {
  font-size: 12px;
  font-weight: 400;
  color: var(--lan-mute);
}

/* ============================================================
   11. RESPONSIVE — HEADER & FOOTER
   ============================================================ */
@media (max-width: 768px) {
  .lan-nav-links {
    display: none;
  }
  .lan-hamburger {
    display: flex;
  }
  .lan-search-wrapper {
    display: none;
  }
  .lan-nav-search-mobile {
    display: flex;
  }
  .lan-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .lan-footer-grid {
    grid-template-columns: 1fr;
  }
  .lan-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 320px) {
  .lan-primary-nav {
    padding: 0 var(--lan-space-lg);
  }
}
