/*
 * Mobiltrans Modern
 * Drupal 11 / Bootstrap 5
 * Original Mobiltrans brand-inspired design
 */

:root {
  --mt-green: #247846;
  --mt-green-dark: #185735;
  --mt-green-light: #80b35b;
  --mt-gold: #d5b44b;
  --mt-red: #bf4448;
  --mt-charcoal: #25312c;
  --mt-text: #34443b;
  --mt-muted: #68776e;
  --mt-surface: #f5f8f4;
  --mt-border: #e0e9e0;
  --mt-radius: 12px;
}

body {
  color: var(--mt-text);
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
}

#header {
  background: #fff;
  padding: 22px 0;
  border-bottom: 1px solid var(--mt-border);
}

#header img {
  max-width: 100%;
  height: auto;
}

#main-menu {
  background: var(--mt-green-dark);
  border-bottom: 3px solid var(--mt-green-light);
}

#main-menu ul.navbar-nav {
  justify-content: flex-start !important;
  gap: 4px;
}

#main-menu .nav-link,
#main-menu a {
  color: #fff;
  font-weight: 600;
  padding: 14px 19px;
  transition: background-color .2s ease;
}

#main-menu a:hover,
#main-menu a:focus-visible,
#main-menu a.is-active {
  color: #fff;
  background: var(--mt-green);
}

#slideshow {
  position: relative;
  background: var(--mt-charcoal);
  overflow: hidden;
}

#slideshow > .container {
  max-width: 100%;
  padding: 0;
}

#slideshow img {
  max-width: 100%;
  height: auto;
}

#main {
  padding: 54px 0 76px;
  min-height: 320px;
}

#main h1,
#main h2,
#main h3 {
  color: var(--mt-charcoal);
  font-weight: 700;
  line-height: 1.25;
}

#main h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 28px;
}

#main h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  margin-bottom: 20px;
}

#main a:not(.btn) {
  color: var(--mt-green);
}

#main a:not(.btn):hover {
  color: var(--mt-green-dark);
}

#main .node {
  margin-bottom: 32px;
}

#main .node__content {
  line-height: 1.8;
}

#main .node img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.sidebar {
  background: var(--mt-surface);
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius);
  padding: 24px;
}

.btn-primary,
.button--primary {
  background: var(--mt-green);
  border-color: var(--mt-green);
  border-radius: 7px;
  font-weight: 600;
  padding: 11px 24px;
}

.btn-primary:hover,
.button--primary:hover {
  background: var(--mt-green-dark);
  border-color: var(--mt-green-dark);
}

#featured,
#panel_first {
  padding: 56px 0;
  background: var(--mt-surface);
}

#panel_second {
  padding: 56px 0;
  background: #fff;
}

#footer {
  color: #eaf1eb;
  background: var(--mt-charcoal);
  padding: 54px 0;
  border-top: 4px solid var(--mt-green);
}

#footer a {
  color: #fff;
}

#footer a:hover {
  color: var(--mt-green-light);
}

#footer .block {
  margin-bottom: 16px;
}

@media (max-width: 767.98px) {
  #header {
    padding: 14px 0;
  }

  #main {
    padding: 32px 0 48px;
  }

  #main-menu ul.navbar-nav {
    gap: 0;
  }

  #main-menu a {
    padding: 12px 15px;
  }

  .sidebar {
    margin-bottom: 24px;
  }

  #footer {
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-menu a {
    transition: none;
  }
}

/* Mobiltrans signature logo panel */
#slideshow {
  position: relative;
}

.mt-floating-brand {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: max(24px, calc((100% - 1320px) / 2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  background: #fff;
  border-left: 4px solid var(--mt-green);
  border-radius: 0 10px 10px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .16);
}

.mt-floating-brand img {
  display: block;
  width: 100px;
  height: 42px;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .mt-floating-brand {
    position: relative;
    top: auto;
    left: auto;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 20px;
    border-left: 0;
    border-bottom: 3px solid var(--mt-green);
    border-radius: 0 0 10px 10px;
    box-shadow: none;
  }

  #slideshow {
    display: flex;
    flex-direction: column;
  }

  #slideshow > .container {
    order: 2;
  }

  #slideshow > .mt-floating-brand {
    order: 1;
  }
}

