/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Barlow', sans-serif;
  color: #2c3e50;
  background: #fff;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
  --navy:       #0d2137;
  --steel:      #1b4f72;
  --blue:       #2471a3;
  --accent:     #2e86c1;
  --light-blue: #aed6f1;
  --grey-dark:  #2c3e50;
  --grey-mid:   #566573;
  --grey-light: #d5d8dc;
  --grey-bg:    #f4f6f7;
  --white:      #ffffff;
  --grid-line:  rgba(46,134,193,0.07);
  --nav-h:      72px;
  /* Lighter mid-grey for section backgrounds (client feedback: not black, dove/mid grey) */
  --section-dark:      #5a6c7d;
  --section-dark-rgba: 90,108,125;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(13,33,55,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46,134,193,0.25);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  transition: padding 0.3s;
}
.nav-logo img {
  height: 44px;
  display: block;
}
.nav-links {
  display: flex; list-style: none; gap: 4px;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  padding: 7px 14px; border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--light-blue);
  border-color: rgba(46,134,193,0.35);
  background: rgba(46,134,193,0.08);
}
/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px; cursor: pointer;
  padding: 4px; background: none; border: none;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: rgba(255,255,255,0.85);
  transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(13,33,55,0.99);
  border-bottom: 1px solid rgba(46,134,193,0.2);
  padding: 16px 0 24px;
  z-index: 199;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.nav-drawer.open { transform: translateY(0); }
.nav-drawer ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 24px;
}
.nav-drawer a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 16px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.nav-drawer a:hover {
  color: var(--light-blue);
  border-left-color: var(--accent);
  background: rgba(46,134,193,0.08);
}

/* ===== HERO ===== */
#fooldal {
  min-height: 100vh;
  background: var(--section-dark);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
.hero-building {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 54%;
  pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 18%, rgba(0,0,0,1) 48%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 18%, rgba(0,0,0,1) 48%);
}
.hero-building img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.52; display: block;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 80px;
  max-width: 700px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 3.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 32px; height: 1px; background: var(--accent);
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(54px, 7vw, 104px);
  font-weight: 900; color: var(--white);
  line-height: 1.0; letter-spacing: -1px;
  margin-bottom: 36px;
  text-transform: uppercase;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400; color: rgba(255,255,255,0.92);
  line-height: 1.65; max-width: 680px;
  margin-bottom: 56px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 15px 34px; text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  border: 2px solid var(--accent);
  transition: all 0.25s; display: inline-block;
}
.btn-primary:hover { background: var(--steel); border-color: var(--steel); }
.btn-outline {
  background: transparent; color: rgba(255,255,255,0.8);
  padding: 15px 34px; text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.22);
  transition: all 0.25s; display: inline-block;
}
.btn-outline:hover { border-color: var(--light-blue); color: var(--light-blue); }
/* hero-stats: normal flow (not absolute) for MW live edit compatibility */
.hero-stats {
  display: flex; gap: 48px;
  justify-content: flex-start;
  margin-top: 48px;
  position: relative; z-index: 2;
}
.stat { text-align: left; }
.stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(38px, 3.5vw, 50px); font-weight: 900;
  color: #fff; line-height: 1;
}
.stat-num em { color: var(--accent); font-style: normal; }
.stat-label {
  font-size: 12px; letter-spacing: 2.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

/* ===== SECTION COMMONS ===== */
section { padding: 100px 80px; }
.section-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; letter-spacing: 3.5px;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: ''; display: block;
  width: 28px; height: 1px; background: var(--accent);
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(38px, 4.6vw, 66px); font-weight: 800;
  color: var(--navy); line-height: 1.1;
  text-transform: uppercase; margin-bottom: 22px;
}
.section-title.light { color: var(--white); }
.section-lead {
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 400; color: var(--grey-dark);
  line-height: 1.7; max-width: 760px;
  margin-bottom: 64px;
}
.section-lead.light { color: rgba(255,255,255,0.6); }
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== SERVICES ===== */
#szolgaltatasok { background: var(--grey-bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.svc-card {
  background: var(--white);
  padding: 40px 34px;
  position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.svc-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.svc-card:hover::after { transform: scaleX(1); }
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(13,33,55,0.1); }
.svc-number {
  position: absolute; top: 24px; right: 24px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px; font-weight: 900;
  color: rgba(46,134,193,0.06); line-height: 1;
}
.svc-icon {
  width: 46px; height: 46px;
  background: rgba(46,134,193,0.1); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.svc-icon svg {
  width: 24px; height: 24px; stroke: var(--accent);
  fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.svc-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 29px; font-weight: 700;
  color: var(--navy); margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.3px;
  line-height: 1.2;
}
.svc-text {
  font-size: 20px; color: var(--grey-dark);
  line-height: 1.65; font-weight: 400;
}

/* ===== REFERENCES ===== */
#referenciak {
  background: var(--section-dark); position: relative; overflow: hidden;
}
#referenciak::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(46,134,193,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,134,193,0.04) 1px, transparent 1px);
  background-size: 52px 52px; pointer-events: none;
}
.ref-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start; position: relative; z-index: 2;
}
.ref-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ref-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 22px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid transparent;
  cursor: pointer; transition: all 0.4s;
}
.ref-item:hover, .ref-item.active {
  background: rgba(0,0,0,0.25);
  border-left-color: var(--accent);
}
.ref-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700;
  color: var(--accent); min-width: 28px; margin-top: 2px;
}
.ref-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 23px; font-weight: 700; color: #fff;
  margin-bottom: 6px; letter-spacing: 0.3px;
}
.ref-desc { font-size: 18px; color: rgba(255,255,255,0.85); font-weight: 400; line-height: 1.55; }
.ref-badge {
  margin-left: auto; align-self: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(46,134,193,0.3);
  padding: 3px 9px; white-space: nowrap;
}

