/*
Theme Name: MS Europe
Description: Clean rebuild of the mseurope.hu classic Webnode layout (black page, 900px white sheet, orange accents, left sidebar menu). Written from scratch from measured design tokens; no builder CSS.
Version: 1.0.0
Author: AIT
Text Domain: mseurope
*/

:root {
  --c-accent: #ffa82c;
  --c-text: #353535;
  --c-page: #fff;
  --c-bg: #000;
  --f-body: "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
  --w-site: 900px;
  --w-side: 200px;
  --gap: 15px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: 12.8px/1.8 var(--f-body);
}
a { color: var(--c-accent); }
a:hover { color: var(--c-text); }
h1, h2 { font-size: 1.3em; line-height: 1.4; margin: 0 0 7px; font-weight: bold; }
h3 { font-size: 1.1em; margin: 0 0 7px; }
h4 { font-size: 1em; margin: 0 0 7px; }
p { margin: 0 0 5px; }
img { max-width: 100%; }
img:not([height]) { height: auto; }
iframe { max-width: 100%; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 100; background: #fff; padding: 6px 10px; }

/* ---------- sheet ---------- */
#site {
  width: var(--w-site);
  max-width: 100%;
  margin: 0 auto;
  background: var(--c-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.toplinks {
  height: 30px; line-height: 30px;
  text-align: right;
  padding: 0 44px 0 12px;
}
.toplinks a { color: var(--c-text); margin-left: 12px; }
.toplinks a:hover { color: var(--c-accent); }
.toplinks a::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px;
  background: var(--c-accent); vertical-align: 1px;
}

.site-header { padding: 0 13px 0 12px; }
.site-header img { display: block; width: 100%; height: auto; aspect-ratio: 875 / 250; object-fit: cover; }
.site-header .site-name { position: absolute; left: -9999px; }

/* ---------- layout: sidebar left, content right ---------- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--w-side) minmax(0, 1fr);
  grid-template-areas: "menu main" "rest main";
  grid-template-rows: auto 1fr;
  column-gap: var(--gap);
  padding: 50px 30px 20px 27px;
  align-items: start;
}
.side-menu { grid-area: menu; }
.side-rest { grid-area: rest; }
.site-main { grid-area: main; min-width: 0; }

/* ---------- sidebar boxes ---------- */
.box { margin: 0 0 20px; }
.box-title {
  font-size: 1.2em;
  border-bottom: 2px solid var(--c-accent);
  margin: 0 0 7px;
  padding: 0 0 2px 5px;
  display: flex; justify-content: space-between; align-items: center;
}
.box-content p { padding: 5px; margin: 0; line-height: 1.8; }
.contact a { color: var(--c-accent); }
.contact a[href^="tel:"] { color: inherit; text-decoration: none; }
.menu-toggle { display: none; }

/* menu: square orange bullets, current branch expanded, active items orange bold */
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { padding-left: 5px; }
.menu .sub-menu { margin-left: 10px; display: none; }
.menu .sub-menu .sub-menu { margin-left: 20px; }
.menu .current-menu-item > .sub-menu,
.menu .current-menu-ancestor > .sub-menu,
.menu .current_page_item > .sub-menu,
.menu .current_page_ancestor > .sub-menu { display: block; }
.menu a {
  display: inline;
  color: var(--c-text);
  text-decoration: none;
  padding-left: 10px;
  background: linear-gradient(var(--c-accent), var(--c-accent)) no-repeat 0 0.62em / 5px 5px;
}
.menu a:hover { color: var(--c-accent); text-decoration: underline; }
.menu .current-menu-item > a,
.menu .current-menu-ancestor > a,
.menu .current_page_item > a,
.menu .current_page_ancestor > a { color: var(--c-accent); font-weight: bold; }

/* search */
.search-form input[type="search"] {
  width: calc(100% - 10px); margin: 0 5px;
  border: 1px solid var(--c-accent); color: var(--c-text);
  font: inherit; padding: 0 2px; height: 20px;
}
.search-form .submit { float: right; margin: 5px 2px 0 0; }
.search-form::after { content: ""; display: block; clear: both; }
.submit, .ff-btn-submit, .entry button[type="submit"] {
  background: var(--c-accent) !important;
  border: none !important; border-radius: 0 !important;
  color: #fff !important;
  font: bold 1.2em/1.3 var(--f-body) !important;
  padding: 1px 6px 2px !important;
  cursor: pointer;
}

/* ---------- breadcrumb ---------- */
.breadcrumb { margin: 0 0 10px; }
.breadcrumb .sep { margin: 0 3px; }
.ms-gallery > br { display: none; }   /* safety net if wpautop is ever re-enabled */

/* ---------- content ---------- */
.entry::after { content: ""; display: block; clear: both; }  /* clearfix, not overflow:hidden */
.entry p { line-height: 1.8; }
.entry ul { margin: 0 0 10px 20px; padding: 0; }
.entry ol { margin: 0 0 10px 40px; padding: 0; }
.entry img:not(.ms-thumb) { height: auto !important; }   /* inline style heights would distort when scaled */
.entry table { max-width: 100%; }
.entry .modernTable { border-collapse: collapse; margin: 0 0 10px; }
.entry .modernTable td, .entry .modernTable th { border: 1px solid var(--c-accent); padding: 0 5px; }
.entry .rbcWidgetArea { margin: 10px 0 20px; }

/* home: narrow main column + right column (Webnode #contentNarrow / #rightContent) */
.ms-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--w-side); column-gap: var(--gap); }
.ms-aside h2 { font-size: 1.2em; border-bottom: 2px solid var(--c-accent); padding: 0 0 2px 5px; }
.ms-aside .ms-gallery { justify-content: center; }