/* Mobiltrans Modern — first visual refinement */

/* Remove unused header space */
#header:has(.block:empty),
#header:not(:has(.block)) {
  display: none;
}

/* Modern green navigation */
#main-menu {
  background: #185735;
  border-bottom: 3px solid #80b35b;
}

#main-menu .container {
  max-width: 1320px;
}

#main-menu .nav,
#main-menu .navbar-nav {
  background: transparent;
}

#main-menu a,
#main-menu .nav-link {
  background: transparent;
  color: #fff;
  border-radius: 0;
}

#main-menu a:hover,
#main-menu a:focus-visible,
#main-menu a.is-active,
#main-menu .active > a {
  background: #247846;
  color: #fff;
}

/* Center the slideshow and eliminate unnecessary empty space */
#slideshow {
  background: #25312c;
  min-height: 0;
}

#slideshow .views_slideshow_cycle_main,
#slideshow .views_slideshow_cycle_teaser_section,
#slideshow .views_slideshow_cycle_slide {
  margin-left: auto;
  margin-right: auto;
}

#slideshow img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Keep the logo floating above the slideshow */
.mt-floating-brand {
  z-index: 20;
}

@media (max-width: 767.98px) {
  #slideshow img {
    max-width: 100%;
    height: auto;
  }
}

/* Mobiltrans Modern — Bootstrap 5 navigation */

#main-menu {
  margin: 0;
  background: var(--mt-green-dark);
  border-bottom: 3px solid var(--mt-green-light);
}

#main-menu > .container {
  max-width: 1320px;
  padding: 0 12px;
  box-shadow: none;
  border-radius: 0;
}

#main-menu ul.menu,
#main-menu ul.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-menu ul.menu > li,
#main-menu ul.navbar-nav > li {
  position: relative;
}

#main-menu ul.menu > li > a,
#main-menu ul.navbar-nav > li > a.nav-link {
  display: block;
  padding: 16px 20px;
  color: #fff;
  background: transparent;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: .025em;
}

#main-menu ul.menu > li > a:hover,
#main-menu ul.menu > li > a:focus-visible,
#main-menu ul.menu > li > a.is-active,
#main-menu ul.menu > li.menu-item--active-trail > a,
#main-menu ul.navbar-nav > li > a.nav-link:hover,
#main-menu ul.navbar-nav > li > a.nav-link:focus-visible,
#main-menu ul.navbar-nav > li > a.nav-link.active,
#main-menu ul.navbar-nav > li > a.nav-link.is-active {
  color: #fff;
  background: var(--mt-green);
}

@media (min-width: 992px) {
  #main-menu ul.menu,
  #main-menu ul.navbar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  #main-menu ul.menu ul.menu,
  #main-menu ul.navbar-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 220px;
    background: var(--mt-green-dark);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
  }

  #main-menu li:hover > ul,
  #main-menu li:focus-within > ul {
    display: block;
  }
}

#main-menu ul.menu ul.menu a,
#main-menu ul.navbar-nav ul a {
  display: block;
  padding: 11px 16px;
  color: #fff;
  text-decoration: none;
}

#main-menu ul.menu ul.menu a:hover,
#main-menu ul.navbar-nav ul a:hover {
  background: var(--mt-green);
}

@media (max-width: 991.98px) {
  #main-menu ul.menu,
  #main-menu ul.navbar-nav {
    display: flex;
    flex-direction: column;
  }

  #main-menu ul.menu ul.menu,
  #main-menu ul.navbar-nav ul {
    padding-left: 18px;
  }
}

/* Mobiltrans Modern — consistent slideshow positioning */

#slideshow .views_slideshow_cycle_main {
  width: 100%;
  text-align: center;
}

#slideshow .views_slideshow_cycle_teaser_section {
  margin-inline: auto;
}

#slideshow .views_slideshow_cycle_slide {
  width: 100% !important;
  text-align: center;
}

#slideshow .views_slideshow_cycle_slide .views-row,
#slideshow .views_slideshow_cycle_slide .views-field,
#slideshow .views_slideshow_cycle_slide .field-content {
  text-align: center;
}

