/*
Theme Name: Skævinge Lokalråd
Theme URI: http://skaevinge.lokalraad.dk
Author: A Gamborg aps
Description: Custom theme for Skævinge Lokalråd — a clean Nordic palette port of the original React/Tailwind site.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skaevinge
*/

:root {
  --primary: #2C3E50;
  --primary-foreground: #ffffff;
  --secondary: #EBF5FB;
  --secondary-foreground: #2C3E50;
  --muted: #f5f5f5;
  --muted-foreground: #6b7280;
  --background: #ffffff;
  --foreground: #1f2937;
  --border: #e5e7eb;
  --radius: 0.5rem;
  --container: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--primary); margin: 0 0 .75rem; line-height: 1.2; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: #fff;
  padding: 1rem 0;
  transition: all .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(255,255,255,.95); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: .5rem 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); letter-spacing: -.02em; }
.site-logo a { color: inherit; }

/* Nav */
.main-nav { display: none; gap: 1.5rem; align-items: center; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--muted-foreground);
  font-size: .9rem; font-weight: 500;
  padding: .5rem 0; display: inline-flex; align-items: center; gap: .25rem;
}
.nav-item:hover > a, .nav-item.current-menu-item > a { color: var(--primary); }
.nav-dropdown {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem; min-width: 220px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
  list-style: none; margin: .25rem 0 0;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { display: block; }
.nav-dropdown li a {
  display: block; padding: .5rem .75rem;
  color: var(--foreground); border-radius: calc(var(--radius) - 2px);
  font-size: .9rem;
}
.nav-dropdown li a:hover { background: var(--secondary); color: var(--primary); }

/* Mobile nav */
.mobile-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; padding: .5rem; }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }
.mobile-nav {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(90vw, 380px); background: #fff;
  padding: 2.5rem 1.5rem; overflow-y: auto;
  box-shadow: -10px 0 25px rgba(0,0,0,.1);
  z-index: 60;
}
.mobile-nav.open { display: block; }
.mobile-nav-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: 0; cursor: pointer; padding: .5rem;
}
.mobile-nav h4 { font-size: 1.1rem; margin-top: 1.5rem; }
.mobile-nav ul { list-style: none; padding-left: 1rem; margin: .5rem 0; border-left: 2px solid var(--secondary); }
.mobile-nav ul li a { display: block; padding: .35rem 0; color: var(--muted-foreground); }
.mobile-nav-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 55;
}
.mobile-nav-backdrop.open { display: block; }

/* Main */
.site-main { flex: 1; padding-top: 72px; }

/* Hero */
.hero {
  min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  background: var(--primary) center/cover no-repeat;
  padding: 4rem 1rem;
  position: relative;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(44,62,80,.45);
}
.hero .container { position: relative; z-index: 1; }
.hero h1, .hero h2 { color: #fff; }
.hero p { font-size: 1.15rem; max-width: 700px; margin: 0 auto 1.5rem; }

/* Buttons */
.btn {
  display: inline-block; padding: .75rem 1.5rem;
  border-radius: var(--radius); font-weight: 500;
  text-decoration: none; transition: opacity .2s; cursor: pointer;
  border: 0;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .9; color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* Section containers */
.section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }

/* Cards */
.cards-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 640px) { .cards-grid.cols-2, .cards-grid.cols-3, .cards-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -5px rgba(0,0,0,.08); }
.card h3 { color: var(--primary); margin-bottom: .5rem; }
.card .card-link { margin-top: auto; padding-top: 1rem; color: var(--primary); font-weight: 500; }
.card img { border-radius: calc(var(--radius) - 2px); margin-bottom: 1rem; }

/* Text-image section */
.text-image {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .text-image { grid-template-columns: 1fr 1fr; }
  .text-image.image-left .text-col { order: 2; }
  .text-image.image-left .image-col { order: 1; }
}
.text-image img { border-radius: var(--radius); width: 100%; }

/* Features */
.features-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features-grid.cols-2, .features-grid.cols-3, .features-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .features-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .features-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.feature { text-align: center; padding: 1rem; }
.feature-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--secondary); color: var(--primary);
  border-radius: 50%;
  font-size: 1.5rem;
}

/* CTA */
.cta-section {
  background: var(--secondary);
  text-align: center;
  padding: 3rem 1rem;
  border-radius: var(--radius);
}

/* Gallery */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) {
  .gallery-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.gallery-grid figure { margin: 0; }
.gallery-grid img { border-radius: var(--radius); display: block; width: 100%; }
.gallery-grid figcaption { font-size: .85rem; color: var(--muted-foreground); margin-top: .25rem; text-align: center; }

/* Accordion */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500;
  color: var(--primary); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.25rem; }
.accordion details[open] summary::after { content: "−"; }
.accordion .accordion-body { padding: 0 1.25rem 1.25rem; }

/* Stats */
.stats-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted-foreground); }

/* Quote */
.quote-block {
  text-align: center; padding: 2rem; max-width: 800px; margin: 0 auto;
  font-style: italic; font-size: 1.15rem; color: var(--foreground);
  border-left: 3px solid var(--primary); background: var(--secondary);
  border-radius: var(--radius);
}
.quote-author { font-style: normal; font-weight: 500; margin-top: 1rem; color: var(--primary); }

/* Intro */
.page-intro { padding: 2.5rem 0 1rem; }
.page-intro h1 { margin-bottom: 1rem; }
.page-intro-text { font-size: 1.1rem; color: var(--muted-foreground); max-width: 800px; }

/* Default content */
.entry-content { padding: 2rem 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }

/* Footer */
.site-footer {
  background: rgba(235,245,251,.5);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--primary); }
.footer-col, .footer-col a { color: var(--muted-foreground); font-size: .9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { margin: .25rem 0; }
.footer-links { display: flex; flex-direction: column; gap: .35rem; }
.social-links { display: flex; gap: .75rem; }
.social-links a {
  background: #fff; padding: .5rem; border-radius: 50%;
  display: inline-flex; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  width: 36px; height: 36px; align-items: center; justify-content: center;
}
.copyright { font-size: .75rem; margin-top: 1.5rem; color: var(--muted-foreground); }
