/* ── FONTS ── */
@font-face {
  font-family: 'Verlag';
  src: url('/fonts/Verlag-Book/Verlag-Book.woff') format('woff');
  font-weight: 400;
}
@font-face {
  font-family: 'Verlag';
  src: url('/fonts/Verlag-Book/Verlag-Bold.woff') format('woff');
  font-weight: 700;
}

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --dark: #273B54; --darker: #1a2735; --darkest: #0f1c28;
  --white: #ffffff; --gray: #888; --accent: #0095ff;
  --dim: rgba(255,255,255,0.45); --line: rgba(255,255,255,0.07);
}
html { scroll-behavior: smooth; }
body { font-family: 'Verlag', 'Segoe UI', system-ui, sans-serif; background: var(--darkest); color: var(--white); overflow-x: hidden; }
a { color: inherit; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; height: 64px;
  background: rgba(15,28,40,0.75); backdrop-filter: blur(12px);
}
.nav-logo { text-decoration: none; display: flex; align-items: center; gap: 12px; }
.nav-logo-text { font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--white); }
.nav-logo-text span { color: var(--dim); font-weight: 400; }
.nav-logo img { height: 28px; object-fit: contain; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--dim); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-sep { color: var(--line); font-size: 11px; user-select: none; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-tel { font-size: 13px; color: var(--dim); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.nav-tel:hover { color: var(--white); }

/* ── HAMBURGER ── */
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 201; flex-direction: column; gap: 5px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--white); transition: all 0.3s; }

/* ── HERO ── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 100px 56px 80px; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,28,40,0.92) 0%, rgba(15,28,40,0.8) 40%, rgba(15,28,40,0.65) 100%);
}

/* ── DIAMOND COMPOSITION ── */
.hero-diamonds {
  position: relative; z-index: 1;
  width: 100%;
  height: 580px;
  margin: 0 0 60px;
}
.hero-diamond { position: absolute; }

.hd-frame {
  position: relative;
  transform: rotate(45deg);
  overflow: hidden;
  border-radius: 20px;
}
.hd-border {
  position: absolute; inset: 0;
  border: 2px solid var(--accent);
  border-radius: 20px;
  z-index: 2;
  pointer-events: none;
}
.hd-img-wrap {
  width: 100%; height: 100%;
  overflow: hidden;
}
.hd-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: rotate(-45deg) scale(1.45);
}

/* Diamond sizes & positions */
.hd-aoi .hd-frame { width: 450px; height: 450px; }
.hd-aoi { left: -56px; top: 50%; transform: translateY(-50%); }

.hd-auto .hd-frame { width: 240px; height: 240px; }
.hd-auto { right: 18%; top: 40px; left: auto; }

.hd-soft .hd-frame { width: 180px; height: 180px; }
.hd-soft { right: 22%; top: 320px; left: auto; }

