/* ==========================================================================
   Tasuma Blog: Kopfbereich im Aufbau der Hauptseite (leo-tasuma-artem.de)
   Angelegt am 14.11.2026. Wird nur geladen, wenn tasuma_header_enabled() gilt
   (siehe wp-content/novamira-sandbox/tasuma-blog-header.php).
   Logo mittig in Spalte 1, Titel ab Spalte 2, darunter Linie und Menuezeile.
   Die Menuepunkte bleiben die bestehenden Astra-Menues.
   Farben: Bordeaux #77151D, Gruen #4B6449, Band #C3B8B1, Hintergrund #E3DEDA
   ========================================================================== */

/* ---------- Gemeinsam (Desktop und Handy) ---------- */
body.tasuma-header #masthead .ast-primary-header-bar {
  background-color: #C3B8B1;
  border-bottom: 0;
}
body.tasuma-header #masthead .site-logo-img img.custom-logo {
  display: block;
  width: 103px !important; height: 103px !important; max-width: none !important;
  border-radius: 50%;
}
body.tasuma-header #masthead .ast-site-title-wrap { margin: 0; padding: 0; }
body.tasuma-header #masthead .site-title {
  display: block; margin: 0; padding: 0; text-align: center;
  font: 400 40px/40px Roboto, sans-serif;
  letter-spacing: 0; text-transform: uppercase;
}
body.tasuma-header #masthead .site-title a,
body.tasuma-header #masthead .site-title a:hover,
body.tasuma-header #masthead .site-title a:focus {
  color: #77151D; font: inherit; text-decoration: none;
}
body.tasuma-header #masthead .tasuma-title-main { display: block; font-weight: 700; }
body.tasuma-header #masthead .tasuma-title-sub {
  display: block; margin-top: 4px;
  font-size: .55em; line-height: 1.3; letter-spacing: .08em;
}