/* galleries: 118px orange-framed thumbnails, Webnode "photo118" look */
.ms-gallery { display: flex; flex-wrap: wrap; gap: 10px 25px; margin: 0 0 20px 25px; }
.ms-aside .ms-gallery { margin-left: 0; }
.ms-gallery-item {
  width: 120px; height: 125px;
  border: 1px solid var(--c-accent);
  background: #fff;
  display: block;
}
.ms-gallery-item img { width: 118px; height: 118px; object-fit: contain; object-position: center top; display: block; }
.ms-gallery-item:hover { box-shadow: 0 0 0 1px var(--c-accent); }

/* lightbox */
.ms-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, .88);
  display: flex; align-items: center; justify-content: center;
}
.ms-lightbox[hidden] { display: none; }
.ms-lightbox figure { margin: 0; text-align: center; }
.ms-lightbox img { max-width: 90vw; max-height: 84vh; height: auto; background: #fff; }
.ms-lightbox figcaption { color: #ddd; margin-top: 6px; }
.ms-lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 44px; line-height: 1; padding: 10px 16px;
}
.ms-lightbox .lb-close { top: 8px; right: 8px; }
.ms-lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.ms-lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* Fluent Forms: label column + orange-framed fields, like the Webnode form */
.entry .fluentform .ff-el-group { display: grid; grid-template-columns: 200px 1fr; margin-bottom: 6px; }
.entry .fluentform .ff-el-input--label { margin: 0; padding-top: 1px; }
.entry .fluentform .ff-el-input--label label { font-weight: normal !important; font-size: 1em !important; }
.entry .fluentform .ff-el-form-control {
  border: 1px solid var(--c-accent) !important; border-radius: 0 !important;
  padding: 1px 3px !important; font: inherit !important; color: var(--c-text) !important; min-height: 0 !important;
}
.entry .fluentform .ff-el-group::before,
.entry .fluentform .ff-el-group::after { content: none; }   /* FF clearfix pseudo-elements would become grid cells */
.entry .fluentform .ff_submit_btn_wrapper { display: block; text-align: right; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 15px 12px 25px; }

/* ---------- search results ---------- */
.results { list-style: none; margin: 0; padding: 0; }
.results li { margin: 0 0 15px; }

/* ---------- responsive (the original had none) ---------- */
@media (max-width: 760px) {
  .toplinks { padding-right: 12px; }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "menu" "main" "rest";
    grid-template-rows: auto;
    align-content: start;       /* the stretched .layout must not spread spare height between rows */
    padding: 20px 14px;
  }
  .menu-toggle {
    display: inline-block; background: none; border: 0; font-size: 1.4em;
    color: var(--c-text); cursor: pointer; padding: 0 4px;
  }
  .side-menu .box-content { display: none; }
  body.menu-open .side-menu .box-content { display: block; }
  .menu a { line-height: 2.4; }
  .ms-cols { grid-template-columns: minmax(0, 1fr); }
  .ms-gallery { margin-left: 0; justify-content: center; }
  .entry .fluentform .ff-el-group { grid-template-columns: minmax(0, 1fr); }
  .entry table { display: block; overflow-x: auto; width: auto !important; }
  .entry iframe { width: 100%; height: 300px; }
  .site-header { padding: 0 12px; }
}

@media print {
  body { background: #fff; }
  .toplinks, .side-menu, .side-rest, .breadcrumb { display: none; }
  .layout { display: block; padding: 0; }
}
