/* ===== Alap színek és változók ===== */
:root{
  --primary-red: #FF3131;
  --primary-green: #00B050;
  --primary-yellow: #FEEC02;
  --primary-black: #000000;
  --primary-white: #ffffff;
  --inverted-red: #002761;
  --primary: #FF3131;
  --dark:#111;
  --gray:#666;
  --light:#f4f6f8;
  --header-h:72px;
}

body{
  font-family: Arial, Helvetica, sans-serif;
  color:var(--dark);
  background:#fff;
  line-height:1.6;
  padding-top: var(--header-h);
}

/* ===== Header ===== */
.main-header {
  position:fixed; top:0; left:0; right:0;
  min-height:var(--header-h);
  background:#fff;
  border-bottom:1px solid var(--light);
  z-index:1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.main-header .navbar {
  padding: 0;
}
.main-header .navbar-brand {
  font-size: 1.2rem;
  color: var(--dark);
}
.main-header .nav-link {
  color: var(--dark);
  font-weight: 500;
  font-size: 1.08rem;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 6px;
}

/* ===== Aktív állapot: egyedi színek menüpontonként ===== */
.main-header .nav-link.nav-termek.active {
  background: var(--primary); /* piros */
  color: #fff;
}
.main-header .nav-link.nav-rolunk.active {
  background: var(--primary-green); /* zöld */
  color: #fff;
}
.main-header .nav-link.nav-csapat.active {
  background: var(--primary-yellow); /* sárga */
  color: var(--primary-black);
}
.main-header .nav-link.nav-kapcsolat.active {
  background: var(--primary-black); /* fekete */
  color: var(--primary-white);
}

/* ===== Hover állapot: piros háttér, fehér szöveg (de NEM aktív linkeknél) ===== */
.main-header .nav-link:not(.active):hover {
  color: #fff;
  background: var(--primary);
  text-decoration: none;
}

/* Ensure contrast for small screens when nav becomes stacked */
@media (max-width: 991px) {
  .main-header .nav-link.nav-csapat:hover, .main-header .nav-link.nav-csapat.active {
    color: #000;
  }
}
.main-header .navbar-toggler {
  border-color: var(--primary);
  padding: 4px 8px;
}
.main-header .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 49, 49, 0.25);
}
.main-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 49, 49, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
  .main-header .navbar-collapse {
    background: #fff;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--light);
  }
  .main-header .nav-item {
    margin-bottom: 0.5rem;
  }
  .main-header .dropdown-menu {
    position: static !important;
    transform: none !important;
    margin-top: 0.5rem;
  }
}

/* ===== Nyelvi választó ===== */
.dropdown-toggle {
  border: 1px solid var(--gray);
  color: var(--dark);
  font-weight: 500;
  transition: all 0.2s ease;
}
.dropdown-toggle:hover, .dropdown-toggle:focus {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(255, 49, 49, 0.15);
}
.dropdown-menu {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 120px;
}
.dropdown-item {
  padding: 8px 16px;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}
.dropdown-item:hover {
  background-color: var(--light);
  color: var(--dark);
}
.dropdown-item.active {
  background-color: var(--primary);
  color: white;
}
.dropdown-item.active:hover {
  background-color: #cc0000;
  color: white;
}

