/* == DEBUGGING === 
* {
  outline: 1px solid red;
}

*/

/* === Page Layout === */
body {
  background-image: url('/images/bg-top.png');
  background-repeat: no-repeat;         /* show only once */
  background-position: top center;      /* position at the top center */
  background-size: auto;                 /* keep original size */
  /* optional: keep it fixed when scrolling */
  /* background-attachment: fixed; */
  /* Optional: set a background color as fallback */
  background-color: #fff;
  font-family: sans-serif;
  line-height: 1.6;
  margin: 0;
}

pre {
  background: #f0f0f0;
  padding: 1rem;
  overflow-x: auto;
}


code {
  font-family: monospace;
}

.page-wrapper {
  width: 100%;
  max-width: 1200px;  /* fixed width on large screens */
  margin: 0 auto;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 0.5rem;
  }
}



.layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* === MAIN & CONTENT === */

main {
  flex: 2 1 60%;
  font-family: Arial, sans-serif;
  padding: 1em;
  margin: auto;
  line-height: 1.6;
}

.note {
  background: #fff8dc;
  border-left: 4px solid orange;
  padding: 1em;
  margin-bottom: 1.5em;
  border-radius: 8px;
}

.legal-note {
  list-style: none;
  padding: 0;
  margin: 1em 0 0;
}
.legal-note li {
  margin-bottom: 0.5em;
}

.step {
  background: #f9f9f9;
  border-left: 4px solid #007acc;
  padding: 1em;
  margin-bottom: 2em;
  border-radius: 8px;
}

.success {
  background: #e0efc5;
  border-left: 4px solid #80cc00;
  padding: 1em;
  margin-bottom: 2em;
  border-radius: 8px;
}

.button {
  background-color: #007acc;
  color: white;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
}
.button:hover {
  background-color: #005f99;
}

.danger {
  color: red;
}



aside {
  flex: 1 1 30%;
  background: #f4f4f4;
  padding: 1rem;
  box-sizing: border-box;
}


/* === LINKS === */
a {
  color: #000;
}

/* === LOGO / CONTAINER === */
.logo-container {
  width: auto;            /* or whatever width fits */
  height: 150px;           /* fix height */
  background-image: url('/images/bg-fixed-2.jpg');  /* your background image */
  background-size: cover;   /* cover the container */
  background-position: center;
  background-repeat: no-repeat;
  
  display: flex;
  align-items: center;     /* vertically center logo */
  justify-content: center; /* horizontally center logo */
  
  border-radius: 8px 8px 0 0;      /* optional rounded corners */
}
.logo-container img {
  max-height: 130px;       /* keep some padding */
  width: auto;
  display: block;
}
@media (max-width: 768px) {
  .logo-container {
    height: 100px; /* reduce container height on mobile */
  }

  .logo-container img {
    max-height: 80px; /* scale logo down on mobile */
  }
}

@media (max-width: 480px) {
  .logo-container {
    height: 80px;
  }

  .logo-container img {
    max-height: 60px;
  }
}



/* === Navigation Menu === */

.main-nav {
  background: #333;
  color: white;
  font-family: sans-serif;
}

/* Reset list styles */
.menu, .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level menu */
.menu {
  display: none; /* hidden on mobile */
  flex-direction: row;
  background: #333;
}

