/* Release 1a-N (spec 009): sticky header, menu and main button of the landing page.
   Own rules only (no new utility classes: the kept stylesheet is a purged build), with the
   site's tokens. The guide renders its own header without these classes, so it does not change.

   Widths: 1024 px and up, links in the header. Below that, a burger opens them in a panel.
   740 px and below, the main button moves from the header to the bottom bar. */

/* A menu jump must not hide the section's title under the sticky header. */
html {
  scroll-padding-top: 73px;
}

.site-header.site-header-nav {
  position: sticky;
  top: 0;
  z-index: 40; /* above the bottom bar (30), below the dialogs (50) */
  background: var(--background); /* opaque: the dark bands and videos scroll underneath */
}

.site-header-nav .brand-mark,
.site-header-nav .shell > .flex,
.nav-block,
.nav-cta {
  flex: none;
}

.site-header-nav .shell > .flex {
  margin-left: auto;
}

.nav-block {
  margin-left: 20px;
}

.nav-toggle {
  display: none;
}

.site-nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--foreground);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-list a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav-list a:focus-visible,
.nav-toggle:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-cta {
  min-height: 44px;
  font-weight: 800;
}

@media (width < 1160px) {
  .nav-block {
    order: 3;
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
    cursor: pointer;
  }

  .nav-toggle .nav-icon-close,
  .nav-toggle[aria-expanded="true"] .nav-icon-menu {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-icon-close {
    display: block;
  }

  /* The panel hangs below the header and does not push the page. */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    box-shadow: 0 12px 32px oklch(20% 0.02 60 / 0.18);
  }

  .site-header-nav.nav-open .site-nav {
    display: block;
  }

  .site-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(1120px, 100% - 40px); /* same as .shell, so the links line up with the logo */
    margin-inline: auto;
    padding-block: 6px;
  }

  .site-nav-list li + li {
    border-top: 1px solid var(--border);
  }

  .site-nav-list a {
    display: flex;
    font-size: 1rem;
  }
}

@media (width <= 740px) {
  html {
    scroll-padding-top: 65px;
  }

  .site-nav-list {
    width: min(100% - 28px, 560px); /* same as .shell at this width */
  }

  .nav-cta {
    display: none;
  }

  /* The sprint's text is longer than the old one: it takes two lines, and the button a bigger share. */
  .mobile-actions {
    grid-template-columns: 1.7fr 0.7fr 0.9fr;
  }

  .mobile-actions button {
    height: auto;
    padding: 4px 10px;
    line-height: 1.15;
    text-align: center;
    text-wrap: balance;
    white-space: normal;
  }
}

/* Narrow phones: tighter gaps first, then «Κλήση» instead of the number, as the guide's header does. */
@media (width < 375px) {
  .site-header-nav .shell,
  .site-header-nav .shell > .flex {
    gap: 8px;
  }
}

@media (width < 360px) {
  .site-header-nav .contact-link:not(.whatsapp) span:first-of-type {
    display: none;
  }

  .site-header-nav .contact-link:not(.whatsapp) span:last-of-type {
    display: inline;
  }

  /* Keeps the button at two lines, so the bar does not take more of a small screen. */
  .mobile-actions {
    grid-template-columns: 1.9fr 0.7fr 0.9fr;
  }

  .mobile-actions button {
    padding-inline: 6px;
    font-size: 0.78rem;
  }
}

/* Release 2a (spec 016): «Οδηγοί», «Καλέστε με», #methodologia, #epikoinonia, the footer of 3 groups. Own rules with the site's
   tokens; the kept stylesheet is a purged build. Breakpoints as nav.css: below 1160 px the links are in the burger panel. */