#slideshow .views_slideshow_cycle_slide img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}


/* Mobiltrans Modern — homepage content layout */
body.path-frontpage #main .row > .sidebar-first {
  display: none;
}

body.path-frontpage #main .row > .content {
  flex: 0 0 100%;
  max-width: 100%;
}

body.path-frontpage #main > .container {
  max-width: 1200px;
}


/* Mobiltrans Modern — homepage articles */

body.path-frontpage #main {
  background: #f5f8f4;
  padding: 48px 0 72px;
}

body.path-frontpage #main .views-row {
  background: #fff;
  border: 1px solid #e0e9e0;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 5px 20px rgba(37, 49, 44, .04);
}

body.path-frontpage #main .views-row h2,
body.path-frontpage #main .views-row h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.3;
}

body.path-frontpage #main .node__content {
  line-height: 1.8;
}

body.path-frontpage #main .node__content img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767.98px) {
  body.path-frontpage #main {
    padding: 24px 0 40px;
  }

  body.path-frontpage #main .views-row {
    padding: 20px;
    margin-bottom: 18px;
  }
}

/* Mobiltrans Modern — refined slideshow presentation */

#slideshow {
  background: #eef3ed;
  padding: 0;
}

#slideshow .views_slideshow_cycle_main {
  max-width: 1020px;
  margin-inline: auto;
}

#slideshow .views_slideshow_cycle_teaser_section {
  max-width: 1020px;
  margin-inline: auto;
}

#slideshow .views_slideshow_cycle_slide {
  background: transparent !important;
}

#slideshow .views_slideshow_cycle_slide img {
  width: 1020px;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

#slideshow .views_slideshow_cycle_slide .views-field-title {
  text-align: center;
}

#slideshow .views_slideshow_cycle_slide .views-field-title a {
  color: var(--mt-green-dark);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  #slideshow .views_slideshow_cycle_main,
  #slideshow .views_slideshow_cycle_teaser_section {
    width: 100% !important;
  }

  #slideshow .views_slideshow_cycle_slide img {
    width: 100%;
  }
}

/* Mobiltrans Modern — slideshow More link */
#slideshow .view-slideshow .more-link,
#slideshow .view-slideshow .view-footer,
#slideshow .views-element-container .more-link {
  max-width: 1020px;
  margin: 0 auto;
  padding: 12px 0 16px;
  text-align: right;
}

#slideshow .more-link a {
  display: inline-block;
  padding: 9px 22px;
  background: var(--mt-green);
  color: #fff;
  border-radius: 7px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease;
}

#slideshow .more-link a:hover,
#slideshow .more-link a:focus-visible {
  background: var(--mt-green-dark);
  color: #fff;
}


/* Mobiltrans Modern — slideshow title overlay */
#slideshow .views_slideshow_cycle_slide {
  position: relative;
}

#slideshow .views_slideshow_cycle_slide .views-field-title {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 24px;
  background: linear-gradient(
    to right,
    rgba(20, 45, 30, .92),
    rgba(20, 45, 30, .55)
  );
  border-left: 4px solid var(--mt-green-light);
  text-align: left;
}

#slideshow .views_slideshow_cycle_slide .views-field-title a {
  color: #fff;
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

#slideshow .views_slideshow_cycle_slide .views-field-title a:hover,
#slideshow .views_slideshow_cycle_slide .views-field-title a:focus-visible {
  color: #d9edc9;
}

@media (max-width: 767.98px) {
  #slideshow .views_slideshow_cycle_slide .views-field-title {
    padding: 9px 14px;
  }
}

/* Mobiltrans Modern — refined logo placement */
@media (min-width: 768px) {
  .mt-floating-brand {
    top: 24px;
    left: max(24px, calc((100% - 1020px) / 2 + 18px));
    padding: 12px 18px;
    border-left: 4px solid var(--mt-green);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  }
}

@media (max-width: 767.98px) {
  .mt-floating-brand {
    margin: 0 auto;
    border-radius: 0 0 10px 10px;
  }
}

/* Mobiltrans Modern — homepage reading experience */
body.path-frontpage #main .views-row {
  overflow-wrap: anywhere;
}

