/* ==========================================================================
   GBV România — home.css (chunk 3; PORT_MAPPING §7)
   The „Acasă” page: hero slideshow, category tiles, „Noutăți” grid and the
   mission block, restyled to index.html (Homepage Hero / Categories /
   Noutati / Mission). Markup from inc/home.php and patterns/home.php;
   behaviour assets/js/hero.js. Loaded on the front page only. Token
   variables only; the mockup's literals carry their source. The world map
   is a CSS background here, never markup (TD-005).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero: cream section, one track of slides, side arrows ≥ 922, dots row
   -------------------------------------------------------------------------- */
.gbv-hero {
  position: relative;
  isolation: isolate;                                   /* the map's z-index -1 stays inside the hero */
  overflow: hidden;
  background: var(--surface-page);
  color: var(--text-body);
}
/* World map anchored at the golden-ratio point of the section (index.html,
   B2), painted behind every slide and control, above the cream only. */
.gbv-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 61.8%;
  top: 50%;
  width: 920px;                                         /* index.html .hm-map */
  aspect-ratio: 1005.75 / 602.25;                       /* world-map.svg viewBox */
  transform: translate(-50%, -50%);
  background: url("../img/world-map.svg") center / contain no-repeat;
  opacity: 0.45;
  pointer-events: none;
}
.gbv-hero__track {
  position: relative;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* index.html slide motion */
}
.gbv-hero__slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
}
.gbv-hero__slide-inner {
  box-sizing: border-box;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 52px 128px 40px;                             /* index.html .hm-slide */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: center;
}
.gbv-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.gbv-hero__caption {
  color: var(--text-strong);
  font-size: var(--text-xs);
}
.gbv-hero__title {
  margin: 14px 0 0;                                     /* index.html */
  font-family: var(--font-headline);
  font-weight: var(--fw-bold);
  font-size: clamp(1.6875rem, 3.4vw, 2.875rem);         /* 27–46 px */
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  max-width: 18ch;
}
.gbv-hero__lede {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: clamp(0.96875rem, 1.5vw, 1.1875rem);       /* 15.5–19 px */
  line-height: 1.5;
  color: var(--text-body);
  max-width: 46ch;
}
.gbv-hero .gbv-hero__text .gbv-hero__cta,
.gbv-hero .gbv-hero__text .gbv-hero__cta:visited,
.gbv-hero .gbv-hero__text .gbv-hero__cta:hover,
.gbv-hero .gbv-hero__text .gbv-hero__cta:focus-visible {
  margin-top: 26px;                                     /* index.html */
  text-decoration: none;
}
.gbv-hero__cover {
  width: 280px;                                         /* index.html .hm-cover */
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(1deg) translateX(-30px);
}
.gbv-hero__cover-box {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.gbv-hero__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

/* Controls: one pair of arrows (absolute at the sides from the tablet
   switch up, inline in the row below it) and the dots with 32 px targets */
.gbv-hero__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: 18px 0 26px;                                 /* index.html dots row */
}
.gbv-hero__arrow {
  box-sizing: border-box;
  width: var(--hit-area);
  height: var(--hit-area);
  padding: 0;
  margin: 0;
  border: var(--stroke-hairline) solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--motion-base) ease;
}
.gbv-hero__arrow .gbv-icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
}
/* States at 0,3,0: Astra's global button:hover / :focus / :active rules
   (0,1,1) recolour the border and the glyph of every <button> otherwise.
   Hover = the mockup's blue-mist; press = the header discs' blue-steel. */
