/* FoodCheck — Σύμβουλοι Ποιότητας & Ασφάλειας Τροφίμων
   Mobile-first. No frameworks, no external fonts, no tracking. */

/* The above-the-fold rules — the custom properties, the reset, .wrap, the header,
   the nav, the hero and the legal intro — are deliberately NOT in this file. Each
   page carries them in a <style> block in its <head>, so the browser can paint a
   correct header and hero from the HTML alone and a slow stylesheet cannot flash a
   half-styled page.

   This file holds only what appears below the fold, and the browser applies it
   after that inline block. The two never overlap: a rule belongs in exactly one
   place. When you add a rule here that uses var(--navy) and friends, the
   properties come from the inline block — do not redeclare them. */

/* ---------- Layout ---------- */
.section { padding: clamp(3.25rem, 8vw, 5.75rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- About ---------- */
.about__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.about__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}
.about__media img { width: 100%; height: auto; }

/* Set by main.js when the photo file is missing, so no broken icon shows. */
.about__grid--no-media .about__media { display: none; }
.about__grid--no-media > div { max-width: 68ch; }

.pillars {
  display: grid;
  gap: 1.1rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}
.pillar {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}
.pillar__icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green-dark);
}
.pillar__icon svg { width: 18px; height: 18px; }
.pillar h3 { margin: 0 0 .15rem; font-size: 1rem; }
.pillar p { font-size: .925rem; color: var(--muted); margin: 0; }

.quote {
  margin: 2.25rem 0 0;
  padding: 1.25rem 1.4rem;
  border-left: 4px solid var(--green);
  background: var(--green-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Services ---------- */
.svc-group + .svc-group { margin-top: clamp(2.5rem, 5vw, 3.75rem); }

.svc-group__head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.5rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.svc-group__head svg { width: 22px; height: 22px; flex: none; color: var(--green-dark); }
.svc-group__head h3 {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--navy);
}

.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  padding: 1.5rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card:hover {
  border-color: #cfe0a8;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--green-tint);
  color: var(--green-dark);
}
.card__icon svg { width: 21px; height: 21px; }
.card h4 {
  margin: 0 0 .5rem;
  font-size: 1.035rem;
  line-height: 1.35;
  color: var(--navy);
}
.card p { margin: 0; font-size: .925rem; color: var(--muted); }

.areas {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.5rem 1.5rem;
  border: 1px dashed #cdd8c2;
  border-radius: var(--radius);
  background: var(--green-tint);
  font-size: .95rem;
  color: var(--navy);
}
.areas strong { display: block; margin-bottom: .2rem; }

/* ---------- Contact ---------- */
/* Details on one side, a photo of the office on the other. Stacks on a phone. */
.contact__layout { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }

.contact__grid { display: grid; gap: 1rem; margin-bottom: 2rem; }

.contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem 1.3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.contact-card:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.contact-card__icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
}
.contact-card__icon svg { width: 18px; height: 18px; }
.contact-card__label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .15rem;
}
.contact-card__value {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.contact-card__note { display: block; font-size: .84rem; color: var(--muted); font-weight: 400; }

.contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.contact__media {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-alt);
}
.contact__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

/* Navy scrim so the caption stays readable over the marble floor. */
.contact__media figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: clamp(2.5rem, 9vw, 3.5rem) 1.4rem 1.3rem;
  background: linear-gradient(to top, rgb(18 40 63 / 92%) 32%, rgb(18 40 63 / 0%));
  color: #fff;
}
.contact__media .eyebrow { margin-bottom: .3rem; color: var(--green); }
.contact__media p { margin: 0; font-size: .95rem; color: rgb(255 255 255 / 85%); }

/* ---------- Footer ---------- */
.footer {
  padding: 2.75rem 0 2rem;
  background: var(--navy-dark);
  color: rgb(255 255 255 / 70%);
  font-size: .89rem;
}
.footer .logo__name { color: #fff; }
.footer .logo__tag { color: rgb(255 255 255 / 55%); }
.footer__top {
  display: grid;
  gap: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer__links a { color: rgb(255 255 255 / 78%); text-decoration: none; }
.footer__links a:hover { color: var(--green); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: .82rem;
  color: rgb(255 255 255 / 55%);
}
.footer__bottom a { color: inherit; }

/* ---------- Legal page ---------- */
/* .legal, .legal__body, .legal__box and .legal__meta are in the inline block. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 2.5rem;
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (min-width: 680px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .footer__top { grid-template-columns: auto 1fr; align-items: center; }
  .footer__links { justify-content: flex-end; }
  /* Full width at this size, so crop wider or the photo dwarfs the cards. */
  .contact__media img { aspect-ratio: 16 / 9; }
}

@media (min-width: 900px) {
  /* The desktop header rules are in the inline block, next to the header. */
  .about__grid { grid-template-columns: 1.05fr .95fr; align-items: start; }
  .about__grid--no-media { grid-template-columns: 1fr; }
  /* The text column is only half-width here, so three pillars would be far too
     narrow. Stack them instead. */
  .about__grid:not(.about__grid--no-media) .pillars { grid-template-columns: 1fr; }
  .about__media { position: sticky; top: calc(var(--header-h) + 2rem); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .svc-group--production .cards { grid-template-columns: repeat(3, 1fr); }

  .contact__layout { grid-template-columns: 1.05fr .95fr; }
  /* The details column is only half-width here, so two contact cards side by
     side would be too narrow. Stack them, as the About pillars do. */
  .contact__layout .contact__grid { grid-template-columns: 1fr; }
  /* Absolute image, so the figure takes its height purely from the grid row and
     the photo crops to whatever the details column ends up being. */
  .contact__media img { position: absolute; inset: 0; aspect-ratio: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .card:hover { transform: none; }
}

@media print {
  .header, .nav, .hero__actions, .footer__links { display: none; }
}
