/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

a {
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: #252c33;
  padding: 10px 0 38px;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-block;
  margin-left: 30px;
}

.logo img {
  display: block;
  width: 460px;
  max-width: 100%;
  height: auto;
}

/* Right side of the header: language flags (+ hamburger on mobile) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-btn {
  display: block;
  width: 36px;
  height: 24px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}

.lang-btn svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  opacity: 0.85;
  transform: translateY(-1px);
}

.lang-btn.active {
  opacity: 1;
  border-color: #fff;
  cursor: default;
  transform: none;
}

/* Hide the page until translations are applied (avoids a flash of empty text) */
.i18n-loading body {
  visibility: hidden;
}

/* Hamburger button (only shown on mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #f2f2f2;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: #252c33;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Navigation ---------- */
.main-nav {
  flex-basis: 100%;
  margin: 55px 0 0 28px;
}

.main-nav > ul {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f2f2f2;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.main-nav > ul > li {
  position: relative;
  border-right: 1px solid #ddd;
}

.main-nav > ul > li:first-child > a {
  border-radius: 4px 0 0 4px;
}

.main-nav > ul > li > a,
.dropdown-toggle {
  display: block;
  padding: 15px 25px;
  font-family: inherit;
  font-size: 12px;
  line-height: normal;
  text-transform: uppercase;
  color: #555;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.main-nav > ul > li.active > a,
.main-nav > ul > li.active > .dropdown-toggle,
.main-nav > ul > li.open > .dropdown-toggle {
  background: #fff;
  color: #111;
  font-weight: bold;
}

/* ---------- Dropdown ---------- */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #d40000;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.has-dropdown.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 12px 18px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  transition: background 0.15s, color 0.15s;
}

.dropdown li a:hover,
.dropdown li a:focus {
  background: #ff1a1a;
  color: #8a0000;
}

/* Hover behaviour only on devices with a real mouse */
@media (hover: hover) and (min-width: 769px) {
  .main-nav > ul > li:hover > a,
  .main-nav > ul > li:hover > .dropdown-toggle {
    background: #fff;
    color: #111;
    font-weight: bold;
  }

  .has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ---------- Content ---------- */
.site-content {
  flex: 1;
  padding: 40px 0;
}

/* ---------- Article pages ---------- */
.page-article {
  max-width: 820px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.page-article h1 {
  margin: 0 0 24px;
  font-size: 32px;
  line-height: 1.25;
  text-align: center;
  color: #252c33;
}

.page-article h2 {
  margin: 44px 0 18px;
  padding-bottom: 10px;
  font-size: 22px;
  line-height: 1.3;
  color: #252c33;
  border-bottom: 3px solid #d40000;
}

.page-article p {
  margin: 0 0 18px;
}

/* Wide variant (pages with tabs, lists...) with a red left-aligned title */
.page-article--wide {
  max-width: none;
}

.page-article h1.page-title {
  margin-bottom: 28px;
  padding-bottom: 8px;
  font-size: 30px;
  font-weight: normal;
  text-align: left;
  color: #d40000;
  border-bottom: 5px solid #eee;
}

/* ---------- Under construction notice ---------- */
.under-construction {
  position: relative;
  max-width: 560px;
  margin: 48px auto;
  padding: 44px 28px 36px;
  text-align: center;
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 6px;
  overflow: hidden;
}

/* hazard stripe along the top */
.under-construction::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(-45deg, #d40000 0 14px, #252c33 14px 28px);
}

/* inside a tab panel the panel's own padding is enough */
.tab-panel .under-construction {
  margin-top: 16px;
  margin-bottom: 16px;
}

.under-construction .uc-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
}

.page-article .uc-title {
  margin: 0 0 10px;
  padding: 0;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #252c33;
  border: 0;
}

.page-article .uc-text {
  margin: 0;
  color: #666;
}

/* ---------- Tabs ---------- */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid #ddd;
}

.tab {
  margin-bottom: -1px;
  padding: 10px 15px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #337ab7;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab:hover,
.tab:focus-visible {
  color: #23527c;
  background: #eee;
}

.tab[aria-selected="true"] {
  color: #555;
  background: #fff;
  border-bottom-color: #fff;
  cursor: default;
}

.tab-panel {
  min-height: 160px;
  padding: 20px;
  border: 1px solid #ddd;
  border-top: 0;
}

/* ---------- Media appearances ---------- */
.page-article .media-intro {
  margin: 0 0 4px;
  color: #666;
}

.page-article .media-year {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 14px;
  padding: 0;
  font-size: 20px;
  color: #252c33;
  border: 0;
}

.page-article .media-year::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.media-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.media-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-left: 4px solid #d40000;
  border-radius: 4px;
  transition: box-shadow 0.15s, transform 0.15s;
}

.media-item:hover,
.media-item:focus-within {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.media-date {
  flex: 0 0 56px;
  padding: 7px 0;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  background: #252c33;
  border-radius: 4px;
}

.media-day {
  display: block;
  font-size: 22px;
  font-weight: bold;
}

.media-month {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ccc;
}

.media-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.media-link {
  font-size: 17px;
  font-weight: bold;
  line-height: 1.35;
  color: #252c33;
}

/* The whole card is clickable */
.media-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.media-link:hover,
.media-link:focus-visible {
  color: #d40000;
}

.media-source {
  font-size: 12px;
  color: #777;
}

.media-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: #aaa;
  transition: fill 0.15s;
}

.media-item:hover .media-icon,
.media-item:focus-within .media-icon {
  fill: #d40000;
}

.article-figure {
  margin: 0 0 24px;
}

.article-figure img {
  display: block;
  max-width: min(100%, 450px);
  height: auto;
  margin: 0 auto;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.page-article .article-lead {
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  color: #d40000;
}

.page-article .article-motto {
  margin-top: 28px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  color: #d40000;
}

/* ---------- Post card (home page) ---------- */
.post-card {
  margin-bottom: 40px;
}

.post-title {
  margin: 0 0 18px;
  padding-bottom: 8px;
  font-size: 28px;
  font-weight: normal;
  line-height: 1.25;
  border-bottom: 5px solid #eee;
}

.post-title a {
  color: #d40000;
}

.post-title a:hover,
.post-title a:focus {
  color: #a30000;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  font-size: 12px;
  color: #111;
}

.post-meta svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.post-body {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.post-thumb {
  flex: 0 0 200px;
}

.post-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.post-text {
  flex: 1;
  min-width: 0;
}

.post-text p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  padding: 11px 15px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.3;
  text-transform: uppercase;
  color: #fff;
  background: #d40000;
  border-radius: 3px;
  transition: background 0.15s;
}

.read-more:hover,
.read-more:focus {
  background: #a30000;
}

.content-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.main-column {
  flex: 1;
  min-width: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-box {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
  /* the PNG has a lot of built-in white padding; trim it */
  aspect-ratio: 7 / 5;
  object-fit: cover;
}

.sidebar-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-size: 15px;
  text-transform: uppercase;
  color: #252c33;
  border-bottom: 3px solid #d40000;
}

.social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  background: #f2f2f2;
  color: #333;
  transition: background 0.15s, transform 0.15s;
}

.social-link:hover,
.social-link:focus {
  background: #e8e8e8;
  transform: translateX(3px);
}

.social-icon {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.instagram .social-icon {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.facebook .social-icon {
  background: #1877f2;
}

.social-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social-text strong {
  font-size: 14px;
}

.social-text small {
  font-size: 12px;
  color: #777;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #252c33;
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  padding: 18px 0;
}

/* ---------- Medium screens: tighten the menu so it fits ---------- */
@media (max-width: 960px) and (min-width: 769px) {
  .logo {
    margin-left: 0;
  }

  .main-nav {
    margin: 40px 0 0;
  }

  .main-nav > ul > li > a,
  .dropdown-toggle {
    padding: 15px 16px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .site-header {
    padding: 14px 0;
  }

  .logo {
    margin-left: 0;
    max-width: calc(100% - 150px);
  }

  .header-actions {
    gap: 10px;
  }

  .lang-switcher {
    gap: 6px;
  }

  .lang-btn {
    width: 30px;
    height: 20px;
  }

  .logo img {
    width: 300px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    margin: 14px 0 0;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    display: block;
    width: 100%;
  }

  .main-nav > ul > li {
    border-right: 0;
    border-bottom: 1px solid #ddd;
  }

  .main-nav > ul > li:last-child {
    border-bottom: 0;
  }

  .main-nav > ul > li:first-child > a {
    border-radius: 4px 4px 0 0;
  }

  .main-nav > ul > li > a,
  .dropdown-toggle {
    width: 100%;
    padding: 15px 18px;
    font-size: 14px;
    text-align: left;
  }

  /* Small arrow on items that open a submenu */
  .dropdown-toggle {
    position: relative;
  }

  .dropdown-toggle::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s, margin-top 0.2s;
  }

  .has-dropdown.open > .dropdown-toggle::after {
    margin-top: -2px;
    transform: rotate(-135deg);
  }

  /* Submenus expand inline instead of floating */
  .dropdown {
    position: static;
    display: none;
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .has-dropdown.open > .dropdown {
    display: block;
  }

  .dropdown li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .dropdown li a {
    padding: 13px 18px 13px 32px;
    text-align: left;
    white-space: normal;
  }

  .page-article {
    font-size: 15px;
  }

  .page-article h1 {
    font-size: 24px;
  }

  .page-article h2 {
    margin-top: 32px;
    font-size: 19px;
  }

  .page-article .article-lead,
  .page-article .article-motto {
    font-size: 19px;
  }

  .page-article h1.page-title {
    font-size: 24px;
  }

  .under-construction {
    margin: 28px auto;
    padding: 38px 18px 28px;
  }

  .page-article .uc-title {
    font-size: 21px;
  }

  /* Tabs stack vertically on phones */
  .tab-list {
    flex-direction: column;
    gap: 4px;
    border-bottom: 0;
  }

  .tab {
    margin-bottom: 0;
    padding: 12px 14px;
    font-size: 15px;
    text-align: left;
    border-radius: 4px;
  }

  .tab[aria-selected="true"] {
    border-color: #d40000;
    border-left-width: 4px;
  }

  .tab-panel {
    margin-top: 8px;
    padding: 14px 12px;
    border-top: 1px solid #ddd;
    border-radius: 4px;
  }

  .media-item {
    gap: 12px;
    padding: 10px 12px 10px 10px;
  }

  .media-date {
    flex-basis: 48px;
  }

  .media-day {
    font-size: 19px;
  }

  .media-link {
    font-size: 15px;
  }

  .media-icon {
    display: none;
  }

  .post-title {
    font-size: 22px;
  }

  .post-body {
    flex-direction: column;
    gap: 16px;
  }

  .post-thumb {
    flex-basis: auto;
    width: 100%;
    max-width: 280px;
  }

  .post-text p {
    font-size: 16px;
  }

  /* Sidebar drops below the main content */
  .site-content {
    padding: 24px 0;
  }

  .content-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .sidebar {
    flex-basis: auto;
  }

  .site-footer {
    font-size: 12px;
  }
}
