/*
 Theme Name:     AccessPress Parallax Child
 Template:       accesspress-parallax
 Version:        1.0.0
*/

/* =================================
   Design tokens (easy to tweak)
   ================================= */
:root{
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b7280;

  --brand: #d35400;
  --brand-ink: #b24400;

  --border: rgba(0,0,0,0.06);
  --shadow-sm: 0 8px 18px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.08);

  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;

  --pad-sm: 16px;
  --pad-md: 22px;

  --trans: 0.2s ease;
}

/* Better default focus outlines (keyboard users) */
a:focus-visible,
button:focus-visible,
.menu-toggle:focus-visible{
  outline: 3px solid rgba(211, 84, 0, 0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

/* =================================
   Header / Logo
   ================================= */
#site-logo{
  width: clamp(160px, 30vw, 320px);
  max-width: 30%;
}
@media (max-width: 900px){
  #site-logo{ max-width: 55%; }
}
@media (max-width: 480px){
  #site-logo{ max-width: 70%; }
}

/* =========================================
   MENU – reset & modern (robust)
   AccessPress Parallax
   ========================================= */

/* Desktop / general menu items */
.main-navigation ul li > a{
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 14px 18px;
  color: #222;
  transition: color var(--trans), background-color var(--trans);
}

.main-navigation ul li:hover > a,
.main-navigation ul li.current-menu-item > a{
  color: var(--brand);
}

/* Desktop dropdown */
.main-navigation ul ul{
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  border: 1px solid var(--border);
}

.main-navigation ul ul li{ border-bottom: none; }

.main-navigation ul ul li > a{
  font-size: 14px;
  padding: 10px 18px;
  color: #333;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.main-navigation ul ul li:hover > a{
  background-color: #f4f5f7;
  color: #111;
}

/* =============================================
   Cramped widths: switch to a toggle
   ============================================= */
@media (max-width: 1024px){

  .menu-toggle{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    text-indent: 0 !important;
    overflow: visible !important;

    height: auto !important;
    line-height: 1.1 !important;
    min-height: 0 !important;
    width: auto !important;

    padding: 10px 14px !important;
    box-sizing: border-box;

    background: var(--surface);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);

    cursor: pointer;

    float: right !important;
    margin: 8px 16px 8px 0 !important;

    position: relative !important;
    z-index: 50;
  }

  .menu-toggle span,
  .menu-toggle i{
    display: none !important;
  }

  .menu-toggle::before{
    content: "Menü";
    display: inline-block;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--brand);
    white-space: nowrap;
    margin-right: 10px;
  }

  .menu-toggle::after{
    content: "";
    display: inline-block;
    width: 18px;
    height: 12px;
    background:
      linear-gradient(var(--brand), var(--brand)) 0 0 / 100% 2px no-repeat,
      linear-gradient(var(--brand), var(--brand)) 0 50% / 100% 2px no-repeat,
      linear-gradient(var(--brand), var(--brand)) 0 100% / 100% 2px no-repeat;
  }

  .main-navigation ul{ display: none; }

  .main-navigation.toggled ul,
  .main-navigation.toggled-on ul,
  .main-navigation.menu-open ul,
  .main-navigation.open ul{
    display: block;
  }

  .main-navigation ul{
    clear: both;
    background: var(--surface);
    border-radius: var(--r-lg);
    margin-top: 10px;
    padding: 6px 0;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
  }

  .main-navigation ul li > a{
    padding: 14px 20px;
    font-size: 16px;
    color: #222;
  }

  .main-navigation ul li:hover > a,
  .main-navigation ul li.current-menu-item > a{
    background-color: #f4f5f7;
    color: var(--brand);
  }

  .main-navigation ul ul{
    background: #f7f8fa;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.06);
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }

  .main-navigation ul ul li > a{
    padding-left: 32px;
    font-size: 15px;
    color: #333;
  }

  .main-navigation ul ul li:hover > a{
    background-color: #eef0f3;
    color: #111;
  }
}

@media (max-width: 768px){
  .menu-toggle{
    margin-right: 12px !important;
    padding: 10px 12px !important;
  }
}

/* =================================
   HOMEPAGE / BLOG – Modern base
   ================================= */

body.home,
body.blog{
  background: var(--bg);
}

body.home #content,
body.blog #content{
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Post “cards” */
body.home .hentry,
body.blog .hentry,
body.home article,
body.blog article{
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin: 0 0 18px 0;
}

/* Title/header padding */
body.home .hentry .entry-header,
body.blog .hentry .entry-header,
body.home article .entry-header,
body.blog article .entry-header{
  padding: 18px var(--pad-md) 10px;
}

/* Default content padding (we will override on the blog index injection) */
body.home .hentry .entry-content,
body.blog .hentry .entry-content,
body.home article .entry-content,
body.blog article .entry-content{
  padding: 0 var(--pad-md) 18px;
}

