/*
Theme Name: Fotbollsresor London
Theme URI: https://fotbollsresor-london.se
Author: Gothia Sportstravel
Author URI: https://gothiasportstravel.se
Description: SEO-optimized Swedish WordPress theme for football travel guides to London. Built for ranking on "fotbollsresor London", "fotbollsresor England" and related terms. Includes interactive map, schema markup, Core Web Vitals optimization, and clean Scandinavian design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fotbollsresor-london
Tags: travel, sports, football, seo-optimized, responsive-layout, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */

:root {
  --color-primary: #0a2540;        /* Deep navy — Scandinavian */
  --color-primary-dark: #061729;
  --color-accent: #e30613;         /* Subtle football red accent */
  --color-accent-dark: #b8050f;
  --color-text: #1a1a1a;
  --color-text-muted: #5a6775;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f9fc;
  --color-border: #e4e9f0;
  --color-success: #0a7a3c;

  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container-width: 1200px;
  --container-narrow: 820px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.05);
  --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 37, 64, 0.12);

  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.5em 1.2em;
  margin: 1.5em 0;
  background: var(--color-bg-alt);
  font-style: italic;
  color: var(--color-text-muted);
}

code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  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: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  z-index: 9999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-branding .site-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.site-branding .site-title .accent {
  color: var(--color-accent);
}

.site-description {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.main-navigation li { margin: 0; }

.main-navigation a {
  display: block;
  padding: 10px 16px;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: var(--color-primary);
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .main-navigation ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-border);
  }
  .main-navigation.toggled ul { display: flex; }
  .main-navigation a { padding: 12px 10px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(227, 6, 19, 0.15), transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 820px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.4em;
}

.hero .lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5em;
}

.hero .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 13px 26px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  border: 0;
  cursor: pointer;
  font-size: 0.98rem;
}

.btn:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  padding: 70px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

/* ==========================================================================
   TEAM GRID
   ========================================================================== */

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.team-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.team-card .team-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.team-card .team-stadium {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.team-card .team-league {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* ==========================================================================
   INTERACTIVE MAP
   ========================================================================== */

.map-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #e8eef5;
  border: 1px solid var(--color-border);
}

#london-teams-map {
  width: 100%;
  height: 560px;
  z-index: 1;
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255,255,255,0.96);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  z-index: 2;
}

.leaflet-popup-content {
  margin: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.leaflet-popup-content h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.leaflet-popup-content p { margin: 4px 0; }
.leaflet-popup-content .popup-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  #london-teams-map { height: 420px; }
}

/* ==========================================================================
   ARTICLE / CONTENT GRID
   ========================================================================== */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card .card-image {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  position: relative;
  overflow: hidden;
}

.article-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card .card-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .card-title {
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.article-card .card-title a {
  color: var(--color-primary);
  text-decoration: none;
}

.article-card .card-title a:hover { color: var(--color-accent); }

.article-card .card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
  flex: 1;
}

.article-card .card-meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 12px;
  margin-top: auto;
}

/* ==========================================================================
   CONTENT SECTIONS (long-form)
   ========================================================================== */

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }

.prose ul li::marker { color: var(--color-accent); }

.info-box {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.info-box h4 {
  margin: 0 0 8px;
  color: var(--color-primary);
}

.info-box p:last-child { margin-bottom: 0; }

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 70px 0;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 0.5em;
}

.cta-section p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 1.5em;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
  padding: 16px 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .separator { margin: 0 8px; color: var(--color-border); }
.breadcrumbs .current { color: var(--color-primary); font-weight: 600; }

/* ==========================================================================
   SINGLE POST / PAGE
   ========================================================================== */

.single-post-header {
  padding: 50px 0 30px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.post-meta {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.post-meta .category {
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

.entry-content {
  padding: 50px 0 60px;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 20px 0;
}

/* Related posts */
.related-posts {
  background: var(--color-bg-alt);
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 30px;
}

.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a, .pagination span {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* WP alignment */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1200px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-section { display: none; }
}
