/**
 * GemeentenEnAI.nl - Geautomatiseerde AI-nieuws aggregator
 * 
 * Main stylesheet - WCAG compliant
 */

/* Reset and base styles */
:root {
  --primary-color: #1a73e8;
  --primary-color-dark: #0d47a1; /* Donkere versie van de primaire kleur */
  --secondary-color: #34a853;
  --text-color: #202124;
  --light-text: #5f6368;
  --background-color: #ffffff;
  --light-background: #f8f9fa;
  --border-color: #dadce0;
  --focus-color: #1a73e8;
  --error-color: #ea4335;
  --success-color: #34a853;
  --font-family: 'Roboto', 'Arial', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover, a:focus {
  text-decoration: none;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
  padding: 2rem 0;
}

/* Header */
header {
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.logo:hover, .logo:focus {
  text-decoration: underline;
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
}

nav li {
  margin-left: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

nav a:hover, nav a:focus, nav a.active {
  color: var(--primary-color);
  text-decoration: underline;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  background-color: var(--light-background);
  position: relative;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  text-align: center;
  overflow: hidden; /* Zorgt ervoor dat de achtergrond binnen de grenzen blijft */
}

.hero-content {
  position: relative;
  z-index: 1; /* Zorgt ervoor dat de tekst boven de overlay komt */
}

.hero h1 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Articles */
.articles {
  margin-bottom: 3rem;
}

.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

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

.article-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

/* Uitgelichte artikelen styling */
.article-card--featured {
  border: none;
  box-shadow: 0 0 15px rgba(26, 115, 232, 0.15);
  background: linear-gradient(to bottom, rgba(230, 242, 255, 0.8), white);
}

.article-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  background: linear-gradient(to bottom, rgba(26, 115, 232, 0.5), transparent) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Geen label meer voor uitgelichte artikelen */

/* Specifieke styling voor top en middle positie */
.article-card--featured-top {
  background: linear-gradient(to bottom, rgba(230, 242, 255, 0.9), white);
}

.article-card--featured-middle {
  background: linear-gradient(to bottom, rgba(230, 242, 255, 0.7), white);
}

.article-card {
  background-color: var(--background-color);
}

.article-card:hover, .article-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.article-card-content {
  padding: 1.5rem;
}

.article-card h3 {
  margin-bottom: 0.5rem;
}

.article-meta {
  display: flex;
  color: var(--light-text);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-date, .article-category {
  margin-right: 1rem;
}

.article-excerpt {
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Single article */
.single-article {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.article-content {
  margin: 2rem 0;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

/* Commentaarsectie */
.article-comments {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.article-comments h3 {
  margin-bottom: 1.5rem;
}

.comment-form-container {
  margin-bottom: 2rem;
}

.comment-form {
  background-color: var(--light-background);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.comment-form:focus-within {
  box-shadow: 0 5px 15px rgba(26, 115, 232, 0.1);
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-family);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.comment-form .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.comment-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  display: none;
}

.comment-status.success {
  display: block;
  background-color: rgba(52, 168, 83, 0.1);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.comment-status.error {
  display: block;
  background-color: rgba(234, 67, 53, 0.1);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

.comments-list {
  margin-top: 2rem;
}

.comment {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--background-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comment:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.comment.top-voted {
  border: 2px solid var(--success-color);
  box-shadow: 0 5px 15px rgba(52, 168, 83, 0.15);
}

.comment-replies .comment.top-voted {
  border: 2px solid var(--success-color);
  box-shadow: 0 5px 15px rgba(52, 168, 83, 0.15);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.comment-author {
  font-weight: 600;
}

.comment-date {
  color: var(--light-text);
  font-size: 0.9rem;
}

.comment-content {
  margin-bottom: 1rem;
  line-height: 1.5;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vote-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 0.95rem;
}

.vote-btn:hover {
  background-color: var(--light-background);
}

.vote-btn.upvote.active {
  color: var(--success-color);
}

.vote-btn.downvote.active {
  color: var(--error-color);
}

.vote-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.comment-score {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.9rem;
}

.score-value {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background-color: var(--light-background);
}

.hidden-comment {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--light-background);
}

.comment-hidden-notice {
  color: var(--light-text);
  font-style: italic;
}

.comment-hidden-notice a {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
}

.comment-content-hidden {
  margin-top: 1rem;
}

.comment-deleted-notice {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--light-background);
  color: var(--light-text);
  font-style: italic;
  text-align: center;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.reply-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 15px;
  font-weight: 500;
}

.reply-btn:hover {
  background-color: var(--primary-color-dark);
}

.delete-comment-btn {
  background-color: var(--error-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 15px;
  font-weight: 500;
}

.delete-comment-btn:hover {
  background-color: #c9302c;
}

.comment-replies {
  margin-top: 1.5rem;
  margin-left: 2rem;
  border-left: 3px solid var(--border-color);
  padding-left: 1.5rem;
  position: relative;
}

.comment-replies::before {
  content: '';
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 20px;
  background-color: var(--border-color);
}

.comment.reply {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--background-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.comment.reply:last-child {
  margin-bottom: 0;
}

.btn-secondary {
  background-color: var(--light-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.no-comments {
  font-style: italic;
  color: var(--light-text);
}

.article-source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-style: italic;
  color: var(--light-text);
}

/* Article feedback */
.article-feedback {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--light-background);
  border-radius: 8px;
  text-align: center;
}

.feedback-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  margin: 0 0.5rem;
  padding: 0.5rem;
}

.feedback-btn:hover, .feedback-btn:focus {
  transform: scale(1.2);
}

.feedback-message {
  display: block;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Category filter */
.category-filter {
  margin-bottom: 1rem;
}

.category-filter select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--background-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  list-style: none;
}

.pagination li {
  margin: 0 0.25rem;
}

.pagination a, .pagination span {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
}

.pagination a:hover, .pagination a:focus {
  background-color: var(--light-background);
}

.pagination .active span {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--light-background);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-section {
  margin-bottom: 1.5rem;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--light-text);
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 1rem;
}

.btn:hover, .btn:focus {
  background-color: var(--primary-color-dark);
}

.btn-secondary {
  background-color: var(--light-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--border-color);
}

/* Error messages */
.error-message {
  text-align: center;
  padding: 3rem 1rem;
}

.error-message h2 {
  margin-bottom: 1rem;
}

.error-message p {
  margin-bottom: 2rem;
}

/* About page */
.about-page {
  max-width: 800px;
  margin: 0 auto;
}

.about-page h2 {
  margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    margin-top: 1rem;
    flex-direction: column;
  }
  
  nav li {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }
  
  .articles-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .articles-header h2 {
    margin-bottom: 1rem;
  }
  
  .footer-container {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Gemeente lijst */
.gemeente-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.gemeente-list li {
  padding: 8px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.gemeente-list li:hover {
  background-color: #e9e9e9;
}

.gemeente-list li.active {
  background-color: #e6f0fa;
  font-weight: bold;
}

.gemeente-list .count {
  color: #666;
  font-size: 0.9em;
}

/* Privacy Page Styling */
.privacy-page h1 {
    margin-bottom: 1rem;
}

.privacy-page section {
    margin-bottom: 2rem;
}

.privacy-page h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.privacy-page .last-updated {
    margin-bottom: 2rem;
    font-style: italic;
    color: #666;
}

.privacy-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.privacy-page li {
    margin-bottom: 0.5rem;
}

/* Cookie Banner Styling */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid #ddd;
}

#cookie-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#cookie-banner p {
    margin: 0 20px 0 0;
    flex: 1;
}

#cookie-banner .cookie-buttons {
    display: flex;
    gap: 10px;
}

#cookie-banner button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#accept-cookies {
    background-color: #4CAF50;
    color: white;
}

#reject-cookies {
    background-color: #f1f1f1;
    color: #333;
}

@media (max-width: 768px) {
    #cookie-banner .container {
        flex-direction: column;
    }
    
    #cookie-banner p {
        margin-bottom: 10px;
    }
}

/* Gemeente tags */
.article-tags {
  margin: 20px 0;
}

.article-tag {
  display: inline-block;
  background-color: #e6f0fa;
  color: #0066cc;
  padding: 5px 10px;
  margin-right: 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.article-tag:hover {
  background-color: #d0e4f7;
  text-decoration: none;
}

.article-tag i {
  margin-right: 5px;
  font-size: 0.8rem;
}

/* Print styles */
@media print {
  header, footer, .article-feedback, .related-articles {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .article-source {
    font-size: 10pt;
  }
  
  @page {
    margin: 2cm;
  }
}