/* Post titles */
body.home .entry-title,
body.blog .entry-title{
  font-size: 22px;
  line-height: 1.25;
  margin: 6px 0 10px;
}

body.home .entry-title a,
body.blog .entry-title a{
  color: var(--text);
  text-decoration: none;
  transition: color var(--trans);
}

body.home .entry-title a:hover,
body.blog .entry-title a:hover{
  color: var(--brand);
}

/* Meta hidden on list */
body.home .entry-meta,
body.blog .entry-meta,
body.home .cat-links,
body.blog .cat-links{
  display: none !important;
}

/* Date badge disabled */
body.home .date,
body.blog .date{
  display: none !important;
}

/* Images inside normal content */
body.home .entry-content img,
body.blog .entry-content img{
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
}

/* ==========================================
   BLOG INDEX: “Hero-like post” layout
   Using the injected excerpt HTML: .kmoso-index-card
   ========================================== */

/* The theme may wrap excerpt in .entry-summary or .entry-content.
   Kill padding there so we don’t get “white box” around our grid. */
body.home .hentry .entry-summary,
body.blog .hentry .entry-summary,
body.home .hentry .entry-summary p,
body.blog .hentry .entry-summary p{
  margin: 0;
}

body.home .hentry .entry-summary,
body.blog .hentry .entry-summary{
  padding: 0 !important;
}

/* In some AccessPress layouts the excerpt lives in .entry-content */
body.home .hentry .entry-content,
body.blog .hentry .entry-content{
  padding-top: 0;
}

/* Grid wrapper (image left, content right) */
.kmoso-index-card{
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 22px;
  align-items: start;
  padding: 0 var(--pad-md) 18px;
  box-sizing: border-box;
}

/* If there is no image, just a single column */
.kmoso-index-card:not(:has(.kmoso-index-card__media)){
  grid-template-columns: 1fr;
}

/* Media */
.kmoso-index-card__media{
  margin: 0;
}

.kmoso-index-card__img{
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: var(--r-md);
}

/* Text/content: reduce “white box” feel */
.kmoso-index-card__content{
  padding: 0;
  color: rgba(0,0,0,0.82);
  line-height: 1.65;
}

/* Prevent huge top/bottom margins from wpautop inside injected content */
.kmoso-index-card__content > :first-child{ margin-top: 0; }
.kmoso-index-card__content > :last-child{ margin-bottom: 0; }

/* Mobile stack */
@media (max-width: 900px){
  .kmoso-index-card{
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 var(--pad-sm) 16px;
  }

  .kmoso-index-card__img{
    min-height: 180px;
  }
}

/* =================================
   Sidebar widgets – modern cards
   ================================= */
body.home #secondary .widget,
body.blog #secondary .widget,
body.home .widget-area .widget,
body.blog .widget-area .widget{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
  padding: 18px;
  margin-bottom: 18px;
}

body.home #secondary .widget-title,
body.blog #secondary .widget-title,
body.home .widget-area .widget-title,
body.blog .widget-area .widget-title{
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

body.home #secondary a,
body.blog #secondary a,
body.home .widget-area a,
body.blog .widget-area a{
  color: var(--brand);
  text-decoration: none;
}

body.home #secondary a:hover,
body.blog #secondary a:hover,
body.home .widget-area a:hover,
body.blog .widget-area a:hover{
  text-decoration: underline;
}

/* =================================
   Homepage post list heading
   ================================= */
body.home #primary::before,
body.blog #primary::before{
  content: "Aktuelles";
  display: block;

  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);

  margin: 0 0 18px 0;
  padding-left: var(--pad-md);
}

@media (max-width: 768px){
  body.home #primary::before,
  body.blog #primary::before{
    font-size: 22px;
    padding-left: var(--pad-sm);
    margin-bottom: 14px;
  }
}

/* =================================
   Homepage Hero (Customizer section)
   ================================= */
.kmoso-home-hero{
  margin: 0 0 24px;
  clear: both;
  width: 100%;
}

.kmoso-home-hero__inner{
  display: grid;
  grid-template-columns: 1fr 2fr; /* 33/66 */
  gap: 26px;
  align-items: center;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--pad-md);
  box-shadow: var(--shadow-lg);
}

.kmoso-home-hero__media{
  width: 100%;
}

.kmoso-home-hero__media img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
  object-fit: cover;
}

.kmoso-hero-placeholder{
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.02));
}

.kmoso-home-hero__title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.kmoso-home-hero__text{
  font-size: 16px;
  line-height: 1.65;
  color: rgba(0,0,0,0.82);
}

.kmoso-home-hero__button{
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 2px solid rgba(0,0,0,0.75);
  text-decoration: none;
  font-weight: 800;
  background: var(--surface);
  color: var(--text);
  transition: background-color var(--trans), transform var(--trans);
}

.kmoso-home-hero__button:hover{
  background: rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

@media (max-width: 900px){
  .kmoso-home-hero__inner{
    grid-template-columns: 1fr;
  }
}