/* ============================================
   BrainBee Belgium — Main Stylesheet
   ============================================ */

/* --- Variables --- */
:root {
  --color-primary: #1a3a6b;      /* Deep navy blue — brain/science */
  --color-secondary: #e8622a;    /* Vibrant orange — energy/passion */
  --color-accent: #4caf8b;       /* Teal green — growth/learning */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fb;
  --color-text: #2c2c2c;
  --color-text-muted: #666666;
  --color-border: #dce3ec;
  --color-hero-bg: #0d2550;

  --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;

  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.15);

  --max-width: 1100px;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--color-secondary);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-primary);
}

h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-height);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.02em;
}

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

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.nav-item a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.nav-item a:hover,
.nav-item.active a {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-decoration: none;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--color-hero-bg) 0%, #1a3a6b 60%, #12294f 100%);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-secondary);
  color: #ffffff;
}

.btn-primary:hover {
  background: #c94e1a;
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* --- Home Sections --- */
.home-section {
  padding: 3.5rem 1.5rem;
}

.home-section:nth-child(even) {
  background: var(--color-bg-alt);
  margin: 0 -1.5rem;
  padding: 3.5rem 3rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-inner h2 {
  margin-bottom: 1rem;
}

.section-inner p {
  max-width: 700px;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Competition info / highlight boxes */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* --- News Grid --- */
.news-section {
  background: var(--color-bg-alt);
  margin: 0 -1.5rem;
  padding: 3.5rem 3rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.news-card,
.post-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 4px solid var(--color-secondary);
}

.news-card:hover,
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.news-card h3, .post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.news-card time, .post-card time {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.news-card p, .post-card p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-secondary);
}

/* --- Page Content (single/list) --- */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.page-body {
  max-width: 760px;
}

.page-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page-body ul,
.page-body ol {
  margin-bottom: 1rem;
}

.page-intro {
  max-width: 700px;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* Post list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-size: 0.88rem;
  opacity: 0.75;
}

.footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 1rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.82rem;
  opacity: 0.65;
  line-height: 1.6;
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Mobile nav */
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
  }

  .nav-toggle-label span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  }

  .nav-toggle:checked ~ .nav-list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 3rem 1rem;
  }

  .home-section:nth-child(even) {
    margin: 0 -1rem;
    padding: 2.5rem 1.5rem;
  }
}

/* --- Tables --- */
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.page-body th {
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
}

.page-body td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.page-body tr:last-child td {
  border-bottom: none;
}

.page-body tr:nth-child(even) td {
  background: var(--color-bg-alt);
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