.menu-toggle {
  display: block;
  background: #222;
  color: white;
  padding: 1rem;
  width: 100%;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Menu items */
.menu > li {
  position: relative;
}

.menu a,
.menu button {
  display: inline-flex;           /* Use flex for better vertical alignment */
  align-items: center;            /* Vertically center contents */
  padding: 1rem 1.2rem;
  font-size: 1rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  vertical-align: middle;         /* fallback for inline elements */
  line-height: 1.2;               /* consistent line height */
  font-family: inherit;           /* same font as rest */
}


.menu a:hover,
.menu button:hover,
.menu a:focus,
.menu button:focus {
  background: #030303;
  outline: none;
}

/* Submenu base styles */
.submenu {
  display: none; /* hidden by default */
  background: #444;
  position: static; /* mobile default */
  padding-left: 0;
  margin: 0;
  min-width: 180px;
  box-shadow: none;
  z-index: 9999;
}

.submenu a {
  display: block; /* full width for link */
  padding: 1rem 1.2rem;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.submenu a:hover,
.submenu a:focus {
  background: #030303;
  outline: none;
}

/* Parent menu items with submenu */
.has-submenu {
  position: relative;
}

/* Show submenu when open (mobile toggle) */
.has-submenu.open > .submenu {
  display: block;
}

/* Desktop styles */
@media (min-width: 768px) {
  .menu {
    display: flex; /* show top menu */
  }

  .menu-toggle {
    display: none; /* hide toggle button */
  }

  /* Position submenu absolutely */
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #444;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    display: none;
  }

  /* Show submenu on hover/focus */
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: block;
  }

  /* For sub-submenus, position them to the right */
  .submenu .has-submenu > .submenu {
    top: 0;
    left: 100%;
  }


  /* Make submenu links full width */
  .submenu a,
  .submenu button {
    width: 100%;
    text-align: left;
  }
}

/* FORMULAR */
form {
 /* max-width: 600px; */
 margin: 1rem auto;
 font-family: Arial, sans-serif;
 color: #222;
}
fieldset {
  border: 1px solid #ccc;
  padding: 1rem 1.5rem 2rem;
  border-radius: 4px;
}
legend {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #999;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #005a9c;
  outline: none;
  box-shadow: 0 0 3px 2px rgba(0, 90, 156, 0.5);
}
.form-help {
  font-size: 0.85rem;
  color: #555;
}
button[type="submit"] {
  background-color: #005a9c;
  color: white;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}
button[type="submit"]:hover,
button[type="submit"]:focus {
  background-color: #003d66;
  outline: none;
}

/* formular error */
.error-message {
  color: #cc0000;
  font-size: 0.9em;
  margin-top: 0.2em;
  min-height: 1.2em; /* reserve space */
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #cc0000;
}

/* === Footer === */

.footer {
  display: flex;
  flex-wrap: wrap;
  background: #333;
  color: #fff;
  padding: 20px;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: none;
  font-weight: bold;
}

.footer-column {
  flex: 1 1 100%;        /* Stack columns on small screens */
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
}

.copyright {
  flex: 1 1 100%;         /* Make copyright span full width */
  text-align: center;
  margin-top: 10px;
  font-size: 0.9em;
  color: #ccc;
}

/* Responsive: show 3 columns on wider screens */
@media (min-width: 600px) {
  .footer-column {
    flex: 1 1 33.333%;
    text-align: left;
  }
}

/* ===  ARTICLE FRONT PAGE === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48%, 1fr));
  gap: 1rem;
}

.article-card {
  display: block;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-img {
  width: 100%;
  height: auto;
  object-fit: fill;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  background: #eee;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.article-card h2 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.read-btn {
  display: inline-block;
  margin-top: 1rem;
  background-color: #333a2e;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.read-btn:hover {
  background-color: #8e927b;
  color: #fff;
}

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #222;
}

.card-summary {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: 0.85rem;
  color: #888;
}

/* === ARTICLES == */
.post {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  line-height: 1.7;
  font-size: 1rem;
  color: #222;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: #111;
}

.post-meta {
  font-size: 0.9rem;
  color: #777;
}

.post-content h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
  color: #333;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.3rem;
}

.post-content p,
.post-content li {
  margin-bottom: 1rem;
}

.post-content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.post-content a {
  color: #1976d2;
  text-decoration: none;
}
.post-content a:hover {
  text-decoration: underline;
}

pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

blockquote {
  background: #f0f4f8;
  padding: 1rem;
  margin: 1.5rem 0;
  border-left: 4px solid #2196f3;
  font-style: italic;
  color: #444;
  border-radius: 0.25rem;
}

/* === DEF LIST === */
.definition-list {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: #f9f9f9;
  border-left: 4px solid #1976d2;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.definition-list dt {
  font-weight: 600;
  margin-top: 1rem;
  color: #222;
}

.definition-list dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
  color: #555;
  padding-left: 1rem;
  border-left: 2px solid #ddd;
}
