/*
Theme Name: JNews - Child Theme
Version: 1.0.0
Theme URI: http://themeforest.net/?ref=jegtheme
Description: A basic starter child theme for customization purpose of JNews theme.
Author: Jegtheme
Author URI: http://themeforest.net/user/jegtheme?ref=jegtheme
Template: jnews
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ------------------------------------------------------------------------- *
 *  Theme customization starts here
/* ------------------------------------------------------------------------- */

/* EKN CI 2026 tokens */
:root {
  --ekn-rheinblau: #0D2845;
  --ekn-rhein-grau: #4B6B8A;
  --ekn-himmelgrau: #87C3D1;
  --ekn-akzent: #C1272D;
  --ekn-anthrazit: #33383F;
  --ekn-weiss: #FFFFFF;
}

/* Accent / CTAs where JNews gray accent leaks through */
.jeg_readmore,
.btn,
.button,
button[type="submit"],
input[type="submit"] {
  background-color: var(--ekn-akzent);
  border-color: var(--ekn-akzent);
  color: var(--ekn-weiss);
}

.jeg_readmore:hover,
.btn:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background-color: #a01f24;
  border-color: #a01f24;
  color: var(--ekn-weiss);
}

/* CI-Logo: Desktop etwas höher; Mobile kompakter, Platz für Menü-Button */
.jeg_header .jeg_logo_img,
.jeg_sticky_nav .jeg_logo_img {
  max-height: 88px;
  width: auto;
  height: auto;
}

.jeg_navbar_mobile .jeg_mobile_logo {
  max-width: calc(100% - 8px);
  overflow: hidden;
}