body.path-frontpage #main .views-row .node__content {
  max-width: 960px;
  margin-inline: auto;
  font-size: 16px;
  line-height: 1.8;
}

body.path-frontpage #main .views-row h2,
body.path-frontpage #main .views-row h3 {
  max-width: 960px;
  margin-inline: auto;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--mt-border);
}

body.path-frontpage #main .views-row p {
  margin-bottom: 1.25rem;
}

@media (max-width: 767.98px) {
  body.path-frontpage #main .views-row .node__content {
    font-size: 15px;
    line-height: 1.7;
  }
}

/* Mobiltrans Modern — hide bridge slideshow captions */
#slideshow .views_slideshow_cycle_slide:has(.node--id-45) .views-field-title,
#slideshow .views_slideshow_cycle_slide:has(.node--id-46) .views-field-title,
#slideshow .views_slideshow_cycle_slide:has(.node--id-47) .views-field-title {
  display: none;
}

/* Compact captions for the remaining slides */
#slideshow .views_slideshow_cycle_slide .views-field-title {
  right: auto;
  width: max-content;
  max-width: calc(100% - 36px);
  bottom: 18px;
  left: 18px;
  padding: 10px 18px;
  border-radius: 0 7px 7px 0;
}

@media (max-width: 767.98px) {
  #slideshow .views_slideshow_cycle_slide .views-field-title {
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 12px;
  }
}

/* Mobiltrans Modern — hide captions on the three bridge photographs */
#slideshow .views_slideshow_cycle_teaser_section > .views_slideshow_cycle_slide:nth-child(-n+3) .views-field-title {
  display: none !important;
}
EOFcat >> /home/admin/domains/staging.mobiltrans.hu/public_html/themes/custom/mobiltrans_modern/css/modern.css <<'EOF'

/* Mobiltrans Modern — hide captions on the three bridge photographs */
#slideshow .views_slideshow_cycle_teaser_section > .views_slideshow_cycle_slide:nth-child(-n+3) .views-field-title {
  display: none !important;
}

/* Mobiltrans Modern — fill the entire slideshow image frame */
#slideshow .views_slideshow_cycle_slide .views-field-field-image,
#slideshow .views_slideshow_cycle_slide .views-field-field-image .field-content {
  width: 100%;
}

#slideshow .views_slideshow_cycle_slide .views-field-field-image img {
  display: block;
  width: 100%;
  height: 320px;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 767.98px) {
  #slideshow .views_slideshow_cycle_slide .views-field-field-image img {
    height: auto;
    max-width: 100%;
  }
}

/* Mobiltrans Modern — logo outside slideshow, on the left */
@media (min-width: 1200px) {
  #slideshow .mt-floating-brand {
    position: absolute;
    top: 24px;
    left: max(12px, calc((100% - 1020px) / 2 - 175px));
    width: 145px;
    padding: 14px;
    background: #fff;
    border-left: 4px solid var(--mt-green);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
  }

  #slideshow .mt-floating-brand img {
    width: 100px;
    height: auto;
  }
}

/* Mobiltrans Modern — logo beside slideshow */
#slideshow .mt-slideshow-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1020px);
  gap: 20px;
  align-items: start;
  justify-content: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px;
}

#slideshow .mt-brand-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px 12px;
  background: #fff;
  border-left: 4px solid var(--mt-green);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
}

#slideshow .mt-brand-column img {
  display: block;
  width: 100px;
  height: auto;
  max-width: 100%;
}

#slideshow .mt-slideshow-content {
  width: 100%;
  min-width: 0;
  max-width: 1020px;
  padding: 0;
  margin: 0;
}

@media (max-width: 991.98px) {
  #slideshow .mt-slideshow-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  #slideshow .mt-brand-column {
    min-height: 0;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 20px;
  }

  #slideshow .mt-slideshow-content {
    margin: 0 auto;
  }
}
EOFcat >> /home/admin/domains/staging.mobiltrans.hu/public_html/themes/custom/mobiltrans_modern/css/modern.css <<'EOF'

/* Mobiltrans Modern — logo beside slideshow */
#slideshow .mt-slideshow-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1020px);
  gap: 20px;
  align-items: start;
  justify-content: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px;
}