/* ===== Szekciók ===== */
section.section{
  padding: 80px 16px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.section-title{
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 110px;
  text-align:center;
}

/* Utility: shift a centered heading slightly to the right */
.shift-right {
  display: inline-block; /* preserve intrinsic width so transform offsets it */
  transform: translateX(36px); /* change this value to move more/less */
  transition: transform 150ms ease-in-out;
}

@media (max-width: 576px) {
  .shift-right { transform: translateX(0); }
}

/* Product page logo above the title */
.product-page-logo {
  display: block;
  text-align: center;
  margin-bottom: 40px;
}
.product-page-logo img {
  display: inline-block;
  width: 65px; /* default visual size */
  max-width: 28vw;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .product-page-logo img {
    width: 110px;
    max-width: 34vw;
  }
}
.section-lead{
  color:var(--gray);
  max-width:700px;
  margin: 0 auto 10px;
  text-align:center;
}

/* ===== TERMÉK GRID ===== */
.product-card {
  position: relative;
  border-radius: 16px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.product-card .card-body {
  min-height: 280px;
}

/* Focus style when the hidden stretched link (inside the card) receives focus */
.product-card:focus-within {
  outline: 3px solid rgba(255,49,49,0.18);
  outline-offset: 4px;
}

/* Ensure the stretched link itself does not show an extra outline */
.product-card .stretched-link:focus {
  outline: none;
}
.product-card .mb-2 {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card h5 {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .text-muted {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-section-header {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  padding: 10px 18px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 28px;
}

/* ===== Csapat (removed) ===== */

/* ===== Csapat (team cards) ===== */
#csapat .row {
  align-items: stretch;
}
.team-card {
  border-radius: 16px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.team-card .mb-3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-card .mb-3 img {
  filter: grayscale(100%);
  border: 4px solid transparent;
  transition: filter 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  display: block;
  width: 160px !important;
  height: 160px !important;
  object-fit: cover;
  object-position: center 10%;
}
.team-card:hover .mb-3 img {
  filter: none;
  border-color: var(--primary-yellow);
  transform: scale(1.02);
}
.team-card h5 {
  margin-bottom: 0.25rem;
  min-height: 1.5rem;
  text-align: center !important;
}
.team-card .text-muted {
  margin-bottom: 0.75rem;
  min-height: 1.25rem;
  text-align: center !important;
}
.team-card .text-muted.small {
  text-align: center !important;
}
.team-card p.small {
  text-align: justify;
  margin-bottom: 0;
}

/* ===== Kapcsolat ===== */
.btn-primary{
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #cc0000;
  --bs-btn-hover-border-color: #cc0000;
}
.form-control:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(255,49,49,.15);
}

/* ===== Footer ===== */
footer{
  background:var(--dark);
  color:#fff;
  padding:28px 0;
  text-align:center;
}

footer .d-flex a {
  white-space: nowrap;
}

/* Footer mobil nézet */
@media (max-width: 768px) {
  footer .d-flex {
    flex-direction: column;
    gap: 12px !important;
  }
  footer .d-flex span {
    display: none;
  }
  footer .d-flex a {
    font-size: 0.9rem;
  }
}

/* Footer közepes képernyő */
@media (min-width: 769px) and (max-width: 1200px) {
  footer .d-flex {
    gap: 8px !important;
  }
  footer .d-flex a {
    font-size: 0.75rem;
  }
  footer .d-flex span {
    font-size: 0.75rem;
  }
}

/* ===== Social ===== */
.social-media{
  position:fixed; right:16px; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:8px; z-index:1050;
}
.social-media a{
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:20px;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
  transition: transform .15s;
  margin-bottom: 2px;
  border: none;
  outline: none;
}
.social-media a:hover{ transform: scale(1.12); }
.yt{ background:#ff0000; }
.in{ background:#0077b5; }
.fb{ background:#1877f2; }

/* Team card: small LinkedIn icon (inline, not a button) */
.team-card .linkedin-icon {
  color: #0A66C2; /* LinkedIn blue */
  font-size: 1rem;
  vertical-align: middle;
}
.team-card .linkedin-icon:hover {
  color: var(--primary-green);
  text-decoration: none;
}

/* Product detail logos: match homepage tile proportions */
.product-logo {
  max-width: 80px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Homepage tile logos: remove rounding so small logos render square */
.tile-logo {
  border-radius: 0;
}

/* ===== Product Gallery ===== */
.product-thumbnails-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

/* Allow flex children to shrink properly so thumbnails don't force main column narrow */
.flex-grow-1 { min-width: 0; }

.thumbnail-item {
  width: clamp(56px, 9vw, 80px);
  height: clamp(56px, 9vw, 80px);
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
}

/* make thumbnail positioned so overlay can center */
.thumbnail-item { position: relative; }

.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f3f3f3 0%, #e9e9e9 100%);
  display: block;
}

.thumbnail-item:hover {
  border-color: var(--primary);
  opacity: 1;
}

.thumbnail-item.active {
  border-color: var(--primary);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 49, 49, 0.2);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0;
}

.thumbnail-item i {
  font-size: 32px;
  color: var(--primary);
}

/* Play overlay centered on thumbnail (visible whether poster exists or not) */
.thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* allow clicks to pass to the thumbnail */
}
.thumb-play .fa-play-circle {
  background: rgba(255,255,255,0.96);
  border-radius: 50%;
  padding: 6px;
  font-size: 22px;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-main-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.product-main-media img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  display: block;
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.product-main-media video {
  width: 100%;
  height: auto;
  min-height: 300px;
  max-height: 70vh;
  display: block;
  transition: opacity 0.3s ease;
  object-fit: contain;
}

.product-details {
  padding-left: 20px;
}

@media (max-width: 768px) {
  .d-flex.gap-3 {
    flex-direction: column !important;
  }
  
  .product-thumbnails-vertical {
    flex-direction: row;
    overflow-x: auto;
    margin-bottom: 15px;
    width: 100%;
    max-width: 100%;
    padding-bottom: 6px;
    max-height: none !important;
    order: 2;
  }
  
  .product-thumbnails-vertical .thumbnail-item { 
    flex: 0 0 auto; 
    margin-right: 8px;
    width: 70px;
    height: 70px;
  }
  
  .flex-grow-1 {
    order: 1;
  }

  .product-details {
    padding-left: 0;
    margin-top: 20px;
  }
  
  .product-main-media {
    min-height: 250px;
    max-height: 50vh;
  }
  
  .product-main-media img {
    max-height: 50vh;
  }
  
  .product-main-media video {
    min-height: 250px;
    max-height: 50vh;
  }
}

/* ===== Cookie Consent Banner ===== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 20px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  border-top: 3px solid var(--primary);
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 280px;
}

.cookie-consent-text p {
  margin: 0;
  color: var(--dark);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-consent-buttons .btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-consent-buttons .btn-primary {
  background: var(--primary);
  color: white;
}

.cookie-consent-buttons .btn-primary:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 49, 49, 0.3);
}

.cookie-consent-buttons .btn-secondary {
  background: #f5f5f5;
  color: var(--dark);
  border: 1px solid #ddd;
}

.cookie-consent-buttons .btn-secondary:hover {
  background: #e0e0e0;
}

/* Reszponzív */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent-buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-consent-buttons .btn {
    flex: 1;
    min-width: 120px;
  }
}

/* Rólunk (landing): rövidített, egybekezdéses leírások az alfejezeteknél */
#rolunk .col-md-6 p {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* két sorra korlátozva */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}
@media (max-width: 767px) {
  #rolunk .col-md-6 p {
    -webkit-line-clamp: 3; /* mobilon 3 sor megengedett */
  }
}

/* Rólunk: bal oldali logó és jobb oldali 3x2 rács */
#rolunk .about-wrapper {
  max-width: 1100px;
}
#rolunk.section {
  /* Try to fit the entire About section into one viewport */
  padding: 28px 16px;
  min-height: calc(100vh - var(--header-h));
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
#rolunk .about-header {
  margin-left: 220px; /* align the header with the right column (logo reduced) */
  margin-bottom: 12px;
  text-align: left;
}
#rolunk .about-header .about-subtitle {
  color: var(--dark);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 6px;
}
#rolunk .about-row {
  display: flex;
  gap: 18px;
  align-items: center;
}
#rolunk .about-logo {
  /* reduce left logo so right content can fit vertically */
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 200px;
}
#rolunk .about-logo img {
  max-width: 180px;
  height: auto;
  opacity: 0.95;
  border-radius: 0; /* ne legyen kör alakú */
  background: transparent; /* eltávolítjuk a fehér 'kártyát' */
  padding: 0; /* nincs belső tér */
  box-shadow: none; /* nincs árnyék/kártya hatás */
}
#rolunk .about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 oszlop, 3 sorra törik */
  gap: 16px;
  width: 100%;
}
#rolunk .about-item h4 {
  color: var(--dark); /* Rólunk: fekete helyett zöld helyett legyen fekete */
  font-weight: 600;
  margin-bottom: 0.5rem;
}
#rolunk .about-item p {
  margin: 0;
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.28;
}