/* Gallery right col */
.ref-gallery { position: sticky; top: 100px; }
.ref-img-wrap {
  aspect-ratio: 4/3; position: relative;
  overflow: hidden; background: rgba(255,255,255,0.04);
}
.ref-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.5s ease;
  pointer-events: none;
}
.ref-slide.active { opacity: 1; pointer-events: auto; }
.ref-slide svg { width: 100%; height: 100%; display: block; }
.ref-slide-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-slide-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(13,33,55,0.9));
  color: rgba(255,255,255,0.85);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 40px 20px 14px;
}
.ref-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; margin-top: 2px;
}
.ref-meta-cell {
  background: rgba(255,255,255,0.05);
  padding: 14px 18px;
}
.ref-meta-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 4px;
}
.ref-meta-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* ===== ABOUT ===== */
#rolunk { background: #fff; }
.about-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.about-visual { position: relative; }
.about-img-wrap {
  width: 100%; aspect-ratio: 4/3;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
}
.about-img-wrap img {
  width: 100%; height: 100%; display: block; object-fit: cover;
}
.about-img-box {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  position: relative; overflow: hidden;
}
.about-img-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(46,134,193,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,134,193,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}
.about-big-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 100px; font-weight: 900;
  color: rgba(255,255,255,0.07); letter-spacing: -6px;
  line-height: 1;
}
.about-badge {
  position: absolute; bottom: -28px; right: -28px;
  width: 156px; height: 156px;
  background: var(--accent);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff; z-index: 2;
}
.about-badge-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px; font-weight: 900; line-height: 1;
}
.about-badge-label {
  font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; opacity: 0.8; text-align: center;
}
.about-body { padding-left: 16px; }
.about-text {
  font-size: 18px; font-weight: 400; color: var(--grey-dark);
  line-height: 1.75; margin-bottom: 22px;
}
.about-text strong { color: var(--navy); font-weight: 600; }
.values-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-top: 40px;
}
.value-card {
  padding: 22px 24px;
  border: 1px solid var(--grey-light);
  border-left: 3px solid var(--accent);
}
.value-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--navy); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px;
}
.value-text { font-size: 15.5px; color: var(--grey-dark); line-height: 1.6; font-weight: 400; }

