/* GLOBAL RESET & BODY */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6; color: #212529;
  min-height: 100dvh; display: flex; flex-direction: column;
  padding: 10px 20px; max-width: 1200px; margin: 0 auto;
  overflow-x: hidden;
}

/* HEADER - Red bar with logo + hamburger menu */
header {
  display: flex; justify-content: space-between; align-items: center;
  background: #b7000f; color: white; padding: 1rem; margin: 1rem 0;
  border-radius: 8px; flex-wrap: wrap; font-size: 15px; position: relative;
}

.hamburger {
  display: none; flex-direction: column; justify-content: space-around;
  width: 30px; height: 25px; cursor: pointer;
}
.hamburger span {
  width: 100%;
  height: 4px;             /* THICKER lines = more visible */
  background: white;
  margin: 0;
  transition: 0.3s;
  border-radius: 2px;      /* Rounded edges */
}

.logo { font-weight: bold; font-size: 2rem; }

/* DESKTOP NAV */
nav ul {
  display: flex; list-style: none; gap: 1rem;
}

nav ul li a {
  color: white; text-decoration: none; padding: 0.5rem 0; display: block;
}

nav ul li a:hover { text-decoration: underline; }

/* MAIN CONTENT */
main {
  flex: 1; margin: 1rem 0; padding: 1rem; border-radius: 8px;
  box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
/*margin-bottom: 20px;*/

}

p { margin-bottom: 1.5rem; }

/* ARTICLES GRID - Core feature */
.articles-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: 1200px; margin: 0 auto;
}

.article-card {
  display: flex; height: 180px; border-radius: 10px; overflow: hidden;
  border: 1px solid #cfd5db; cursor: pointer; transition: box-shadow 0.3s;
  gap: 15px;
}

.article-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.article-image {
  width: 280px; max-width: 400px; height: auto; object-fit: cover;
  flex-shrink: 0; border-radius: 8px 0 0 8px;
}

.article-content {
  flex: 1; padding: 25px; display: flex; flex-direction: column;
  justify-content: center;
}

.article-title {
  font-weight: 600; font-size: 1.3em; margin-bottom: 15px; line-height: 1.3;
}

.article-summary { color: #555; margin-bottom: 15px; flex-grow: 1; }

.article-date {
  font-size: 0.9em; color: #666; margin-bottom: 10px; letter-spacing: 0.5px;
}

/* COUNTERS - Used by tracker.php */
.counters {
  text-align: center; margin: 20px 0; padding: 20px; 
  color: #cfd5db;
/*   background: #f8f9fa;
  border-radius: 8px; */
}

.counters div { display: inline-block; margin: 0 20px; }

#ip-count, #session-count {
  color: #cfd5db; font-size: 10px;
}

/* FOOTER */
footer {
  margin-top: auto; background: #b7000f; color: white; text-align: center;
  padding: 0.5rem; font-size: 0.8rem;
}

/* ========================================
   MOBILE RESPONSIVE - Critical for congress blog
=========================================== */
@media (max-width: 768px) {
  body { padding: 10px; }
  header {
    flex-direction: row;
    padding: 1rem;
    align-items: flex-start;
    gap: 0;
    position: relative;
  }
  
  .logo {
    font-size: 1.1rem;
    line-height: 1.3;
    flex: 1;           /* Takes available space */
    max-width: calc(100% - 50px); /* Leave room for hamburger */
  }
  
  nav {
    flex-shrink: 0;    /* Hamburger never shrinks */
    margin-left: auto; /* Pushes to RIGHT */
  }
  
  .hamburger {
    display: flex !important;
    margin-left: 10px; /* Space from text */
    order: 2;          /* Ensures right position */
  }
  nav ul {
    display: none; flex-direction: column; background: #b7000f; width: 100%;
    position: absolute; top: 70px; left: 0; z-index: 1000; padding: 0;
  }
  nav ul.active { display: flex; }
  nav ul li { width: 100%; }
  nav ul li a { padding: 1rem 20px; border-top: 1px solid rgba(255,255,255,0.1); }
  
  .article-card { flex-direction: column; height: auto; }
  .article-image {
    width: 100%; height: 200px; max-width: none; border-radius: 8px 8px 0 0;
  }
  main { margin: 0.5rem 0; padding: 0.5rem; }
}
/* MOBILE: Sidebar unten */

  .page-container { padding-right: 0 !important; }
  .sidebar {
    position: static !important;
    width: 100%;
    margin: 20px 0;
    max-height: none;
  }


/* ========================================
   UNUSED CODE 
=========================================== */
/*
.container {}  → Not in index.php
.btn, .btn2, .btn3 {} → Button classes unused
h1, h2, h3 {} → Heading styles unused in cards
.article-title a {} → No links in titles
*/