.gbv-hero .gbv-hero__arrow:hover,
.gbv-hero .gbv-hero__arrow:focus-visible {
  background: var(--surface-brand-soft);
  border-color: var(--border-default);
  color: var(--text-strong);
}
.gbv-hero .gbv-hero__arrow:active {
  background: var(--gbv-blue-steel);
  border-color: var(--gbv-blue-steel);
  color: var(--text-on-brand);
}
.gbv-hero__dots {
  display: flex;
  gap: 2px;                                             /* index.html */
}
.gbv-hero__dot {
  height: 32px;                                         /* B6 target */
  padding: 0 4px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
/* The dot button itself never changes (mockup); only the mark does */
.gbv-hero .gbv-hero__dot:hover,
.gbv-hero .gbv-hero__dot:focus,
.gbv-hero .gbv-hero__dot:focus-visible,
.gbv-hero .gbv-hero__dot:active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: inherit;
}
.gbv-hero__dot-mark {
  display: block;
  width: 10px;                                          /* index.html dot */
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--gbv-gray-200);
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}
.gbv-hero__dot[aria-current="true"] .gbv-hero__dot-mark {
  width: 28px;
  background: var(--color-accent);
}
@media (min-width: 922px) {
  .gbv-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;                                        /* index.html side arrows */
    height: 48px;
    box-shadow: var(--shadow-xs);
  }
  .gbv-hero__arrow--prev { left: var(--space-6); }
  .gbv-hero__arrow--next { right: var(--space-6); }
  .gbv-hero__arrow .gbv-icon {
    width: 18px;                                        /* index.html */
    height: 18px;
  }
}
@media (max-width: 1279.98px) and (min-width: 922px) {
  .gbv-hero__slide-inner {
    padding: 52px 88px 40px;                            /* keeps ≥ 410 px for the text */
    gap: 48px;
  }
}
@media (max-width: 921.99px) {
  .gbv-hero::before {
    left: 61.8%;
    top: 38.2%;
    width: 560px;
  }
  .gbv-hero__slide-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-8) var(--gutter) var(--space-2);
    gap: 22px;
    text-align: center;
  }
  .gbv-hero__text {
    align-items: center;
  }
  .gbv-hero__title,
  .gbv-hero__lede {
    margin-left: auto;
    margin-right: auto;
  }
  .gbv-hero__cover {
    order: -1;
    justify-self: center;
    width: 164px;
    transform: none;
  }
  .gbv-hero__img {
    max-height: 164px;
  }
}

/* --------------------------------------------------------------------------
   2. Category tiles: 5 ≥ 1280 · 2 + 3 on six tracks · rows below the tablet
      switch (index.html, C2/H2 as frozen). Colours from base.css §14.
   -------------------------------------------------------------------------- */
.gbv-tiles-section {
  box-sizing: border-box;
  max-width: calc(var(--container-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-12) var(--gutter) var(--space-4);
}
.gbv-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-5);
}
.gbv-tiles__item {
  margin: 0;
  min-width: 0;
}
/* Default look for a slug without a palette entry (zero specificity: the map wins) */
:where(.gbv-tile) {
  --gbv-cat-bg: var(--surface-sunken);
  --gbv-cat-fg: var(--text-strong);
  --gbv-cat-icon-color: currentColor;
}
/* Link selectors in this file carry two ancestor classes so they outrank
   Astra's content-link rule (.ast-single-post .entry-content a — colour and
   underline, specificity 0,2,1). */