#slideshow .mt-brand-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px 12px;
  background: #fff;
  border-left: 4px solid var(--mt-green);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
}

#slideshow .mt-brand-column img {
  display: block;
  width: 100px;
  height: auto;
  max-width: 100%;
}

#slideshow .mt-slideshow-content {
  width: 100%;
  min-width: 0;
  max-width: 1020px;
  padding: 0;
  margin: 0;
}

@media (max-width: 991.98px) {
  #slideshow .mt-slideshow-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  #slideshow .mt-brand-column {
    min-height: 0;
    width: fit-content;
    margin: 0 auto;
    padding: 12px 20px;
  }

  #slideshow .mt-slideshow-content {
    margin: 0 auto;
  }
}

/* Mobiltrans — logo top-left, slideshow centered */
#slideshow .mt-slideshow-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 20px;
}

#slideshow .mt-brand-column {
  display: flex;
  align-self: flex-start;
  justify-content: flex-start;
  align-items: center;
  position: static;
  width: auto;
  min-height: 0;
  margin: 0 0 0 20px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#slideshow .mt-brand-column img {
  display: block;
  width: 100px;
  height: auto;
}

#slideshow .mt-slideshow-content {
  width: 100%;
  max-width: 1020px;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 991.98px) {
  #slideshow .mt-slideshow-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #slideshow .mt-brand-column {
    align-self: flex-start;
    margin: 0 0 0 16px;
    padding: 0;
  }
}
EOFcat >> /home/admin/domains/staging.mobiltrans.hu/public_html/themes/custom/mobiltrans_modern/css/modern.css <<'EOF'

/* Mobiltrans — logo top-left, slideshow centered */
#slideshow .mt-slideshow-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 20px;
}

#slideshow .mt-brand-column {
  display: flex;
  align-self: flex-start;
  justify-content: flex-start;
  align-items: center;
  position: static;
  width: auto;
  min-height: 0;
  margin: 0 0 0 20px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#slideshow .mt-brand-column img {
  display: block;
  width: 100px;
  height: auto;
}

#slideshow .mt-slideshow-content {
  width: 100%;
  max-width: 1020px;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 991.98px) {
  #slideshow .mt-slideshow-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #slideshow .mt-brand-column {
    align-self: flex-start;
    margin: 0 0 0 16px;
    padding: 0;
  }
}

/* Align logo top edge with centered slideshow */
@media (min-width: 1200px) {
  #slideshow .mt-slideshow-layout {
    position: relative;
  }

  #slideshow .mt-brand-column {
    position: absolute;
    top: 12px;
    left: 20px;
    margin: 0;
    z-index: 2;
  }
}

/* Center main navigation to match the slideshow */
@media (min-width: 992px) {
  #main-menu .container {
    width: 100%;
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  #main-menu ul.menu,
  #main-menu .menu,
  #main-menu .navbar-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  #main-menu li {
    flex: 0 0 auto;
  }
}

/* Mobiltrans — six equally spaced navigation items */
@media (min-width: 992px) {
  #main-menu .container {
    width: 100%;
    max-width: 1020px;
    margin: 0 auto;
    padding: 0;
  }

  #main-menu ul.menu,
  #main-menu .menu,
  #main-menu .navbar-nav {
    display: flex;
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
    padding: 0;
    margin: 0;
  }

  #main-menu li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  #main-menu li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
  }
}
EOFcat >> /home/admin/domains/staging.mobiltrans.hu/public_html/themes/custom/mobiltrans_modern/css/modern.css <<'EOF'

/* Mobiltrans — six equally spaced navigation items */
@media (min-width: 992px) {
  #main-menu .container {
    width: 100%;
    max-width: 1020px;
    margin: 0 auto;
    padding: 0;
  }

  #main-menu ul.menu,
  #main-menu .menu,
  #main-menu .navbar-nav {
    display: flex;
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
    padding: 0;
    margin: 0;
  }

  #main-menu li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  #main-menu li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
  }
}

/* Hide article author and publication date metadata */
.node .node__meta,
.node .node__submitted,
.node .submitted,
article.node .node__meta,
article.node .node__submitted {
  display: none !important;
}