/* A longer panel scrolls on its own: 9 links and a heading do not fit a small phone. */
@media (width < 1160px) {
  .site-nav {
    max-height: calc(100dvh - 73px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ---- «Οδηγοί» ---- */
.nav-guides {
  position: relative;
}

.nav-guides-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.nav-guides-btn:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-guides-btn:focus-visible,
.nav-callback:focus-visible,
footer a:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-guides-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}

.nav-guides.is-open .nav-guides-btn svg {
  transform: rotate(180deg);
}

.nav-guides-heading {
  display: none;
}

.nav-guides-list {
  display: none;
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 1;
  min-width: 230px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  box-shadow: 0 12px 32px oklch(20% 0.02 60 / 0.18);
  list-style: none;
}

.nav-guides.is-open .nav-guides-list {
  display: block;
}

.nav-guides-list li + li {
  border-top: 1px solid var(--border);
}

.nav-guides-list a {
  display: flex;
}

/* The secondary button in the header row. Its link in the panel is .nav-callback-item. */
.nav-callback {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--foreground);
  border-radius: calc(var(--radius) - 2px);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-callback:hover {
  background: var(--secondary);
}

@media (width >= 1160px) {
  .nav-callback {
    display: inline-flex;
  }

  .nav-callback-item {
    display: none;
  }

  .nav-block {
    margin-left: 14px;
  }

  .site-nav-list {
    gap: 18px;
  }
}

/* In the burger the group's links are open under a heading: no second tap. */
@media (width < 1160px) {
  .nav-guides-btn {
    display: none;
  }

  .nav-guides-heading {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 800;
  }

  .nav-guides-list {
    display: block;
    position: static;
    min-width: 0;
    padding: 0 0 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ---- #methodologia ---- */
.methodology {
  padding-block: 4.5rem;
}

.methodology h2 {
  margin: 0.35rem 0 1.25rem;
  color: var(--foreground);
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.methodology p {
  margin: 0 0 1rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.methodology p:last-child {
  margin-bottom: 0;
}

/* ---- #epikoinonia: the section's look stays; the actions may wrap ---- */
.direct-actions {
  flex-wrap: wrap;
}

.direct-callback {
  min-height: 44px;
  font-weight: 800;
  text-decoration: none;
}

/* ---- Footer ---- */
.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(auto-fit, minmax(170px, 1fr));
  gap: 30px;
}

.footer-about {
  margin: 14px 0;
  color: var(--muted-foreground);
  font-size: 0.87rem;
  line-height: 1.55;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 0.87rem;
}

footer a {
  color: var(--foreground);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* On a touch screen :hover stays on the last link tapped, so it would look selected (owner, footer-8). */
@media (hover: none) {
  footer a:hover,
  .site-nav-list a:hover,
  .nav-guides-btn:hover {
    text-decoration: none;
  }
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* The two buttons keep their own colours, against the footer's link rule above. */
.footer-actions .footer-cta,
.footer-actions .footer-cta:hover {
  min-height: 44px;
  color: var(--primary-foreground);
  font-weight: 800;
  text-decoration: none;
}

.footer-actions .nav-callback {
  display: inline-flex;
}

.footer-group h2 {
  margin: 0 0 12px;
  color: var(--foreground);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.footer-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 0.87rem;
  list-style: none;
}

.footer-legal {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.6;
}

.footer-legal p {
  margin: 0;
}

@media (width <= 740px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}

/* Legal pages of revmas.gr and loyalty.revmas.gr (spec 016; owner footer-8). The look comes from the homepage: the kept stylesheet and
   its tokens, nav.css, footer.css. This file only sets the text, because the kept stylesheet resets headings, lists and tables. */
.legal-wrap {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
  padding-block: 40px 64px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.legal-wrap h1 {
  margin: 0 0 8px;
  color: var(--foreground);
  font-size: clamp(1.75rem, 4.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-wrap h2 {
  margin: 32px 0 10px;
  color: var(--foreground);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

.legal-wrap p,
.legal-wrap ul {
  margin: 0 0 14px;
}

.legal-wrap ul {
  padding-left: 20px;
  list-style: disc;
}

.legal-wrap strong {
  color: var(--foreground);
}

.legal-wrap a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-wrap a:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.legal-meta {
  font-size: 0.875rem;
}

/* Wide tables scroll on their own: the page never scrolls sideways. */
.legal-wrap table {
  display: block;
  overflow-x: auto;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.legal-wrap th,
.legal-wrap td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-wrap th {
  color: var(--foreground);
  font-weight: 800;
}