.gbv-tiles .gbv-tiles__item .gbv-tile,
.gbv-tiles .gbv-tiles__item .gbv-tile:visited,
.gbv-tiles .gbv-tiles__item .gbv-tile:hover,
.gbv-tiles .gbv-tiles__item .gbv-tile:focus-visible {
  color: var(--gbv-cat-fg);
  text-decoration: none;
}
.gbv-tiles .gbv-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  box-sizing: border-box;
  min-height: 208px;                                    /* index.html .hm-tile */
  height: 100%;
  padding: 22px;
  border-top-left-radius: var(--corner-lg);
  background: var(--gbv-cat-bg);
  text-decoration: none;
}
.gbv-tile__icon {
  display: block;
  flex: none;
  width: 26px;                                          /* index.html */
  height: 26px;
  background-color: var(--gbv-cat-icon-color);
  -webkit-mask-image: var(--gbv-cat-icon);
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: var(--gbv-cat-icon);
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}
.gbv-tile__body {
  display: flex;
  flex-direction: column;
  gap: 6px;                                             /* index.html */
  min-width: 0;
}
.gbv-tile__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-headline);
  font-weight: var(--fw-bold);
  font-size: 1.1875rem;                                 /* 19 px, index.html */
  line-height: 1.2;
}
.gbv-tile__title .gbv-icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
}
.gbv-tile__desc {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--text-caption);
  line-height: 1.45;
  opacity: 0.85;
}
@media (max-width: 1279.98px) and (min-width: 922px) {
  .gbv-tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .gbv-tiles__item {
    grid-column: span 2;                                /* row 2: three tiles */
  }
  .gbv-tiles__item:nth-child(1),
  .gbv-tiles__item:nth-child(2) {
    grid-column: span 3;                                /* row 1: two tiles */
  }
}
@media (max-width: 921.99px) {
  .gbv-tiles-section {
    padding: 28px var(--gutter) var(--space-2);         /* index.html */
  }
  .gbv-tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }
  .gbv-tiles .gbv-tiles__item .gbv-tile {
    min-height: 72px;                                   /* index.html rows */
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 20px 14px 28px;
    border-top-left-radius: var(--corner-md);
  }
  .gbv-tile__body {
    flex: 1;
  }
  .gbv-tile__title {
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   3. „Noutăți”: heading + „Vezi toate”, the stock loop as a 4 / 3 / 2 grid
   -------------------------------------------------------------------------- */
.gbv-new-titles__inner {
  box-sizing: border-box;
  max-width: calc(var(--container-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-8) var(--gutter) var(--space-16);
}
.gbv-new-titles__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.gbv-new-titles__title {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: var(--fw-bold);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);            /* 24–30 px */
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
  color: var(--text-strong);
}
.gbv-new-titles .gbv-new-titles__head .gbv-new-titles__all,
.gbv-new-titles .gbv-new-titles__head .gbv-new-titles__all:visited {
  display: inline-flex;
  align-items: center;
  gap: 7px;                                             /* index.html */
  min-height: var(--hit-area);                          /* B6 */
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--text-md);
  color: var(--color-brand);
  text-decoration: none;
  white-space: nowrap;
}
.gbv-new-titles .gbv-new-titles__head .gbv-new-titles__all:hover,
.gbv-new-titles .gbv-new-titles__head .gbv-new-titles__all:focus-visible {
  color: var(--color-accent-strong);
  text-decoration: none;
}
.gbv-new-titles__all .gbv-icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
}
.gbv-new-titles ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin: 0;
  padding: 0;
}
.gbv-new-titles ul.products::before,
.gbv-new-titles ul.products::after {
  content: none;
}
.gbv-new-titles ul.products li.product {
  width: auto;
  float: none;
}
@media (max-width: 921.99px) and (min-width: 768px) {
  .gbv-new-titles ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }
}
@media (max-width: 767.98px) {
  .gbv-new-titles ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
}
@media (max-width: 921.99px) {
  .gbv-new-titles__inner {
    padding: var(--space-8) var(--gutter) var(--space-10);
  }
}

/* --------------------------------------------------------------------------
   4. Mission block: blue-deep, map at 14 %, centred 860 px column
   -------------------------------------------------------------------------- */
.gbv-mission {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: clamp(3rem, 6vw, 4.5rem) var(--space-6);     /* 48–72 px, index.html */
  background: var(--surface-inverse);
  color: var(--text-on-brand);
  text-align: center;
}
.gbv-mission::before {
  content: "";
  position: absolute;
  right: -60px;                                         /* index.html */
  top: 50%;
  width: 780px;
  aspect-ratio: 1005.75 / 602.25;
  transform: translateY(-50%);
  background: url("../img/world-map.svg") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}
.gbv-mission > * {
  position: relative;
  box-sizing: border-box;
  max-width: 860px;                                     /* index.html */
  margin-left: auto;
  margin-right: auto;
}
.gbv-mission__caption {
  margin: 0;
  color: var(--gbv-orange-peach);
  font-size: var(--text-xs);
}
.gbv-mission__text {
  margin: 18px auto 0;                                  /* index.html */
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: clamp(1.09375rem, 2vw, 1.4375rem);         /* 17.5–23 px */
  line-height: 1.55;
  color: var(--text-on-brand);
}
.gbv-mission__cta {
  margin: 26px auto 0;
}
.gbv-mission .gbv-mission__cta .gbv-mission__link,
.gbv-mission .gbv-mission__cta .gbv-mission__link:visited {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--hit-area);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  color: var(--gbv-orange-peach);
  text-decoration: none;
  transition: color var(--motion-base) ease;
}
.gbv-mission__link::after {
  content: "";
  flex: none;
  width: var(--icon-sm);
  height: var(--icon-sm);
  background-color: currentColor;
  -webkit-mask: url("../img/icons/arrow-right.svg") center / contain no-repeat;
  mask: url("../img/icons/arrow-right.svg") center / contain no-repeat;
}
.gbv-mission .gbv-mission__cta .gbv-mission__link:hover,
.gbv-mission .gbv-mission__cta .gbv-mission__link:focus-visible {
  color: var(--color-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gbv-hero__track,
  .gbv-hero__dot-mark {
    transition: none;
  }
}