/* Hide the Korszerű géppark slideshow caption */
#slideshow .views_slideshow_cycle_slide:has(a[href*="/node/49"]) .views-field-title,
#slideshow .views_slideshow_cycle_slide:has(a[href*="/korszeru-geppark"]) .views-field-title {
  display: none !important;
}

/* Mobiltrans — logo positioned inside the top navigation bar */
@media (min-width: 1200px) {
  #slideshow .mt-brand-column {
    position: absolute;
    top: -43px;
    left: 16px;
    margin: 0;
    padding: 0;
    z-index: 100;
  }

  #slideshow .mt-brand-column img {
    display: block;
    width: 100px;
    height: auto;
  }

  #slideshow,
  #slideshow .mt-slideshow-layout {
    overflow: visible;
  }

  #main-menu {
    position: relative;
    z-index: 10;
  }
}

/* Mobiltrans — floating GINOP Plusz application tab */
.mt-floating-grant-tab {
  position: fixed;
  right: 0;
  bottom: 35px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  background: #247846;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none !important;
  border-radius: 10px 0 0 10px;
  box-shadow: -3px 4px 16px rgba(0, 0, 0, 0.22);
  transition: background-color 0.2s, padding-right 0.2s;
}

.mt-floating-grant-tab:hover,
.mt-floating-grant-tab:focus-visible {
  background: #185735;
  color: #ffffff !important;
  padding-right: 28px;
}

.mt-floating-grant-tab:focus-visible {
  outline: 3px solid #ffcf40;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .mt-floating-grant-tab {
    bottom: 20px;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Floating PÁLYÁZAT corner graphic */
.mt-floating-grant-tab {
  display: none !important;
}

.mt-palyazat-floating {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: block;
  width: 200px;
  line-height: 0;
  text-decoration: none;
}

.mt-palyazat-floating img {
  display: block;
  width: 100%;
  height: auto;
}

.mt-palyazat-floating:hover {
  filter: brightness(1.05);
}

.mt-palyazat-floating:focus-visible {
  outline: 3px solid #247846;
  outline-offset: -3px;
}

@media (max-width: 767px) {
  .mt-palyazat-floating {
    width: 150px;
  }
}

/* GINOP Plusz funding banner — top-left */
.mt-palyazat-floating {
  position: absolute !important;
  top: 58px !important;
  left: 16px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 100;
  display: block;
  width: 400px;
  max-width: calc(100vw - 32px);
  line-height: 0;
}

.mt-palyazat-floating img {
  content: url('/sites/default/files/palyazat-top-left.jpg');
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 767px) {
  .mt-palyazat-floating {
    width: 260px;
  }
}

/* Keep the GINOP Plusz banner visible while scrolling */
.mt-palyazat-floating {
  position: fixed !important;
  top: 58px !important;
  left: 16px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 9999 !important;
}

/* Mobiltrans Modern — internal page styling v1 */
body:not(.path-frontpage) #main {
  background: #f5f8f4;
  padding: 48px 0 72px;
}

body:not(.path-frontpage) #main > .container {
  max-width: 1200px;
}

body:not(.path-frontpage) #main article.node {
  background: #fff;
  border: 1px solid #e0e9e0;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: 0 5px 20px rgba(37, 49, 44, .04);
  overflow-wrap: anywhere;
}

body:not(.path-frontpage) #main article.node .node__content {
  max-width: 960px;
  margin-inline: auto;
  font-size: 16px;
  line-height: 1.8;
}

body:not(.path-frontpage) #main article.node .node__content img {
  max-width: 100%;
  height: auto;
}

body:not(.path-frontpage) #main article.node .node__content p {
  margin-bottom: 1.25rem;
}

@media (max-width: 767.98px) {
  body:not(.path-frontpage) #main {
    padding: 24px 0 40px;
  }

  body:not(.path-frontpage) #main article.node {
    padding: 20px;
  }

  body:not(.path-frontpage) #main article.node .node__content {
    font-size: 15px;
    line-height: 1.7;
  }
}

