/* ===========================
   Shared multi-site styles (branaldi.hu, papirdoboz.eu, papirdisplayek.hu,
   displaystand.hu). --color-dark/--color-accent/--brand-gradient/
   --font-heading are admin-editable (admin/site-edit.php) and generated
   per request into a small inline <style> tag on :root, plus a dynamic
   Google Fonts <link> for whichever font was picked (includes/layout-top.php,
   includes/content.php's google_fonts_stylesheet_url()) — see
   migrations/2026_08_12_add_site_colors_with_gradient.sql and
   migrations/2026_08_14_add_site_font_heading.sql. Everything else per-site
   below (letter-spacing/weight/case/first-letter-italic, one-off component
   overrides) IS a static, hardcoded design decision with no admin UI,
   scoped by the <body class="site-<site_key>"> set in the same file —
   deliberately kept separate from the :root block above (:root has lower
   specificity than body.site-X, so any --color-*/--font-heading declared
   here would silently win over the admin-set inline ones). */

:root {
  /* Fallback only reached if a page were ever missing its site-* body
     class — every real page has one, so this never actually applies. */
  --color-dark: #231E1F;
  --color-accent: #EA2A2E;
  --font-heading: 'Roboto', sans-serif;
  /* Overridden to italic for branaldi.hu only, alongside --font-heading —
     the original site (via SP Page Builder's .sppb-title-heading/
     .sppb-addon-title ::first-letter rule) italicized the first letter of
     every title; extended here to the nav menu as well. */
  --heading-first-letter-style: normal;
  /* Overridden to 'none' for branaldi.hu only — titles/nav shouldn't be
     forced to all-caps there. Only applied to actual section titles and
     the nav menu, not buttons/badges/labels that also happen to use
     uppercase for unrelated reasons. */
  --heading-text-transform: uppercase;
}

body.site-branaldi {
  --heading-first-letter-style: italic;
  --heading-text-transform: none;
  --heading-font-weight: 500;
  --heading-letter-spacing: -3px;
  --nav-letter-spacing: -0.5px;
  --nav-font-size: 17px;
}

body.site-papirdoboz {
  --richtext-text-color: var(--color-accent);
  --grid-caption-bg: #96CDB3;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700;900&display=swap');

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: #252525;
  line-height: 1.6;
  background: #fff;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--heading-font-weight, 700);
}

h1::first-letter,
h2::first-letter,
h3::first-letter,
.navbar-menu a::first-letter,
.gallery-caption::first-letter {
  font-style: var(--heading-first-letter-style);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top Bar --- */
.top-bar {
  /* Solid color_dark by default, not a gradient: the old second gradient
     stop (#3a3234) was hand-tuned to sit close to branaldi's own dark
     color, so it read as a subtle gradient there — but against other
     sites' very different-hued dark colors (e.g. papirdoboz's navy purple)
     the mismatched hue made it look like a muddy, distracting blend.
     --brand-gradient is only set for displaystand, whose actual brand
     identity IS a deliberate multi-color gradient (not a mismatched
     accident like the old one), so it's exempt from that reasoning. */
  background: var(--brand-gradient, var(--color-dark));
  padding: 8px 0;
  color: #fff;
  font-size: 13px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.top-bar a,
.top-bar-hours {
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dimmed white, not the brand accent: some sites' accent (e.g. papirdoboz's
   dark purple) is too close in lightness to the top-bar's own dark
   background to read as a hover state — a plain lighter white always
   contrasts regardless of the site's accent color. */
.top-bar a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.top-bar .social-links {
  display: flex;
  gap: 14px;
  margin-right: auto;
}

.top-bar .social-links a {
  font-size: 15px;
}

.top-bar-hours {
  margin-left: auto;
}

.lang-switch {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.lang-switch:hover {
  border-color: var(--color-accent);
}

/* --- Header / Navbar --- */
.navbar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.navbar-logo img {
  height: 45px;
  width: auto;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.navbar-menu a {
  font-family: var(--font-heading);
  font-size: var(--nav-font-size, 14px);
  font-weight: 500;
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  /* Its own variable, not --heading-letter-spacing: the nav's 14px text is
     small enough that -3px (fine on 30px+ titles) crushes words together
     and becomes unreadable — needs a much gentler value. */
  letter-spacing: var(--nav-letter-spacing, 0.5px);
  padding: 8px 4px;
  position: relative;
  transition: color 0.3s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--color-accent);
}

.navbar-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-gradient, var(--color-accent));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--color-accent);
  padding: 5px;
  display: none;
  align-items: center;
  transition: color 0.3s;
}