/* Override the large section title spacing only for Rólunk */
#rolunk .section-title {
  margin-bottom: 18px;
}

/* If content still overflows on smaller desktop heights, allow a compact variant */
@media (max-height: 800px) and (min-width: 992px) {
  #rolunk.section { padding: 18px 12px; }
  #rolunk .about-header { margin-left: 200px; }
  #rolunk .about-logo { flex: 0 0 170px; min-height: 170px; }
  #rolunk .about-logo img { max-width: 150px; }
  #rolunk .about-grid { gap: 12px; }
  #rolunk .about-item p { font-size: 0.88rem; }
}

@media (max-width: 768px) {
  #rolunk .about-row {
    flex-direction: column;
  }
  #rolunk .about-logo {
    flex: 0 0 auto;
    min-height: auto;
    margin-bottom: 18px;
  }
  /* On small screens place the header centered above everything */
  #rolunk .about-header {
    margin-left: 0;
    text-align: center;
  }
  /* mobil: egy oszlop lesz kisebb képernyőn */
  #rolunk .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  #rolunk .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Kapcsolat: desktopon ne törjön több sorba a rövid leírás; állítsuk a konténer szélességét nagyobb képernyőn */
@media (min-width: 992px) {
  #kapcsolat .container.text-center {
    max-width: 900px; /* több hely a szövegnek egy sorban */
  }
  /* Make the contact description single-line on larger screens */
  #kapcsolat .container.text-center .contact-description {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
}