/* ===== CONTACT ===== */
#kapcsolat { background: var(--grey-bg); }
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 72px; align-items: start;
}
.contact-block { margin-bottom: 28px; }
.contact-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 6px;
}
.contact-val { font-size: 17px; color: var(--navy); line-height: 1.55; font-weight: 500; }
.contact-map {
  width: 100%; height: 220px;
  background: var(--navy); margin-top: 32px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.contact-map svg { width: 100%; height: 100%; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--grey-dark);
}
input, textarea, select {
  border: 1px solid var(--grey-light);
  background: #fff; padding: 13px 16px;
  font-family: 'Barlow', sans-serif;
  font-size: 16px; color: var(--navy);
  outline: none; transition: border-color 0.2s;
  width: 100%; border-radius: 0; appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
.form-submit {
  background: var(--navy); color: #fff;
  border: 2px solid var(--navy); padding: 14px 32px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s; width: 100%;
}
.form-submit:hover { background: var(--accent); border-color: var(--accent); }

/* ===== FOOTER ===== */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(46,134,193,0.2);
  padding: 28px 80px;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo img { height: 30px; opacity: 0.55; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--light-blue); }

/* Inner/clean page styles */
#page-spacer { height: 80px; }
.section-inner { padding: 60px 20px; max-width: 900px; margin: 0 auto; }
.inner-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 32px; color: var(--navy); margin-bottom: 12px; }

/* ===== RESPONSIVE — TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
  :root { --nav-h: 64px; }
  nav { padding: 0 32px; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 12px; padding: 6px 10px; letter-spacing: 1.2px; }

  section { padding: 80px 40px; }

  /* Hero */
  .hero-content { padding: 60px 40px; max-width: 560px; }
  .hero-building { width: 50%; }

  /* Services */
  .services-grid { grid-template-columns: repeat(2, 1fr); }

  /* References */
  .ref-layout { grid-template-columns: 1fr; gap: 40px; }
  .ref-gallery { position: static; }

  /* About */
  .about-layout { grid-template-columns: 1fr; gap: 60px; }
  .about-badge { bottom: -20px; right: -16px; width: 130px; height: 130px; }
  .about-badge-num { font-size: 42px; }
  .about-body { padding-left: 0; padding-top: 40px; }

  /* Contact */
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }

  /* Footer */
  footer { padding: 24px 40px; }
}

/* ===== RESPONSIVE — MOBILE (max 768px) ===== */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer { display: block; }

  section { padding: 64px 20px; }

  /* Hero */
  #fooldal { align-items: flex-end; min-height: 100svh; }
  .hero-building {
    width: 100%; opacity: 1;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.9) 60%, rgba(0,0,0,0.4) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.9) 60%, rgba(0,0,0,0.4) 100%);
    top: 0; left: 0; right: 0; bottom: 0;
  }
  .hero-building img { opacity: 0.3; }
  .hero-content {
    padding: 32px 20px 140px;
    max-width: 100%; width: 100%;
  }
  .hero-title { font-size: clamp(44px, 11vw, 68px); }
  .hero-sub { max-width: 100%; font-size: 19px; }
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-outline { text-align: center; }
  .hero-stats {
    justify-content: space-between; gap: 0;
  }
  .stat-num { font-size: 32px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 2px; }
  .svc-card { padding: 28px 24px; }

  /* References */
  .ref-layout { grid-template-columns: 1fr; gap: 32px; }
  .ref-meta { grid-template-columns: 1fr 1fr; }
  .ref-meta-cell:last-child { display: none; }

  /* About */
  .about-layout { grid-template-columns: 1fr; gap: 48px; }
  .about-badge { width: 110px; height: 110px; bottom: -16px; right: -12px; }
  .about-badge-num { font-size: 36px; }
  .about-body { padding-left: 0; padding-top: 36px; }
  .values-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Contact */
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-map { height: 160px; }

  /* Footer */
  footer {
    padding: 24px 20px;
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}

/* ===== RESPONSIVE — SMALL MOBILE (max 400px) ===== */
@media (max-width: 400px) {
  .hero-title { font-size: 42px; }
  .stat-num { font-size: 28px; }
  .section-title { font-size: 36px; }
}

/* ===== MW LIVE EDIT OVERRIDES ===== */
.mw-live-edit #fooldal { padding-top: 0; }
.mw-live-edit .reveal { opacity: 1 !important; transform: none !important; }
.mw-live-edit [data-layout-container] { min-height: 0 !important; }
