/* Small site-wide additions on top of the Dewi template's main.css (left untouched). */

/* 16px text in form fields stops iPhones zooming the page when a field is tapped. */
@media (max-width: 767.98px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Phones: keep the header on one compact row — the template's 30px site name
   wrapped onto three lines next to the "Get In Touch" button. Contact is in
   the menu anyway, so the button is dropped on small screens. */
@media (max-width: 575.98px) {
  .header { padding: 12px 0; }
  .header .logo img { max-height: 34px; margin-right: 8px; }
  .header .logo h1 { font-size: 18px; line-height: 1.2; }
  .header .cta-btn { display: none; }
}

/* Portfolio: every card gets the same 4:3 frame, whatever shape the uploaded
   photo is — portrait photos are cropped to fill it (biased towards the top,
   where faces usually are) instead of stretching the card and breaking the
   grid. The lightbox (zoom icon) still opens the full, uncropped image. */
.portfolio .portfolio-content img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 25%;
}

/* Portfolio video cards: same 4:3 cover as a photo, plus a play button. The
   button covers the whole card (above the hover overlay) so a click or tap
   anywhere on it opens the player. */
.portfolio .portfolio-content.is-video .video-play {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.portfolio .video-play-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 34px;
  border: 2px solid rgba(255, 255, 255, .85);
  transition: transform .2s ease, background .2s ease;
}
.portfolio .video-play-icon i { margin-left: 4px; line-height: 1; }
.portfolio .video-play:hover .video-play-icon,
.portfolio .video-play:focus-visible .video-play-icon { transform: scale(1.1); background: var(--accent-color, #ff4a17); }
.portfolio .video-play:focus-visible { outline: 3px solid var(--accent-color, #ff4a17); outline-offset: -3px; }

/* Video player overlay (assets/js/site.js). The player sizes itself to the
   video, so vertical phone clips and wide ones both fit the screen. */
.video-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center;
  padding: 56px 16px 24px;
  background: rgba(0, 0, 0, .9);
  animation: video-modal-in .2s ease;
}
@keyframes video-modal-in { from { opacity: 0; } }
.video-modal video {
  display: block;
  max-width: min(100%, 1280px);
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px);
  width: auto; height: auto;
  border-radius: 8px; background: #000;
}
.video-modal .video-frame {
  width: min(100%, 1100px, calc((100dvh - 80px) * 16 / 9));
  aspect-ratio: 16 / 9;
}
.video-modal .video-frame.vertical {
  width: min(100%, calc((100dvh - 80px) * 9 / 16));
  aspect-ratio: 9 / 16;
}
.video-modal .video-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #000; }
.video-modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px;
  display: grid; place-items: center; cursor: pointer;
}
.video-modal-close:hover, .video-modal-close:focus-visible { background: rgba(255, 255, 255, .3); }
.video-modal-error { color: #fff; text-align: center; max-width: 420px; }
.video-modal-error a { color: #fff; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .video-modal { animation: none; }
  .portfolio .video-play-icon { transition: none; }
}

/* Stats: number and its optional suffix ("+", "%") sit on one line. */
.stats .stats-item .stat-number { display: flex; align-items: baseline; }

/* About: both images sit in the same 4:3 frame whatever shape the photo is —
   a portrait upload is cropped to fit instead of stretching the column past
   the text. Which part stays visible (object-position) is chosen per image
   under Admin → Home Content and set inline. */
.about .about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Footer newsletter: small consent line under the sign-up box. */
.footer .footer-newsletter .newsletter-note { font-size: 13px; opacity: .7; margin: 8px 0 0; }

/* Certifying Bodies: link to the export guide, styled like the hero button. */
.services-2 .btn-guide {
  background: var(--accent-color);
  color: var(--contrast-color);
  display: inline-block;
  padding: 10px 30px;
  border-radius: 4px;
  font-size: 15px;
  transition: 0.3s;
}
.services-2 .btn-guide:hover { background: color-mix(in srgb, var(--accent-color), transparent 20%); }

/* Kosher Certification page: "What can be certified" photo cards and the
   numbered process steps (both inside the page's admin-editable text). */
.cert-scope { margin: 8px 0 24px; }
.cert-scope-card {
  height: 100%;
  background: var(--surface-color);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}
.cert-scope-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.cert-scope-body { padding: 18px 20px 20px; }
.cert-scope-body h3 { font-size: 18px; margin: 0 0 8px; }
.cert-scope-body p { font-size: 15px; margin: 0; }
.cert-steps li { margin-bottom: 12px; }
.cert-steps li p { margin: 4px 0 0; }