/* On small screens allow normal wrapping so content doesn't overflow */
@media (max-width: 991px) {
  #kapcsolat .container.text-center .contact-description {
    white-space: normal;
  }
}

/* ===== Innovation Diagram ===== */
.innovation-diagram-wrapper {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

.innovation-diagram {
  flex: 1;
  max-width: 720px;
  width: 100%;
  height: auto;
  display: block;
}

/* Fix diagram height on larger screens to avoid layout jumps when details change */
@media (min-width: 769px) {
  .innovation-diagram {
    height: 520px; /* fixed drawing area */
    max-height: 520px;
  }
  .innovation-diagram-wrapper {
    align-items: flex-start; /* ensure top alignment between diagram and details */
  }
  .product-details .product-desc {
    /* allow the detail area to size naturally; wrapper min-height will prevent jumps */
    box-sizing: border-box;
    height: auto;
    overflow: visible;
    padding-right: 18px;
  }
  /* Slightly reduce font-size and tighten line-height to avoid scrolling */
  .product-details .product-desc {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .product-details .product-desc .detail-title,
  .product-details .product-desc h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .product-details .product-desc h4 {
    font-size: 1rem;
    margin-top: 10px;
    margin-bottom: 6px;
  }
}

.innovation-text-list {
  display: none; /* removed: titles shown only on hover in right detail area */
}

.innovation-text-item {
  padding: 12px 16px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.innovation-text-item:hover,
.innovation-text-item.active {
  opacity: 1;
  border-left-color: var(--primary);
  background: rgba(255, 49, 49, 0.05);
}

.innovation-text-item strong {
  color: var(--dark);
  font-size: 0.95rem;
}

/* Right-side detail area used for innovation_diagram */
.product-details .product-desc {
  min-height: 260px;
  padding: 8px 18px;
  transition: opacity 220ms ease, transform 220ms ease;
  /* Show default product description by default */
  opacity: 1;
  position: relative;
}
.product-details .product-desc.show-detail {
  /* keep visible when a node detail is active */
  opacity: 1;
}
.product-details .product-desc .detail-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}
.product-details .product-desc .detail-text {
  color: var(--gray);
  line-height: 1.5;
}

/* Locked (persistent) state styling */
.product-details .product-desc.locked {
  border-left: 4px solid rgba(255,49,49,0.12);
  padding-right: 40px; /* room for close button */
}
.product-details .product-desc .detail-close {
  position: absolute;
  right: 18px;
  top: 12px;
  background: transparent;
  border: none;
  color: var(--gray);
  font-size: 1.15rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}
.product-details .product-desc .detail-close:hover,
.product-details .product-desc .detail-close:focus {
  color: var(--primary);
  transform: scale(1.05);
  outline: none;
}

/* Ensure containers allow absolute close button positioning */
.product-details { position: relative; }

/* SVG diagram styles */
.diagram-node {
  cursor: pointer;
  transition: all 0.3s ease;
}

.diagram-node circle {
  transition: all 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.diagram-node.active circle,
.diagram-node:hover circle {
  fill: var(--primary);
  filter: drop-shadow(0 4px 12px rgba(255, 49, 49, 0.4));
  transform: scale(1.1);
  transform-origin: center;
}

.diagram-node.center-node circle {
  filter: drop-shadow(0 6px 18px rgba(255, 49, 49, 0.3));
}

/* Pulse animation for a highlighted node */
@keyframes pulse-zoom {
  0% { transform: scale(1); filter: drop-shadow(0 6px 12px rgba(255,49,49,0.12)); }
  50% { transform: scale(1.16); filter: drop-shadow(0 10px 24px rgba(255,49,49,0.28)); }
  100% { transform: scale(1); filter: drop-shadow(0 6px 12px rgba(255,49,49,0.12)); }
}

/* Target nodes marked with data-pulse="true" or managed via JS with .is-pulsing */
.diagram-node[data-pulse="true"] circle,
.diagram-node.is-pulsing circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-zoom 1.7s ease-in-out infinite;
}

/* Pause pulse when node is hovered or becomes active/selected */
.diagram-node[data-pulse="true"].active circle,
.diagram-node[data-pulse="true"]:hover circle,
.diagram-node.is-pulsing.active circle,
.diagram-node.is-pulsing:hover circle {
  animation-play-state: paused;
  transform: scale(1.12);
  filter: drop-shadow(0 8px 20px rgba(255,49,49,0.34));
}

.diagram-line {
  transition: all 0.3s ease;
  opacity: 0.4;
}

.diagram-line.active {
  stroke-width: 3;
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(255, 49, 49, 0.3));
}

/* Diagram labels positioned above dashed lines */
.diagram-label-word {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  fill: #222;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
  transition: all 0.3s ease;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Make labels slightly more prominent when their node is active */
.diagram-node.active ~ .diagram-label-group .diagram-label-word {
  fill: var(--primary);
  font-weight: 700;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 5px;
}

/* Detail bubble shown near node on hover */
.diagram-bubble {
  position: absolute;
  pointer-events: none;
  max-width: 260px;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
  transform: translate(-50%, -120%) scale(0.9);
  opacity: 0;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease-in-out;
  z-index: 1500;
  font-size: 0.94rem;
  color: var(--dark);
}
.diagram-bubble.show {
  opacity: 1;
  transform: translate(-50%, -140%) scale(1);
}
.diagram-bubble:after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transform-origin: center;
  transform: translateX(-50%) rotate(45deg);
}

/* Responsive */
@media (max-width: 768px) {
  .innovation-diagram-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .innovation-text-list {
    flex: 1;
    width: 100%;
  }
  
  .innovation-diagram {
    max-width: 100%;
  }

  /* On small screens keep natural height but reduce font slightly to fit better */
  .product-details .product-desc {
    box-sizing: border-box;
    overflow: visible !important;
    padding-right: 12px;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }
  .product-details .product-desc .detail-title,
  .product-details .product-desc h3 {
    font-size: 1.05rem !important;
  }
  .product-details .product-desc h4 {
    font-size: 0.98rem !important;
  }
}

/* ===== Training accordion styling (product: oktatas) ===== */
.training-accordion .accordion-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  border: 1px solid #eef3f6;
  overflow: hidden;
}
.training-accordion .accordion-item + .accordion-item {
  margin-top: 12px;
}
.training-accordion .accordion-button {
  background: transparent;
  border: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--dark);
}
.training-accordion .training-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 115, 230, 0.04);
  color: var(--primary);
  flex: 0 0 44px;
}
.training-accordion .accordion-body {
  background: #fff;
  padding: 16px;
  color: var(--gray);
  line-height: 1.6;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.training-accordion .accordion-button:not(.collapsed) {
  background: #fff;
}

@media (max-width: 768px) {
  .training-accordion .training-icon { width: 38px; height: 38px; flex: 0 0 38px; }
  .training-accordion .accordion-button { padding: 12px 10px; }
}

/* ===== Fix: remove persistent blue focus/line after clicking accordion ===== */
.training-accordion .accordion-button:focus,
.training-accordion .accordion-button:active,
.training-accordion .accordion-button:focus-visible {
  box-shadow: none !important;
  outline: none !important;
}

/* Keep an accessible but subtle focus ring when keyboard-navigating */
.training-accordion .accordion-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(0,123,255,0.08) !important;
}