.jeg_navbar_mobile .jeg_logo_img {
  max-height: 44px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.jeg_navbar_mobile .jeg_mobile_midbar,
.jeg_navbar_mobile .jeg_mobile_bottombar {
  min-height: 60px;
}

.jeg_navbar_mobile .jeg_nav_row {
  align-items: center;
}

/* Weißer Header: Icons/Text in Navy #092E48 */
.jeg_header.jeg_container,
.jeg_header .jeg_topbar,
.jeg_header .jeg_midbar,
.jeg_header .jeg_bottombar,
.jeg_navbar_mobile .jeg_mobile_bottombar,
.jeg_navbar_mobile .jeg_mobile_midbar {
  background-color: #FFFFFF !important;
}

.jeg_header .jeg_nav_item a,
.jeg_header .jeg_menu > li > a,
.jeg_header .jeg_search_toggle,
.jeg_header .jeg_dark_mode,
.jeg_header .jeg_nav_icon,
.jeg_navbar_mobile .jeg_mobile_toggle,
.jeg_navbar_mobile .ekn-mobile-toggle-btn {
  color: #092E48 !important;
}

.jeg_header .jeg_date_wrapper,
.jeg_header .jeg_topbar .jeg_nav_item {
  color: #092E48 !important;
}

/* Topbar: etwas höher + vertikal zentriert (Customizer-Default war zu niedrig) */
.jeg_header .jeg_topbar .jeg_nav_row {
  height: 40px;
  line-height: 40px;
  align-items: center;
}

.jeg_header .jeg_topbar .jeg_nav_icon {
  height: 40px;
}

.jeg_header .jeg_topbar .jeg_nav_item {
  display: flex;
  align-items: center;
}

/* Social Icons: Font Awesome + SVG (JNews) */
.jeg_header .socials_widget > a > i.fa,
.jeg_header .socials_widget > a > i.fa:before,
.jeg_header .jeg_social_icon_block > a > i.fa,
.jeg_header .jeg_social_icon_block > a > i.fa:before {
  color: #092E48 !important;
}

.jeg_header .socials_widget > a > span.jeg-icon svg,
.jeg_header .socials_widget > a > i > span.jeg-icon svg,
.jeg_header .socials_widget.nobg > a > span.jeg-icon svg,
.jeg_header .socials_widget.nobg > a > i > span.jeg-icon svg,
.jeg_header .jeg_social_icon_block > a span.jeg-icon svg,
.jeg_header .jeg_social_icon_block a svg {
  fill: #092E48 !important;
  color: #092E48 !important;
}

.jeg_header .socials_widget > a:hover > i.fa,
.jeg_header .socials_widget > a:hover > i.fa:before {
  color: #C1272D !important;
}

.jeg_header .socials_widget > a:hover span.jeg-icon svg,
.jeg_header .socials_widget > a:hover > i > span.jeg-icon svg {
  fill: #C1272D !important;
}

.jeg_aside_item.socials_widget > a > i.fa:before {
  color: #092E48 !important;
}

.jeg_aside_item.socials_widget a span.jeg-icon svg {
  fill: #092E48 !important;
}

.jeg_header .jeg_bottombar {
  border-bottom: 4px solid #C1272D;
}

/* Footer hell wie Header – dunkles CI-Logo lesbar */
.jeg_footer,
.jeg_footer.normal,
.jeg_footer.dark,
.jeg_footer .jeg_footer_content,
.jeg_footer.dark .jeg_footer_content,
.jeg_footer .jeg_footer_primary,
.jeg_footer .jeg_footer_secondary,
.jeg_footer.dark .jeg_footer_secondary,
.jeg_footer .jeg_footer_bottom,
.jeg_footer.dark .jeg_footer_bottom,
.jeg_footer_sidecontent .jeg_footer_primary {
  background-color: #FFFFFF !important;
  color: #092E48 !important;
}

.jeg_footer .jeg_footer_secondary,
.jeg_footer.dark .jeg_footer_secondary,
.jeg_footer .jeg_footer_bottom,
.jeg_footer.dark .jeg_footer_bottom {
  background-color: #F5F7FA !important;
}

.jeg_footer a,
.jeg_footer .jeg_footer_heading h3,
.jeg_footer .widget h3,
.jeg_footer .jeg_footer_title,
.jeg_footer .jeg_menu_footer a,
.jeg_footer .socials_widget.nobg .fa,
.jeg_footer .socials_widget.nobg a .fa:before,
.jeg_footer.dark .jeg_menu_footer a,
.jeg_footer.dark .socials_widget.nobg .fa {
  color: #092E48 !important;
}

.jeg_footer .socials_widget.nobg a span.jeg-icon svg,
.jeg_footer .socials_widget a span.jeg-icon svg {
  fill: #092E48 !important;
}

.jeg_footer a:hover,
.jeg_footer .jeg_menu_footer a:hover {
  color: #C1272D !important;
}

.jeg_footer .jeg_footer_logo img,
.jeg_footer .footer_logo img,
.jeg_footer .jeg_logo_img {
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media only screen and (max-width:1024px) {
  .jeg_footer .jeg_footer_logo img,
  .jeg_footer .footer_logo img,
  .jeg_footer .jeg_logo_img {
    max-height: 56px;
  }
}

/* Hero-Bilder: Standard Mitte; individueller Fokuspunkt per Beitrag-Metabox */
.jeg_heroblock .thumbnail-container.thumbnail-background,
.jeg_heroblock .jeg_thumb a > div,
.jeg_heroblock .jeg_thumb .lazyloaded {
    background-position: center center;
    background-size: cover;
}

/* Service-Seiten im EKN-CI */
.page-template-page-ekn-service .jeg_main {
    padding-top: 24px;
}

/*
 * Mobile Offcanvas Fix:
 * In der Mobilansicht kann ein Overlay-Layer Klicks auf die Menü-Inhalte blockieren.
 * Durch die Stacking-Reihenfolge (z-index) stellen wir sicher, dass der Menü-Wrapper
 * über dem Overlay liegt.
 */
@media only screen and (max-width:1024px) {
  /* Light mobile bar: dunkle Icons auf Weiß */
  .jeg_navbar_mobile .jeg_mobile_midbar,
  .jeg_navbar_mobile .jeg_mobile_bottombar,
  .jeg_navbar_mobile .jeg_mobile_midbar.dark,
  .jeg_navbar_mobile .jeg_mobile_bottombar.dark {
    background-color: #FFFFFF !important;
    color: #092E48 !important;
  }

  .jeg_navbar_mobile .jeg_nav_row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px;
  }

  .jeg_navbar_mobile .jeg_nav_left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 108px) !important;
  }

  .jeg_navbar_mobile .jeg_nav_center,
  .jeg_navbar_mobile .jeg_nav_right {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 1000003 !important;
  }

  .jeg_navbar_mobile .jeg_mobile_logo,
  .jeg_navbar_mobile .jeg_mobile_logo a,
  .jeg_navbar_mobile .site-title {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .jeg_navbar_mobile .jeg_logo_img {
    max-height: 44px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .jeg_navbar_mobile .jeg_mobile_toggle,
  .jeg_navbar_mobile .ekn-mobile-toggle-btn,
  .jeg_navbar_mobile .jeg_mobile_toggle i,
  .jeg_navbar_mobile .ekn-mobile-toggle-btn i,
  .jeg_navbar_mobile .jeg_nav_icon,
  .jeg_navbar_mobile .jeg_search_toggle,
  .jeg_navbar_mobile .jeg_dark_mode,
  .jeg_navbar_mobile a {
    color: #092E48 !important;
  }

  .jeg_navbar_mobile .ekn-mobile-toggle-btn {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    padding: 12px !important;
    margin: 0 !important;
    min-width: 48px !important;
    min-height: 48px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    font-size: 24px !important;
    line-height: 1 !important;
    position: relative !important;
    z-index: 1000004 !important;
  }

  .jeg_navbar_mobile .jeg_nav_icon {
    position: relative;
    z-index: 1000004 !important;
    pointer-events: auto !important;
  }

  /* Offcanvas: geschlossen komplett weg, offen als Panel von rechts */
  #jeg_off_canvas {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(86vw, 360px) !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    transform: translate3d(100%, 0, 0) !important;
    -webkit-transform: translate3d(100%, 0, 0) !important;
    transition: transform .25s ease, visibility 0s linear .25s !important;
    -webkit-transition: -webkit-transform .25s ease, visibility 0s linear .25s !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 1 !important;
    z-index: 1000010 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.jeg_show_menu #jeg_off_canvas {
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transition: transform .25s ease, visibility 0s linear 0s !important;
    -webkit-transition: -webkit-transform .25s ease, visibility 0s linear 0s !important;
    box-shadow: -8px 0 24px rgba(0,0,0,.18) !important;
    overflow: auto !important;
  }

  #jeg_off_canvas .jeg_mobile_wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
    padding: 56px 16px 24px !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  #jeg_off_canvas .jeg_bg_overlay {
    display: none !important;
    pointer-events: none !important;
  }

  #jeg_off_canvas .jeg_menu_close {
    display: block !important;
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 5 !important;
    color: #092E48 !important;
    font-size: 22px !important;
    pointer-events: auto !important;
  }

  /* Klickbarer Backdrop zum Schließen */
  #ekn_menu_backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 46, 72, 0.35);
    z-index: 1000009;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  body.jeg_show_menu #ekn_menu_backdrop {
    display: block !important;
  }

  #ekn_mobile_menu_fab {
    position: fixed;
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: #092E48 !important;
    color: #fff !important;
    font-size: 24px;
    line-height: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 2147483646 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  .jeg_navbar_mobile .jeg_mobile_toggle i,
  .jeg_navbar_mobile .ekn-mobile-toggle-btn i {
    pointer-events: none !important;
  }

  body.jeg_show_menu #jeg_off_canvas .jeg_mobile_menu a,
  body.jeg_show_menu #jeg_off_canvas .jeg_mobile_menu .menu-item > a {
    position: relative !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    color: #092E48 !important;
  }
}

