/* SEW-EURODRIVE Themed CSS (CODESYS Releases & Updates–inspired)  */
/* --------------------------------------------------------------- */
:root{
  --sew-red: #d50000;
  --sew-red-dark: #9e0000;
  --text: #333;
  --text-muted: #555;
  --bg: #f4f4f4;
  --card-bg: #fff;
  --card-border: #e6e6e6;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,.12);
}

/* Base */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a, a:link, a:visited { text-decoration: none; color: inherit; }

/* Branding strip and footer */
header, footer {
  background-color: var(--text);
  color: #fff;
  padding: 12px 20px;
}

header div{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1,
header p{
  color: #fff;
  text-align: right;
}

header img{
  text-align: left;
}

footer {
  text-align: center;
  position: sticky;
  width: 100%;
  margin-top: auto;
  font-size: 0.9rem;
  bottom: 0;
}

h1 {
  font-size: 3rem;
  color: #222;
  margin: 0;
}

/* Page content spacing */
.page-body {
  padding: 20px;
}

/* Keep logo spacing behaviour from your original */
img {
  margin-left: 20px;
  margin-right: 10px;
}

/* Headings (slightly refined) */
h2 {
  color: var(--text);
  border-bottom: 2px solid var(--sew-red);
  padding-bottom: 5px;
  margin-bottom: 15px;
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
h1 a {
  color: var(--sew-red);
  text-decoration: none;
  font-weight: bold;
}
h1 a:hover {
  color: var(--sew-red-dark);
}

/* ---- Your layout: kept exactly as you had it ---- */
.editor-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;  /* avoid stretching unevenly */
  margin: 20px 0;
}
#IEC-container,
#MO-container {
  flex: 1 1 0;     /* two equal columns */
  min-width: 320px;/* allows wrapping on small screens */
}
.editor-wrapper a { display: block; } /* full-card link area */

/* Cards (refined to match releases look) */
.release-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 6px solid var(--sew-red);
  padding: 16px 18px;
  border-radius: 6px;
  margin: 12px 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .08s ease, border-color .2s ease;
}
.release-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-left-color: var(--sew-red-dark);
}
.release-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--sew-red);
  border: none;     /* keep the card compact */
  padding: 0;
}
.release-card h3,
.release-card h4 {
  display: inline-block;
  font-size: 0.95rem;
  padding-bottom: 0;
  margin-top: 6px;
  color: var(--sew-red);
  font-weight: 600;
}
.release-card p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--text);
}
.release-card:hover h2,
.release-card:hover h3,
.release-card:hover h4{
  color: var(--sew-red-dark);
}
.release-card:hover p{
  color: #111;
}

/* Responsive stacking (kept from your original) */
@media (max-width: 800px) {
  .editor-wrapper {
    flex-direction: column;
    gap: 0; /* tight stacking */
  }

  #IEC-container,
  #MO-container {
    width: 100%;
    max-width: none;
    min-width: 0;      /* override desktop min-width */
    flex: 0 0 auto;    /* prevent odd flex growth when stacked */

    /* optional "section per screen" feel */
    min-height: 100svh; /* modern "safe" viewport height */
    min-height: 100dvh; /* prefer dynamic viewport if supported */
    overflow: auto;
    box-sizing: border-box;
  }

  .editor-wrapper a { display: block; }
}