/* ---------- Desktop (Astra-Desktop-Kopf ab 922px) ---------- */
@media (min-width: 922px) {
  body.tasuma-header #ast-desktop-header .site-primary-header-wrap {
    max-width: 1240px; margin: 0 auto; padding: 0 20px; min-height: 0 !important;
  }
  body.tasuma-header #ast-desktop-header .ast-builder-grid-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 120px auto;
    column-gap: 20px; row-gap: 0;
    align-items: center; min-height: 0 !important; padding: 20px 0;
  }
  /* Linie ueber der Menuezeile */
  body.tasuma-header #ast-desktop-header .ast-builder-grid-row::before {
    content: ''; display: block;
    grid-area: 2 / 1 / 3 / -1; align-self: stretch;
    border-top: 1px solid rgba(119, 21, 29, .3); pointer-events: none;
  }

  /* Abschnitte aufloesen, damit Logo, Titel, Menue und Suche im Raster liegen */
  body.tasuma-header #ast-desktop-header .site-header-primary-section-left,
  body.tasuma-header #ast-desktop-header .site-header-primary-section-right,
  body.tasuma-header #ast-desktop-header [data-section='title_tagline'],
  body.tasuma-header #ast-desktop-header .site-branding { display: contents; }

  body.tasuma-header #ast-desktop-header .site-logo-img {
    grid-area: 1 / 1; justify-self: center; align-self: center;
  }
  body.tasuma-header #ast-desktop-header .ast-site-title-wrap {
    grid-area: 1 / 1 / 2 / -1; justify-self: center; align-self: center; text-align: center;
  }
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1 {
    grid-area: 2 / 1 / 3 / -1; justify-self: stretch; align-self: start;
    padding: 10px 48px 4px;
  }
  body.tasuma-header #ast-desktop-header [data-section='section-header-search'] {
    grid-area: 2 / 1 / 3 / -1; justify-self: end; align-self: start;
    margin: 10px 0 0; position: relative; z-index: 2;
  }

  /* Menuezeile (mittig) */
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1,
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1 .ast-main-header-bar-alignment,
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1 .main-header-bar-navigation,
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1 .main-navigation { justify-content: center !important; }
  body.tasuma-header #ast-desktop-header .ast-builder-menu-1 .ast-main-header-bar-alignment {
    margin: 0 auto !important;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu {
    display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center !important;
    gap: 4px 36px; margin: 0; background: transparent; border: 0;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu > .menu-item {
    position: relative; display: flex; align-items: center;
    margin: 0; height: auto; line-height: 16px;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
    display: flex; align-items: center; height: auto !important;
    margin: 0; padding: 6px 0 !important;
    font: 600 16px/16px Roboto, sans-serif !important;
    letter-spacing: 0; text-transform: uppercase;
    color: #77151D !important; background: transparent !important;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu > .menu-item.current-menu-item > .menu-link {
    border-bottom-color: #77151D;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu > .menu-item:hover > .menu-link,
  body.tasuma-header #ast-desktop-header .main-header-menu > .menu-item:focus-within > .menu-link {
    color: #4B6449 !important; border-bottom-color: #4B6449;
  }
  body.tasuma-header #ast-desktop-header .menu-link .dropdown-menu-toggle {
    margin-left: 6px; padding: 0; line-height: 1;
  }
  body.tasuma-header #ast-desktop-header .menu-link .dropdown-menu-toggle .ast-icon svg {
    width: 10px; height: 10px; fill: currentColor;
  }

  /* Untermenue wie auf der Hauptseite */
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu {
    left: -18px; margin-top: 6px; width: auto; min-width: 150px;
    padding: 12px 18px;
    background: #E3DEDA; border: 2px solid #77151D !important; border-radius: 10px;
    box-shadow: none;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu::before {
    content: ''; position: absolute; left: 0; top: -8px; width: 100%; height: 8px;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu > .menu-item {
    margin: 0 0 6px; padding: 0; border: 0 !important;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu > .menu-item:last-child { margin-bottom: 0; }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu > .menu-item > .menu-link {
    display: block; padding: 6px 0 !important; white-space: nowrap;
    font: 600 16px/16px Roboto, sans-serif !important;
    letter-spacing: 0; text-transform: uppercase;
    color: #77151D !important; background: transparent !important; border: 0;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu > .menu-item > .menu-link:hover,
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu > .menu-item > .menu-link:focus {
    color: #4B6449 !important;
  }
  body.tasuma-header #ast-desktop-header .main-header-menu .sub-menu .menu-link .ast-icon { display: none; }

  /* Suche */
  body.tasuma-header #ast-desktop-header .ast-search-icon a,
  body.tasuma-header #ast-desktop-header .ast-search-icon .ast-icon { color: #77151D; }
  body.tasuma-header #ast-desktop-header .ast-search-icon .ast-icon svg { width: 18px; height: 18px; fill: currentColor; }
}

/* ---------- Handy und Tablet (Astra-Handy-Kopf bis 921px) ---------- */
@media (max-width: 921px) {
  body.tasuma-header #ast-mobile-header .site-logo-img img.custom-logo {
    width: 64px !important; height: 64px !important;
  }
  body.tasuma-header #ast-mobile-header .site-title {
    font-size: clamp(22px, 6.5vw, 34px); line-height: 1.1;
  }
  body.tasuma-header #ast-mobile-header .tasuma-title-sub { font-size: .5em; margin-top: 2px; }
  body.tasuma-header #ast-mobile-header .ast-mobile-header-content {
    background: #C3B8B1; border-top: 1px solid rgba(119, 21, 29, .3);
  }
  body.tasuma-header #ast-mobile-header .main-header-menu { background: #C3B8B1 !important; }
  body.tasuma-header #ast-mobile-header .main-header-menu .menu-item { justify-content: center; }
  body.tasuma-header #ast-mobile-header .main-header-menu .menu-link { text-align: center; }
  body.tasuma-header #ast-mobile-header .main-header-menu .menu-link {
    font-family: Roboto, sans-serif; font-size: 16px; font-weight: 600;
    letter-spacing: 0; text-transform: uppercase;
    color: #77151D; background: transparent !important;
  }
  body.tasuma-header #ast-mobile-header .main-header-menu .menu-item:hover > .menu-link,
  body.tasuma-header #ast-mobile-header .main-header-menu .current-menu-item > .menu-link { color: #4B6449; }
  body.tasuma-header #ast-mobile-header .menu-toggle,
  body.tasuma-header #ast-mobile-header .menu-toggle .ahfb-svg-iconset { color: #77151D; }
  body.tasuma-header #ast-mobile-header .menu-toggle svg { fill: currentColor; }
}
