/* ahen26 - top of the page: a compact one-row header and a hero that fits the first screen.
   Loaded after redesign.css and j6-compat.css, so it overrides the older float-based header rules.
   To go back to the previous look, remove the <link> of this file in index.php. */

:root { --header-h: 80px; }

/* ---------------------------------------------------------------------
   Header (tablet and desktop): logo | menu | phone | language, one row
   --------------------------------------------------------------------- */
@media (min-width: 768px) {
  header {
    height: var(--header-h);
    min-height: 0;
    padding: 0;
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(16,42,67,.06);
  }
  header .wrapper { height: 100%; }
  header .newheader {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
  }
  header .newheader::after { display: none; }   /* the clearfix would become an empty flex item */
  header .newheader > .moduletable,
  header .newheader > .moduletable_lang {
    float: none;
    clear: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  header .moduletable.logo { order: 1; flex: 0 0 auto; }
  header .moduletable.logo p { margin: 0; line-height: 0; }
  header .moduletable.logo img { display: block; height: 64px; width: auto; max-width: none; }

  header .moduletable.menu { order: 2; flex: 1 1 auto; display: flex; justify-content: center; }
  header .moduletable.menu ul.nav.menu { display: flex; align-items: center; gap: 2px; }
  header ul.nav.menu li { padding: 0 12px; }
  /* the underline is always there (transparent) so the item does not jump when it turns green */
  header ul.nav.menu li a { display: block; padding: 6px 0; border-bottom: 3px solid transparent; }
  header ul.nav.menu li.current a,
  header ul.nav.menu li.active a,
  header ul.nav.menu li:hover a,
  header ul.nav.menu li:focus a { border-bottom-color: var(--green); }

  header .moduletable.tel { order: 3; flex: 0 0 auto; }
  header .moduletable.tel p { margin: 0; white-space: nowrap; }

  header .moduletable_lang { order: 4; flex: 0 0 auto; }
  header ul.lang-inline { margin: 0; padding: 0; list-style: none; }
  header ul.lang-inline li { float: none; margin: 0; }
}

/* narrower laptops / tablets: drop the phone (it is in the footer too) so the menu keeps its room */
@media (min-width: 768px) and (max-width: 1099px) {
  header .moduletable.tel { display: none; }
  header ul.nav.menu li { padding: 0 9px; }
}

/* ---------------------------------------------------------------------
   Header (phone): one 64px row - hamburger on the left, language next to it, logo on the right
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
  header { height: 64px !important; min-height: 0; padding: 0 !important; }
  header .moduletable.logo {
    position: absolute;
    inset-inline-start: auto;
    right: 14px;
    top: 0;
    width: auto;
    height: 64px;
    margin: 0;
    float: none;
    display: flex;
    align-items: center;
  }
  header .moduletable.logo p { margin: 0; line-height: 0; }
  header .moduletable.logo img { display: block; height: 40px; width: auto; max-width: none; }
  header .moduletable.menu:before { margin: 9px 10px; }
  header .moduletable_lang { position: absolute; left: 66px; top: 14px; width: auto; margin: 0; float: none; }
  header ul.lang-inline { margin: 0; padding: 0; }
  header ul.lang-inline li { margin: 0; }
  .moduletable.menu.open ul.nav.menu { margin-top: 58px; }
}

/* ---------------------------------------------------------------------
   Hero: header + hero fill the first screen (with a strip of the next section showing)
   --------------------------------------------------------------------- */
.hero {
  height: clamp(420px, calc(100vh - var(--header-h) - 56px), 700px);
  height: clamp(420px, calc(100svh - var(--header-h) - 56px), 700px);
}
@media (max-width: 1023px) {   /* tablet portrait: a shorter hero so the wide photos are not cropped to a slice */
  .hero { height: clamp(320px, 66vw, 560px); }
}
@media (max-width: 767px) {
  .hero { height: clamp(250px, 70vw, 440px); }
  .hero-cta { font-size: 1.05rem; padding: 10px 30px; }
}

.hero-slide {
  background-image: var(--img);
  background-position: var(--pos, center);
  transform: scale(1);
  transition: opacity 1s var(--ease), transform 9s ease-out;   /* slow zoom while the slide is showing */
}
.hero-slide.is-active { transform: scale(1.06); }
@media (max-width: 767px) {
  .hero-slide { background-image: var(--img-m, var(--img)); }
}

/* the photos are clean now, so a soft gradient at the bottom carries the button and the dots */
.hero::after {
  background: linear-gradient(to top, rgba(7,31,43,.72) 0%, rgba(7,31,43,.28) 34%, rgba(7,31,43,0) 62%);
}
.hero-overlay { bottom: clamp(48px, 9vh, 92px); }

.hero-arrow {
  width: 46px;
  height: 46px;
  background: rgba(7,31,43,.38);   /* dark glass: readable on bright and dark photos alike */
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-arrow:hover { background: #fff; color: var(--ink); }

.hero-dots { bottom: 20px; align-items: center; }
.hero-dots button {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,.55);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.hero-dots button.is-active { width: 28px; border-radius: var(--r-pill); background: #fff; transform: none; }

@media (max-width: 767px) {
  .hero-overlay { bottom: 40px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 1.4rem; }
  .hero-dots { bottom: 14px; }
}