/* ------------------------------------------------------------------------- *
 *  Autorenseite Alexander Franz
/* ------------------------------------------------------------------------- */

.ekn-author-alexander .jeg_author_wrap {
  align-items: flex-start;
}

.ekn-author-alexander .jeg_author_name {
  margin: 0.15em 0 0.5em;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--ekn-rheinblau, #0D2845);
}

.ekn-author-role {
  margin: 0 0 0.25em;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ekn-rhein-grau, #4B6B8A);
  font-weight: 500;
}

.ekn-author-vita {
  max-width: 46rem;
}

.ekn-author-vita p {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ekn-anthrazit, #33383F);
}

.ekn-author-web-socials {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ekn-anthrazit, #33383F);
}

.ekn-author-web-socials li {
  margin: 0;
}

.ekn-author-web-socials__label {
  color: var(--ekn-rhein-grau, #4B6B8A);
  margin-right: 0.25rem;
}

.ekn-author-web-socials a {
  color: var(--ekn-rheinblau, #0D2845);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ekn-author-web-socials a:hover {
  color: var(--ekn-akzent, #C1272D);
}

.ekn-author-redaktionen {
  margin: 1.25rem 0 0.5rem;
  padding: 1.15rem 1.25rem 1.2rem;
  border-left: 4px solid var(--ekn-akzent, #C1272D);
  background: linear-gradient(180deg, rgba(13, 40, 69, 0.06), rgba(13, 40, 69, 0.02));
  clear: both;
}

.ekn-author-redaktionen__title {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ekn-rheinblau, #0D2845);
}

.ekn-author-redaktionen__text {
  margin: 0 0 0.85rem;
  max-width: 40rem;
  line-height: 1.5;
  color: var(--ekn-anthrazit, #33383F);
}

.ekn-author-redaktionen__contacts,
.ekn-author-redaktionen__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ekn-author-redaktionen__contacts {
  margin-bottom: 0.65rem;
}

.ekn-author-redaktionen__contacts li,
.ekn-author-redaktionen__links li {
  margin: 0.2rem 0;
  line-height: 1.45;
}

.ekn-author-redaktionen__label {
  color: var(--ekn-rhein-grau, #4B6B8A);
  margin-right: 0.25rem;
}

.ekn-author-redaktionen a {
  color: var(--ekn-rheinblau, #0D2845);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ekn-author-redaktionen a:hover {
  color: var(--ekn-akzent, #C1272D);
}

@media (max-width: 767px) {
  .ekn-author-alexander .jeg_author_name {
    font-size: 1.45rem;
  }

  .ekn-author-redaktionen {
    padding: 1rem;
  }
}