/* Mobile GINOP banner positioning v1 */
@media (max-width: 767.98px) {
  .mt-palyazat-floating {
    position: fixed !important;
    top: auto !important;
    bottom: 12px !important;
    left: 8px !important;
    right: auto !important;
    width: 180px !important;
    max-width: calc(100vw - 16px);
    z-index: 9999;
  }
}

/* Mobile collapsible navigation v1 */

/* Hide mobile controls on desktop */
#main-menu .mt-mobile-menu-toggle,
#main-menu .mt-mobile-menu-label {
  display: none;
}

@media (max-width: 991.98px) {
  /* Visually hide checkbox but keep it keyboard accessible */
  #main-menu .mt-mobile-menu-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
  }

  /* Mobile menu button */
  #main-menu .mt-mobile-menu-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 52px;
    padding: 12px 20px;
    margin: 0;
    color: #fff;
    background: var(--mt-green-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
  }

  #main-menu .mt-mobile-menu-toggle:focus-visible + .mt-mobile-menu-label {
    outline: 3px solid #ffcf40;
    outline-offset: -3px;
  }

  /* Hide navigation links until menu is opened */
  #main-menu .mt-mobile-menu-toggle:not(:checked) ~ .container {
    display: none !important;
  }

  #main-menu .mt-mobile-menu-toggle:checked ~ .container {
    display: block !important;
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  #main-menu .mt-mobile-menu-toggle:checked ~ .container > * {
    width: 100%;
  }

  #main-menu ul.menu,
  #main-menu ul.navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  #main-menu ul.menu > li,
  #main-menu ul.navbar-nav > li {
    width: 100%;
  }

  #main-menu ul.menu > li > a,
  #main-menu ul.navbar-nav > li > a.nav-link {
    display: block;
    width: 100%;
    padding: 13px 20px;
    text-align: left;
  }
}

/* Mobile header logo alignment v1 */
@media (max-width: 991.98px) {
  #main-menu {
    min-height: 56px;
  }

  #main-menu .mt-mobile-menu-label {
    min-height: 56px;
    padding-right: 20px;
  }

  #slideshow .mt-brand-column {
    position: absolute !important;
    top: -52px !important;
    left: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100px;
    min-height: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    z-index: 100;
  }

  #slideshow .mt-brand-column img {
    width: 100px;
    height: auto;
  }

  #slideshow .mt-slideshow-layout {
    padding-top: 0;
  }
}


/* Mobile navigation logo — permanent placement v2 */
#main-menu .mt-mobile-brand {
  display: none;
}

@media (max-width: 991.98px) {
  #main-menu {
    position: relative;
  }

  #main-menu .mt-mobile-brand {
    display: flex;
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    align-items: center;
    z-index: 20;
  }

  #main-menu .mt-mobile-brand img {
    display: block;
    width: 100px;
    height: auto;
  }

  #slideshow .mt-brand-column {
    display: none !important;
  }
}

/* Mobile compact GINOP banner v2 */
@media (max-width: 767.98px) {
  .mt-palyazat-floating {
    position: fixed !important;
    top: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    right: auto !important;
    width: 120px !important;
    max-width: 120px !important;
    z-index: 9999;
  }

  .mt-palyazat-floating img {
    width: 100%;
    height: auto;
  }
}

/* Mobile slideshow Tovabb button fix v1 */
@media (max-width: 767.98px) {
  #slideshow .more-link {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 12px 12px;
    text-align: right;
    background: transparent;
  }

  #slideshow .more-link > a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    background: #247846 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 7px;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #slideshow .more-link > a:hover,
  #slideshow .more-link > a:focus-visible {
    background: #185735 !important;
    color: #ffffff !important;
  }
}

/* Internal page centered layout v1 */
@media (min-width: 992px) {
  body:not(.path-frontpage) #main > .container {
    width: 100%;
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
  }
}

body:not(.path-frontpage) #main article.node {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}


/* Mobile expanded menu logo positioning fix v1 */
@media (max-width: 991.98px) {
  #main-menu .mt-mobile-brand {
    top: 28px;
    transform: translateY(-50%);
  }

  #main-menu .mt-mobile-menu-toggle:checked ~ .container {
    position: relative;
    z-index: 1;
  }
}