.menu-toggle:hover {
  color: #c81e22;
}

/* --- Hero Section --- */
.hero {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  width: 100%;
  aspect-ratio: 1920 / 400;
  max-height: 480px;
  overflow: hidden;
  position: relative;
  /* Shows through wherever object-fit: contain below leaves empty space —
     a pale neutral rather than the site's own dark color, since it's
     meant to read as a soft backdrop, not a bold design choice. Same tone
     already used for the gallery block's own letterboxing. */
  background: #f5f5f5;
}

.hero-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Sized to its own natural aspect ratio (not stretched to 100%x100% with
     object-fit: contain) — not every slide image matches the hero box's
     1920:400 ratio (e.g. branaldi's hero-4.jpeg is 1200x400, papirdisplayek's
     banner is 1920x600), and a mask fade needs to line up with the image's
     REAL rendered edges to be visible at all. With object-fit, the <img>
     element's own box was still the full 100%x100% container regardless of
     the image's rendered size inside it, so the mask (tied to that box) was
     fading empty margin space, not the actual image — invisible for any
     narrower image, which defeated the point. Here the element's box IS the
     visible image (height:100%, width proportional), so the mask's 0%/100%
     line up with its true left/right edges every time. */
  /* auto/auto + max-width/max-height (not a fixed height:100%) so the used
     size is whichever dimension is actually the binding constraint against
     the image's own intrinsic ratio — height on the wide desktop box
     (unchanged from before), but width on mobile's much-less-wide box
     (.hero-bg's mobile media query below), where a fixed height:100% used
     to force the width to be capped without a matching height reduction,
     stretching/distorting the image instead of letterboxing it. */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}

.hero-slider-dots button.active {
  background: #fff;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap (not per-child margins) so the title/subtitle/CTA are always
     evenly spaced regardless of which of them are actually present —
     e.g. papirdoboz has no subtitle, so title+CTA would otherwise collide
     with zero margin between them. */
  gap: 18px;
  text-align: center;
  width: 100%;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.hero-content.hero-content-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Set on the container (render_hero_block()) whenever there's no title/
   subtitle, only a CTA — anchors it near the bottom of the hero box
   instead of dead center, so a lone button doesn't float in the middle of
   a large photo. */
.hero-content.hero-content-cta-only {
  top: auto;
  bottom: 40px;
  transform: translateX(-50%);
}

.hero h1 {
  /* fit-content (not inline-block): the box still hugs its own text width,
     but stays a flex item in .hero-content so title/subtitle/CTA stack
     vertically (spacing handled by .hero-content's gap) instead of
     flowing side by side. */
  width: fit-content;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: var(--heading-font-weight, 900);
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  line-height: 1.3;
  letter-spacing: var(--heading-letter-spacing, 1px);
  background: #fff;
  padding: 14px 34px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  width: fit-content;
  color: #fff;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.75);
  padding: 10px 26px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta-card {
  display: block;
  width: fit-content;
  background: var(--brand-gradient, var(--color-accent));
  border: 2px solid var(--color-accent);
  padding: 12px 30px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s;
}

.hero-cta-card:hover {
  background: #fff;
  color: var(--color-accent);
}

/* --- About Section (Rólunk) --- */
.about {
  background: #fff;
  padding: 60px 0;
  color: #252525;
}

.about .container {
  max-width: 900px;
}

.about h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 25px;
  color: var(--color-dark);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 15px;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gradient, var(--color-accent));
}