/* Ensure collapsed/expanded button doesn't draw an extra border-line */
.training-accordion .accordion-button:not(.collapsed) {
  border-color: transparent !important;
}

.training-accordion .accordion-collapse {
  border: none !important;
}

/* Coming / Soon hero - position helpers */
.coming-hero {
  display: flex;
  flex-direction: column;
  align-items: center; /* center by default */
  justify-content: center;
  gap: 12px;
  padding: 40px 0;
  min-height: 50vh; /* függőleges centerezéshez biztosítunk magasságot */
}
.coming-hero .coming-top {
  margin: 0;
  font-size: 0.95rem;
  color: var(--dark);
  text-transform: none;
}
.coming-hero .coming-img {
  max-width: 220px;
  height: auto;
  opacity: 0.9;
}
.coming-hero .coming-bottom {
  margin: 0;
  font-size: 0.95rem;
  color: var(--dark);
  font-weight: 600;
}

/* Position modifiers: add .align-left or .align-right to the .coming-hero div in the template */
.coming-hero.align-left { align-items: flex-start; text-align: left; padding-left: 20px; }
.coming-hero.align-right { align-items: flex-end; text-align: right; padding-right: 20px; }

@media (max-width: 768px) {
  .coming-hero { padding: 28px 12px; }
  .coming-hero .coming-img { max-width: 180px; }
}

/* Horizontal layout for COMING - logo - SOON */
.coming-hero.horizontal {
  flex-direction: row; /* row layout */
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: auto; /* ne vegyen túl nagy vertikális helyet */
  padding: 40px 0 24px 0;
}
.coming-hero.horizontal .coming-top,
.coming-hero.horizontal .coming-bottom {
  white-space: nowrap;
  margin: 0;
  /* Make font size proportional and responsive to viewport and image size */
  font-size: clamp(0.95rem, 1.2vw + 0.6rem, 1.15rem);
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
  line-height: 1;
}

/* fallback for vertical layout: keep sizes consistent */
.coming-hero .coming-top,
.coming-hero .coming-bottom {
  font-size: clamp(0.9rem, 1.1vw + 0.6rem, 1.05rem);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--dark);
}
.coming-hero.horizontal .coming-img {
  max-width: 220px;
}

@media (max-width: 992px) {
  /* kisebb képernyőn visszaosztunk oszlopra */
  .coming-hero.horizontal {
    flex-direction: column;
    min-height: 40vh;
    padding: 28px 12px;
  }
  .coming-hero.horizontal .coming-img { max-width: 180px; }
}