/* Diamond labels */
.hd-label {
  position: absolute;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.hd-aoi .hd-label { bottom: -40px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 15px; white-space: normal; max-width: 260px; }
.hd-auto .hd-label { bottom: -36px; left: 50%; transform: translateX(-50%); }
.hd-soft .hd-label { bottom: -36px; left: 50%; transform: translateX(-50%); }

/* Accent glow on AOI (main focus) */
.hd-aoi .hd-border { border-width: 3px; box-shadow: 0 0 40px rgba(0,149,255,0.25); }

.hero-bottom { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero-sub { font-size: clamp(16px, 1.8vw, 22px); color: rgba(255,255,255,0.6); max-width: 560px; line-height: 1.6; }
.hero-cta-wrap { display: flex; gap: 16px; flex-shrink: 0; }

/* ── BUTTONS ── */
.btn-accent { display: inline-block; padding: 16px 40px; background: var(--accent); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-decoration: none; transition: background 0.2s; border: none; cursor: pointer; }
.btn-accent:hover { background: #0086e6; }
.btn-accent-dark { display: inline-block; padding: 16px 40px; background: var(--darkest); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-decoration: none; transition: background 0.2s; border: none; cursor: pointer; }
.btn-accent-dark:hover { background: var(--darker); }
.btn-outline { display: inline-block; padding: 16px 40px; border: 2px solid var(--accent); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-decoration: none; transition: all 0.2s; }
.btn-outline:hover { background: var(--accent); color: var(--white); }

/* ── STATS ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--line); gap: 1px; }
.stat { background: var(--darker); padding: 48px 40px; }
.stat-num { font-size: clamp(36px, 4vw, 56px); font-weight: 700; letter-spacing: -2px; line-height: 1; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--dim); margin-top: 8px; }

/* ── SECTION HEADINGS ── */
.sec-tag { font-size: 10px; font-weight: 700; letter-spacing: 5px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.sec-h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; line-height: 1.1; margin-bottom: 40px; }

/* ── SERVICES ── */
.services { background: var(--darker); padding: 100px 56px; }
.services-header { margin-bottom: 64px; }
.services-header h2 { font-size: clamp(48px, 7vw, 80px); font-weight: 700; line-height: 0.95; letter-spacing: -3px; text-transform: uppercase; margin-bottom: 16px; }
.services-header p { font-size: 18px; color: var(--dim); max-width: 650px; line-height: 1.6; }
.srv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.srv-card { background: var(--darker); padding: 48px 40px; transition: background 0.2s; }
.srv-card:hover { background: var(--dark); }
.srv-card-icon { width: 80px; height: 80px; margin-bottom: 24px; }
.srv-card-icon img { width: 100%; height: 100%; display: block; }
.srv-card-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.5px; }
.srv-card-desc { font-size: 15px; color: rgba(255,255,255,0.55); line-height: 1.7; }
.srv-card-link { display: inline-block; margin-top: 20px; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); text-decoration: none; transition: color 0.2s; }
.srv-card-link:hover { color: var(--white); }

/* ── AOI HIGHLIGHT ── */
.aoi-highlight { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; }
.aoi-text { padding: 80px 64px; background: var(--accent); display: flex; flex-direction: column; justify-content: center; }
.aoi-text .sec-tag { color: rgba(255,255,255,0.6); }
.aoi-text h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; line-height: 1.1; margin-bottom: 24px; }
.aoi-text p { font-size: 16px; color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 32px; }
.aoi-photo { background: var(--dark); display: flex; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.aoi-photo .aoi-icon { width: 200px; height: 200px; opacity: 0.6; }
.aoi-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,149,255,0.08), transparent); }

/* ── TECH LOGOS ── */
.tech-logos { background: var(--darkest); padding: 64px 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tech-logos-label { font-size: 10px; font-weight: 700; letter-spacing: 5px; text-transform: uppercase; color: var(--dim); text-align: center; margin-bottom: 32px; }
.tech-logos-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 40px; }
.tech-logo-name { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.2); letter-spacing: 1px; transition: color 0.2s; white-space: nowrap; }
.tech-logo-name:hover { color: rgba(255,255,255,0.5); }

/* ── REFS / BLOG PREVIEW ── */
.refs-section { background: var(--darkest); padding: 100px 56px; }
.refs-header { margin-bottom: 48px; }
.refs-header h2 { font-size: clamp(48px, 7vw, 80px); font-weight: 700; line-height: 0.95; letter-spacing: -3px; text-transform: uppercase; margin-bottom: 16px; }
.refs-header p { font-size: 18px; color: var(--dim); }
.refs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.ref-card { background: var(--darkest); padding: 32px; transition: background 0.2s; text-decoration: none; color: var(--white); display: flex; flex-direction: column; }
.ref-card:hover { background: var(--darker); }
.ref-card-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.ref-card-excerpt { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.6; flex: 1; }
.ref-card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ref-card-tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; background: rgba(0,149,255,0.1); color: var(--accent); }
.ref-card-link { display: inline-block; margin-top: 16px; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); text-decoration: none; }

/* ── QUALITY ── */
.quality-bar { display: grid; grid-template-columns: 1fr 1fr; background: var(--line); gap: 1px; }
.quality-text { background: var(--darker); padding: 64px; display: flex; flex-direction: column; justify-content: center; }
.quality-text h3 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.quality-text p { font-size: 15px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 24px; }
.quality-badge { background: var(--darker); display: flex; align-items: center; justify-content: center; padding: 48px; }
.quality-badge-inner { text-align: center; }
.quality-badge-inner .sec-tag { margin-bottom: 12px; }
.quality-badge-inner p { font-size: 14px; color: var(--dim); line-height: 1.6; max-width: 300px; }