.about p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 15px;
  text-align: justify;
  color: #444;
}

.about-features {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f7f7f7;
  border-left: 3px solid var(--color-accent);
  padding: 15px 18px;
  border-radius: 4px;
}

.about-feature-item i {
  font-size: 20px;
  color: var(--color-accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.about-feature-item span {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* --- Environment Section --- */
.environment {
  padding: 50px 0;
  background: #f7f7f7;
}

.environment .container {
  max-width: 900px;
}

.environment h2 {
  text-align: center;
  font-size: 26px;
  color: var(--color-dark);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.environment p {
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  color: #444;
}

/* --- Services Section --- */
.services {
  padding: 60px 0;
  background: #fff;
}

.services h2 {
  text-align: center;
  font-size: 30px;
  color: var(--color-dark);
  margin-bottom: 40px;
  text-transform: uppercase;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}

.service-row.reverse {
  grid-template-columns: 1.3fr 1fr;
}

.service-row.reverse .service-image {
  order: 2;
}

.service-image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.service-text h3 {
  font-size: 20px;
  color: var(--color-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-text h3 i {
  color: var(--color-accent);
  font-size: 18px;
}

.service-text p {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 10px;
  text-align: justify;
}

.service-list {
  margin-top: 8px;
  padding-left: 4px;
}

.service-list li {
  font-size: 14px;
  color: #444;
  padding: 4px 0 4px 22px;
  position: relative;
}

.service-list li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* --- Parameters Section --- */
.parameters {
  padding: 60px 0;
  background: linear-gradient(45deg, #e9e9e9 0%, #fafafa 100%);
}

.parameters h2 {
  font-size: 26px;
  color: var(--color-dark);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.pdf-button {
  margin-bottom: 25px;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-gradient, var(--color-accent));
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-pdf:hover {
  opacity: 0.85;
}

.parameters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.parameters-grid p {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 14px;
}

.parameters-grid strong {
  color: var(--color-dark);
}

.parameters-videos {
  margin-top: 40px;
}

.parameters-videos h3 {
  font-size: 20px;
  color: var(--color-dark);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.video-grid.cols-1 {
  grid-template-columns: 1fr;
}

.video-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.video-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.video-item {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.video-item iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- References Section --- */
.references {
  padding: 60px 0 80px;
  background: linear-gradient(45deg, #e9e9e9 0%, #fafafa 100%);
}

.references h2 {
  text-align: center;
  font-size: 30px;
  color: var(--color-dark);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.references .ref-intro {
  text-align: center;
  font-size: 14px;
  color: #555;
  margin-bottom: 35px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.ref-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.ref-item {
  text-align: center;
  transition: transform 0.3s;
}

.ref-item:hover {
  transform: translateY(-5px);
}

.ref-img-wrapper {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin-bottom: 10px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.ref-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.ref-item .ref-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent) 0%, #c81e22 100%);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 20px;
}

/* --- Footer --- */
.footer {
  background: #171717;
  color: #ccc;
  padding: 50px 0 30px;
}

.footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-map a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s;
}

.footer-map a:hover {
  opacity: 0.85;
}

.footer-map img {
  width: 100%;
  height: auto;
}

.footer h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 20px;
}

.footer-info p {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Tinted (mixed with white) rather than the raw accent: on the near-black
   footer background, a site's raw accent color can be too dark to read
   (e.g. papirdoboz's purple) — a lighter tint keeps it on-brand while
   staying legible for every site's accent, and hover lightens further
   instead of reverting to the (possibly low-contrast) raw accent. */
.footer-info a {
  color: color-mix(in srgb, var(--color-accent) 55%, #fff);
}

.footer-info a:hover {
  color: color-mix(in srgb, var(--color-accent) 25%, #fff);
}

.footer-info .company-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.footer-info .label-text {
  color: color-mix(in srgb, var(--color-accent) 55%, #fff);
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 2px;
  font-size: 13px;
  text-transform: uppercase;
}

.footer-info .opening-title {
  font-size: 18px;
  margin-top: 24px;
}

/* --- Contact Form --- */
.contact-form label {
  display: block;
  color: #999;
  font-size: 13px;
  margin-bottom: 5px;
}

.contact-form .form-group {
  margin-bottom: 15px;
}

.contact-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .form-group-checkbox label {
  display: block;
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.contact-form .form-group-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0 6px 0 0;
  vertical-align: middle;
  accent-color: var(--color-accent);
}

.contact-form .form-group-checkbox a {
  color: var(--color-accent);
}

.form-flash {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.form-flash-success {
  background: rgba(40, 167, 69, 0.15);
  color: #2fbf58;
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.form-flash-error {
  background: rgba(234, 42, 46, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(234, 42, 46, 0.4);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 5px;
  color: #fff;
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #888;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form .btn-submit {
  display: inline-block;
  padding: 12px 35px;
  background: var(--brand-gradient, var(--color-accent));
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Noto Sans', sans-serif;
}

.contact-form .btn-submit:hover {
  opacity: 0.85;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid #333;
  font-size: 13px;
  color: #777;
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: rgba(234, 42, 46, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scroll-top:hover {
  background: #c81e22;
}

.scroll-top.visible {
  display: flex;
}

/* --- Cookie consent banner (Google Consent Mode — only rendered on
   sites with a Google tag configured, see includes/layout-bottom.php) --- */
/* An author rule's `display` always beats the UA stylesheet's own
   `[hidden] { display: none }` at equal specificity, so without this
   explicit override toggling the `hidden` IDL property (app.js) would do
   nothing visually — the banner would stay on screen forever. */
.cookie-consent[hidden] {
  display: none;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: #231e1f;
  color: #fff;
  padding: 18px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.cookie-consent p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 640px;
}

.cookie-consent a {
  color: inherit;
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-consent-actions .btn-submit {
  padding: 10px 24px;
}

.cookie-consent-reject {
  padding: 10px 24px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s;
  font-family: 'Noto Sans', sans-serif;
}

.cookie-consent-reject:hover {
  opacity: 0.75;
}

@media (max-width: 600px) {
  .cookie-consent {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-consent-actions {
    justify-content: center;
  }
}

/* --- SPA Navigation Active States --- */
.section {
  scroll-margin-top: 80px;
}

/* --- Generic Richtext Block (CMS-driven sections: Rólunk, Környezetvédelem, Paraméterek, ...) --- */
.richtext-block {
  background: #fff;
  padding: 30px 0;
  /* --richtext-text-color is only ever set (to var(--color-accent)) for
     papirdoboz's site-specific override in layout-top.php — every other
     site falls back to this rule's own original color, unaffected. */
  color: var(--richtext-text-color, #252525);
}

.richtext-block .container {
  max-width: 900px;
}

.richtext-block.richtext-alt {
  background: #f7f7f7;
}

.richtext-block h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 25px;
  color: var(--richtext-text-color, var(--color-dark));
  text-transform: var(--heading-text-transform);
  letter-spacing: var(--heading-letter-spacing, normal);
  position: relative;
  padding-bottom: 15px;
}

.richtext-block h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gradient, var(--color-accent));
}

.richtext-body p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 15px;
  text-align: justify;
  color: var(--richtext-text-color, #444);
}

.richtext-body ul {
  list-style: disc;
  margin: 0 0 15px 20px;
  color: var(--richtext-text-color, #444);
}

.richtext-block.richtext-has-extra {
  background: linear-gradient(45deg, #e9e9e9 0%, #fafafa 100%);
}

.richtext-block.richtext-has-extra .container {
  max-width: 1200px;
}

.richtext-block.richtext-has-extra h2 {
  text-align: left;
  font-size: 26px;
}

.richtext-block.richtext-has-extra h2::after {
  display: none;
}

/* Each column is its own admin-edited box (see render_richtext_block()),
   laid out in a grid — not a single field auto-broken by CSS column-count,
   so paragraphs never get split awkwardly mid-flow. */
.richtext-columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.richtext-columns-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 30px;
}

.richtext-columns-2 .richtext-body-col p,
.richtext-columns-3 .richtext-body-col p {
  font-size: 14px;
}

.richtext-subtitle {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.btn-tovabb {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 32px;
  background: var(--brand-gradient, var(--color-accent));
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: opacity 0.3s;
}

.btn-tovabb:hover {
  opacity: 0.85;
}

/* --- Generic CTA block (heading/subtitle + one button) --- */
.cta-block {
  background: linear-gradient(45deg, #e9e9e9 0%, #fafafa 100%);
  padding: 30px 0;
  text-align: center;
}

.cta-block h2 {
  font-size: 28px;
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  letter-spacing: var(--heading-letter-spacing, normal);
  margin-bottom: 10px;
}

.cta-block .cta-subtitle {
  color: #444;
  max-width: 600px;
  margin: 0 auto 20px;
}

.cta-block .btn-tovabb {
  margin-top: 15px;
}

/* Optional single side-image on a richtext block (e.g. "Rólunk" with a photo). */
.richtext-block.richtext-has-image .richtext-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

.richtext-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (min-width: 769px) {
  .richtext-block.richtext-has-image .richtext-layout {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  .richtext-block.richtext-has-image .richtext-subtitle,
  .richtext-block.richtext-has-image h2 {
    text-align: left;
  }

  .richtext-block.richtext-has-image h2::after {
    left: 0;
    transform: none;
  }
}

/* --- Generic Item Grid (Szolgáltatások / Referenciák / any future collection) --- */
.item-grid-section {
  background: #fff;
  padding: 30px 0;
}

.item-grid-section h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 25px;
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  letter-spacing: var(--heading-letter-spacing, normal);
  position: relative;
  padding-bottom: 15px;
}

.item-grid-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gradient, var(--color-accent));
}

.item-grid-section .ref-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 30px;
  color: #444;
}

/* --- Generic Video Grid (YouTube videos in a configurable N-column grid) --- */
.video-grid-section {
  background: #fff;
  padding: 30px 0;
}

.video-grid-section h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 25px;
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  letter-spacing: var(--heading-letter-spacing, normal);
  position: relative;
  padding-bottom: 15px;
}

.video-grid-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gradient, var(--color-accent));
}

.video-grid-section .ref-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 30px;
  color: #444;
}

.video-grid-section .video-grid {
  margin-top: 30px;
}

/* --- Generic Gallery (tile grid of images, configurable N columns) --- */
.gallery-section {
  background: #fff;
  padding: 30px 0;
}

.gallery-section h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 25px;
  color: var(--color-dark);
  text-transform: var(--heading-text-transform);
  letter-spacing: var(--heading-letter-spacing, normal);
  position: relative;
  padding-bottom: 15px;
}

.gallery-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gradient, var(--color-accent));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-grid.cols-1 {
  grid-template-columns: 1fr;
}

.gallery-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.gallery-tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  background: #fff;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  /* <button> doesn't inherit the page font from the user-agent stylesheet
     like a plain <div>/<a> would (unlike .grid-item, which is an <a> and
     inherits Noto Sans/Domine from body for free) — without this the
     caption fell back to the browser's default UI font instead of
     matching the rest of the site. */
  font-family: inherit;
}

.gallery-image-wrapper {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.gallery-caption {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--color-dark);
  /* See .grid-item-body's matching comment — same papirdoboz-only
     mint-green override, same variable, shared meaning for both grid
     types' captions. */
  background: var(--grid-caption-bg, transparent);
}

.gallery-tile:hover .gallery-image {
  transform: scale(1.05);
}

/* Branaldi wants its gallery tiles to look like item_grid's own cards
   (.grid-item/.grid-item-body h3 above) instead of the plainer default
   gallery look — same rounded-card-with-shadow-and-lift treatment and the
   same caption typography, scoped to this one site via the body class
   (layout-top.php) rather than a CSS variable, since what differs here is
   whole rule sets — border-radius/shadow/hover — not just a couple of
   values. */
body.site-branaldi .gallery-tile {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

body.site-branaldi .gallery-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

body.site-branaldi .gallery-caption {
  padding: 18px 20px;
  font-size: 17px;
  /* Matching .grid-item-body h3's actual font, not a hardcoded guess: it's
     an <h3> so it gets the universal h1-h6 rule (font-family/font-weight
     var(--font-heading)/var(--heading-font-weight)) — Domine at weight 500
     on branaldi, not the page body font or a plain bold 700. */
  font-family: var(--font-heading);
  font-weight: var(--heading-font-weight, 700);
  text-align: left;
  background: transparent;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.lightbox.lightbox-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  padding: 5px 10px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 50%;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Hidden instead of just non-functional when the opened gallery only has
   one image — nothing to navigate to (app.js toggles this). */
.lightbox-nav.lightbox-nav-hidden {
  display: none;
}

@media (max-width: 600px) {
  .lightbox-nav {
    font-size: 16px;
    padding: 10px 13px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.grid-item {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  color: inherit;
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.grid-item-img-wrapper {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

.grid-item-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.grid-item-body {
  padding: 18px 20px;
  /* --grid-caption-bg is only set (to the exact mint-green sampled from the
     cropped-off product-name banners — see migrations/2026_08_04_termekeink_
     grid_image_crop.sql) for papirdoboz, so the caption reads the same as
     the old baked-in banner without the text actually being part of the
     image anymore. Every other site falls back to transparent (i.e. the
     card's own white background), unchanged. */
  background: var(--grid-caption-bg, transparent);
}

.grid-item-body h3 {
  font-size: 17px;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.grid-item-body h3 i {
  color: var(--color-accent);
  margin-right: 6px;
}

.grid-item-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .service-row,
  .service-row.reverse {
    grid-template-columns: 1fr;
  }

  .service-row.reverse .service-image {
    order: 0;
  }

  .parameters-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .video-grid,
  .video-grid.cols-1,
  .video-grid.cols-3,
  .video-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .ref-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .richtext-columns-2,
  .richtext-columns-3 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer .container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    z-index: 999;
  }

  .navbar-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero-bg {
    /* Desktop's 1920:400 (4.8:1) box would be far too short on a phone-width
       viewport to leave room for the boxed title/subtitle/CTA stack — but a
       FIXED height (previously 420px here) fights the hero images' own wide
       aspect ratio: since .hero-slide is now sized by its true intrinsic
       ratio (see .hero-slide's width/height: auto + max-width/max-height),
       a tall-but-narrow box just letterboxes a wide image into a thin strip
       with large empty top/bottom bands instead. A less extreme (but still
       width-driven) ratio keeps the box proportional to the viewport at any
       phone width, and max-height caps it once a tablet-width viewport would
       otherwise make it taller than actually needed for the text stack. */
    aspect-ratio: 3 / 2;
    height: auto;
    max-height: 320px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .ref-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .item-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .top-bar-hours {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 20px;
  }

  .hero-cta-card {
    padding: 10px 22px;
    font-size: 13px;
  }

  .ref-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .item-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .ref-item .ref-label {
    font-size: 10px;
    padding: 4px 10px;
  }
}