/* ── CTA ── */
.cta { background: var(--dark); padding: 80px 56px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 700; line-height: 1.1; }
.cta h2 em { font-style: normal; color: var(--accent); }
.cta p { font-size: 15px; color: var(--dim); margin-top: 12px; line-height: 1.6; }
.cta-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; flex-shrink: 0; }
.cta-contact { font-size: 13px; color: var(--dim); }
.cta-contact a { color: var(--accent); text-decoration: none; }
.cta-contact a:hover { color: var(--white); }

/* ── CONTACT ── */
.contact { background: var(--darkest); padding: 100px 56px; }
.contact-heading { font-size: clamp(28px, 3.5vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -1px; margin-bottom: 64px; }
.contact-heading em { font-style: normal; color: var(--accent); }
.contact-body { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.contact-left { display: flex; flex-direction: column; justify-content: center; }
.contact-direct { display: flex; flex-direction: column; gap: 8px; }
.contact-direct a { font-size: 15px; color: var(--accent); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.contact-direct a:hover { color: var(--white); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.contact-field input, .contact-field select, .contact-field textarea {
  width: 100%; padding: 16px 20px; background: var(--darker); border: 1px solid var(--line); color: var(--white);
  font-family: inherit; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.contact-field input:focus, .contact-field select:focus, .contact-field textarea:focus { border-color: var(--accent); }
.contact-field textarea { min-height: 140px; resize: vertical; }
.contact-field select { cursor: pointer; appearance: none; }
.contact-checks { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.contact-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 12px; color: var(--dim); line-height: 1.5; }
.contact-check input { display: none; }
.contact-check-box { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid var(--line); margin-top: 1px; position: relative; transition: all 0.2s; }
.contact-check input:checked ~ .contact-check-box { border-color: var(--accent); background: var(--accent); }
.contact-check input:checked ~ .contact-check-box::after { content: '\2713'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--white); }
.contact-bottom { display: flex; justify-content: flex-end; }

/* ── PAGE HERO ── */
.page-hero { min-height: 50vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 100px 56px 64px; position: relative; overflow: hidden; background: var(--darker); }
.page-hero h1 { font-size: clamp(56px, 9vw, 130px); font-weight: 700; letter-spacing: -4px; text-transform: uppercase; line-height: 0.95; margin-bottom: 16px; }
.page-hero-sub { font-size: clamp(16px, 1.8vw, 22px); color: var(--dim); max-width: 600px; line-height: 1.6; }
.page-hero-wm { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); width: 500px; height: 500px; opacity: 0.04; pointer-events: none; }

/* ── FOOTER ── */
.site-footer { background: var(--darkest); border-top: 1px solid var(--line); padding: 64px 56px 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { }
.footer-brand-name { font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.footer-brand-name span { color: var(--dim); font-weight: 400; }
.footer-brand p { font-size: 13px; color: var(--dim); line-height: 1.6; }
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.footer-social a { color: var(--dim); text-decoration: none; font-size: 13px; font-weight: 700; transition: color 0.2s; }
.footer-social a:hover { color: var(--accent); }
.footer-col h4 { font-size: 10px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.footer-col a { display: block; font-size: 13px; color: var(--dim); text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.18); }

/* ── RESPONSIVE 1024 ── */
@media (max-width: 1024px) {
  .hero-diamonds { max-width: 700px; height: 520px; }
  .hd-aoi .hd-frame { width: 340px; height: 340px; }
  .hd-auto .hd-frame { width: 180px; height: 180px; }
  .hd-soft .hd-frame { width: 140px; height: 140px; }
  .hd-soft { right: 4%; top: 240px; }
  .aoi-highlight { grid-template-columns: 1fr; }
  .quality-bar { grid-template-columns: 1fr; }
  .contact-body { grid-template-columns: 1fr; gap: 48px; }
  .srv-grid { grid-template-columns: 1fr 1fr; }
  .refs-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Full menu between tablet and wide desktop: "Esettanulmányok" made it too wide for the default gaps */
@media (min-width: 769px) and (max-width: 1200px) {
  nav { padding: 0 32px; }
  .nav-links { gap: 20px; }
  .nav-links a { letter-spacing: 1.5px; }
  .nav-right { gap: 18px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .nav-right .nav-tel[href^="tel:"] { display: none; }
}
@media (min-width: 769px) and (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 14px; }
  .nav-links a { letter-spacing: 1px; }
  .nav-logo-text { letter-spacing: 1px; }
}

/* ── RESPONSIVE 768 ── */
@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links, .nav-right { display: none; position: fixed; top: 64px; left: 0; right: 0; background: rgba(15,28,40,0.97); backdrop-filter: blur(12px); flex-direction: column; padding: 32px 24px; gap: 24px; z-index: 199; }
  .nav-right { top: auto; border-top: 1px solid var(--line); }
  nav.nav-open .nav-links,
  nav.nav-open .nav-right { display: flex; }
  nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links a { font-size: 16px; letter-spacing: 3px; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 32px 24px; }
  .stat-num { font-size: 36px; }
  nav { padding: 0 24px; }
  .hero { padding: 100px 24px 60px; }
  .hero-diamonds { height: 380px; max-width: 360px; margin-bottom: 40px; }
  .hd-aoi .hd-frame { width: 260px; height: 260px; }
  .hd-aoi { left: 0; top: 0; }
  .hd-auto .hd-frame { width: 130px; height: 130px; }
  .hd-auto { left: auto; right: 0; top: 20px; }
  .hd-soft .hd-frame { width: 100px; height: 100px; }
  .hd-soft { right: 10%; top: 180px; left: auto; }
  .hd-label { font-size: 10px !important; letter-spacing: 1px; }
  .hd-aoi .hd-label { font-size: 12px !important; max-width: 180px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-sub { font-size: 18px; white-space: normal !important; }
  .hero-cta-wrap { flex-direction: column; align-items: flex-start; }
  .sec-h2 { white-space: normal !important; font-size: clamp(22px, 6vw, 32px); }

  .services { padding: 60px 24px; }
  .srv-grid { grid-template-columns: 1fr; }
  .srv-card { padding: 40px 24px; }

  .aoi-text { padding: 48px 24px; }
  .aoi-photo { min-height: 200px; padding: 24px; }

  .tech-logos { padding: 40px 24px; }

  .refs-section { padding: 60px 24px; }
  .quality-text { padding: 48px 24px; }
  .quality-badge { padding: 32px 24px; }

  .contact { padding: 60px 24px; }
  .contact-heading { white-space: normal; }
  .contact-row { grid-template-columns: 1fr; }

  .cta { padding: 60px 24px; flex-direction: column; text-align: center; }
  .cta-right { align-items: center; }

  .page-hero { padding: 100px 24px 48px; }
  .page-hero h1 { font-size: clamp(32px, 11vw, 56px); letter-spacing: -1.5px; }

  /* Long Hungarian words ("vizsgálóállomás", "gyártásirányítás") are wider than a phone at the desktop sizes */
  .services-header h2,
  .refs-header h2 { font-size: clamp(28px, 9vw, 48px); letter-spacing: -1px; }
  h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }

  .site-footer { padding: 48px 24px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ── EU INFOBLOKK (Széchenyi Terv Plusz) ── */
.eu-banner { position: fixed; right: 0; bottom: 0; z-index: 1000; }
.eu-banner-box { position: relative; }
.eu-banner-box a { display: block; }
.eu-banner-landscape { display: block; height: 200px; width: auto; }
.eu-banner-portrait { display: none; }
.eu-banner-close { position: absolute; top: 8px; right: 16px; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.eu-banner-close:hover { background: #000; }
.eu-banner-reopen { display: none; margin: 0 16px 16px 0; padding: 8px 16px; border: none; border-radius: 999px; background: rgba(0,0,0,0.7); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.eu-banner-reopen:hover { background: #000; }
.eu-banner--closed .eu-banner-box { display: none; }
.eu-banner--closed .eu-banner-reopen { display: block; }

@media (max-width: 768px) {
  .eu-banner-box { width: min(100vw, 450px); }
  .eu-banner-landscape { display: none; }
  .eu-banner-portrait { display: block; width: 100%; height: auto; }
}
