/* =============== Base =============== */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color:#0f172a;
  background:#fff;
  overflow-x: hidden; /* mobile safety */
}
img { max-width:100%; display:block; height:auto; }
a { color:inherit; }
p, h1, h2, h3 { overflow-wrap: anywhere; }

/* ===== Responsive foundation ===== */
:root{
  --container-max: 1280px;
  --container-pad: clamp(16px, 3vw, 24px);
  --section-pad: clamp(36px, 5vw, 56px);

  --h1: clamp(28px, 4.2vw, 44px);
  --h2: clamp(22px, 2.4vw, 30px);
  --lead: clamp(16px, 1.6vw, 18px);
}

/* Containers & Layout */
.container { max-width: var(--container-max); margin:0 auto; padding:0 var(--container-pad); }
.section { padding-block: var(--section-pad); }          /* jen nahoře/dole */
.section.container { padding-inline: var(--container-pad); } /* vlevo/vpravo */
.section-title { font-size: var(--h2); margin:0 0 24px; line-height:1.2; }

/* Buttons */
.btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 18px;
  border-radius:10px;
  text-decoration:none;
  font-weight:600;
}
.btn-primary {
  background:#38bdf8;
  color:#0f172a;
  box-shadow:0 8px 20px rgba(0,0,0,.2);
  border:1px solid #38bdf8;
}
.btn-primary:hover { filter:brightness(0.97); }
.btn-ghost {
  background:transparent;
  color:#0f172a;
  border:1px solid #cbd5e1;
}
.btn-ghost:hover { background:#f8fafc; }

/* GRID helpers */
.cards-4, .cards-3, .cards-2, .grid-2 { display:grid; gap:20px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2  { grid-template-columns: 1fr 1fr; }

/* Čtvercové service karty (pro cards-2 na homepage) */
.cards-2 .service-media { aspect-ratio: 1 / 1; overflow: hidden; }
.cards-2 .service-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width:1024px){
  .cards-4{grid-template-columns: repeat(2,1fr);}
  .cards-3{grid-template-columns: repeat(2,1fr);}
  .grid-2{grid-template-columns:1fr;}
}
@media (max-width:640px){
  .cards-4,.cards-3,.cards-2{grid-template-columns:1fr;}
}

/* =============== Header =============== */
.site-header {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.new-header {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* logo vlevo */
.brand-left .brand-badge {
  background: transparent;   /* ← KLÍČOVÉ */
  border: none;               /* ← pryč rámeček */
  box-shadow: none;           /* ← pryč stín */
  padding: 0;                 /* ← logo bez krabičky */
  display: flex;
  align-items: center;
}

.brand-left img { max-height: 34px; }

/* pravá strana */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* === language flags === */
.lang-switcher { display: flex; gap: 8px; }

.lang-flag {
  padding: 0;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(15,23,42,0.4);
  border-radius: 10px;
  width: 48px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.lang-flag img {
  display: block;
  width: 36px;
  height: 24px;
  border-radius: 4px;
  pointer-events: none;
}
.lang-flag:hover {
  transform: translateY(-1px);
  border-color: #7dd3fc;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  background: rgba(56,189,248,0.08);
}
.lang-flag.active-lang {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,.45);
  background: rgba(56,189,248,0.15);
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Mobile header polish ===== */
@media (max-width: 520px){
  .site-header { padding: 8px 0; }

  .new-header{
    padding: 8px 12px;
  }

  .brand-left img{
    max-height: 26px;
  }

  .header-right{
    gap: 8px;
  }

  .lang-switcher{
    gap: 6px;
  }

  .lang-flag{
    width: 38px;
    height: 28px;
    border-radius: 10px;
  }

  .lang-flag img{
    width: 26px;
    height: 18px;
    border-radius: 4px;
  }
}

/* =============== Hero =============== */
.hero {
  position:relative;
  width:100%;
  min-height: clamp(420px, 56vh, 720px);
  display:flex;
  align-items:center;
}
.hero-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-overlay { position:absolute; inset:0; background: linear-gradient(0deg, rgba(15,23,42,.75), rgba(15,23,42,.25)); }
.hero-content{
  position:relative;
  color:#fff;
  padding: clamp(28px, 6vw, 56px) var(--container-pad); /* ← přidá okraje */
}
.hero h1 { font-size: var(--h1); line-height:1.12; margin:0 0 12px; letter-spacing: -0.02em; }
.hero-lead { font-size: var(--lead); color:#e2e8f0; max-width:760px; margin:0 0 18px; }

/* ===== Mobile hero polish ===== */
@media (max-width: 520px){
  :root{ --container-pad: 20px; }
  .hero{ min-height: 62vh; }
  .hero-content{ padding: 20px var(--container-pad) 26px; }
  .hero h1{
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.02em;
  }
  .hero-lead{
    font-size: 16px;
    line-height: 1.35;
    max-width: 32ch;
  }
  .hero .btn{
    padding: 14px 18px;
    font-size: 16px;
  }
}

/* =============== Cards (values/services) =============== */
.card, .service-card {
  border:1px solid #e2e8f0;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 8px 24px rgba(2,6,23,.06);
}
.card { padding:18px; }
.card-icon {
  width:42px; height:42px; border-radius:10px;
  background:#f1f5f9;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:10px;
  font-weight:700;
}
.service-media img { width:100%; height: clamp(170px, 22vw, 240px); object-fit:cover; }
.service-body { padding:16px; }

/* =============== CTA band =============== */
.cta-band { background:#0f172a; color:#fff; padding:24px 0; }
.cta-band-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; }
@media (max-width:768px){
  .cta-band-inner{flex-direction:column; align-items:flex-start;}
}

/* =============== RFQ form =============== */
.rfq-form { display:flex; flex-direction:column; gap:12px; }
.form-row { display:flex; flex-direction:column; gap:6px; }
.form-row input, .form-row textarea {
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:12px 14px;
  font-size:16px;
  outline:none;
}
.form-row input:focus, .form-row textarea:focus {
  border-color:#38bdf8;
  box-shadow:0 0 0 3px rgba(56,189,248,.25);
}
.hp { position:absolute; left:-9999px; }
.form-note { font-size:12px; color:#64748b; }

/* =============== Contacts =============== */
.contact-list {
  list-style:none;
  padding:0;
  margin:0 0 16px;
  display:grid;
  gap:8px;
}
.contact-list a { color:#0ea5e9; text-decoration:none; }
.contact-list a:hover { text-decoration:underline; }

/* =============== Footer =============== */
.site-footer { background:#0f172a; color:#cbd5e1; padding:18px 0; margin-top:40px; }
.footer-inner { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.footer-brand { display:flex; align-items:center; gap:12px; }
.footer-brand img { height:26px; }
.footer-brand a { color:#38bdf8; }

/* =============== Language overlay (keep) =============== */
.lang-overlay {
  position:fixed; inset:0; background:#0f172a; color:#fff; display:none;
  align-items:center; justify-content:center; padding:2rem; z-index:9999;
}
.lang-overlay-inner {
  max-width:360px; width:100%; background:#1e2538; border:1px solid #334155; border-radius:16px;
  box-shadow:0 24px 48px rgba(0,0,0,.6); padding:24px 24px 18px; text-align:center;
}
.lang-overlay-logo { margin-bottom:18px; display:flex; justify-content:center; }
.lang-overlay-logo img {
  width:140px; background:#fff; padding:8px 18px; border-radius:12px;
  box-shadow:0 4px 16px rgba(0,0,0,.25);
}
.lang-overlay-headline { font-size:18px; font-weight:700; margin-bottom:4px; }
.lang-overlay-sub { font-size:14px; color:#94a3b8; margin-bottom:18px; }
.lang-choice-buttons { display:flex; flex-direction:column; gap:8px; }
.lang-choice-btn {
  width:100%; background:#38bdf8; color:#0f172a; border:none; border-radius:8px;
  padding:12px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px;
}
.lang-code-pill {
  background:#0f172a; color:#38bdf8; font-size:12px; font-weight:700;
  padding:4px 8px; border-radius:999px; min-width:36px; text-align:center;
}
.lang-overlay-hint { font-size:12px; color:#64748b; margin-top:10px; }

/* =============== Form status + attachments =============== */
.form-status {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
}
.form-status.success {
  background-color: #e6f9ec;
  border: 1px solid #38a169;
  color: #22543d;
}
.form-status.error {
  background-color: #ffe6e6;
  border: 1px solid #e53e3e;
  color: #742a2a;
}

.attachments-list { list-style: none; padding-left: 0; margin-top: 8px; }
.attachments-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}
.attachments-list button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
}


/* ===== Mobile content padding fix ===== */
@media (max-width: 520px){
  section,
  .section{
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
  }
}

@media (max-width: 520px){
  .rfq-form{
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}


/* ===== Fix horizontal scroll on mobile ===== */
html, body{
  width: 100%;
  overflow-x: hidden;
}

/* Forms: inputs must never overflow */
.contact-form,
.rfq-form{
  width: 100%;
  max-width: 100%;
}

.form-row input,
.form-row textarea,
.form-row select{
  width: 100%;
  max-width: 100%;
}

/* File input is a common culprit on iOS */
input[type="file"]{
  width: 100%;
  max-width: 100%;
}

/* Contacts / long lines: force wrapping */
.contact-list,
.contact-list li,
.contact-list a{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===== MAIN NAV (center links, no dropdown) ===== */
.main-nav{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin: 0 18px;
}

.main-nav a{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:18px;   /* ← ZVĚTŠENO */
  letter-spacing:0.3px;
  opacity:.9;
  padding:12px 4px; /* trochu víc „vzduchu“ */
  border-bottom:2px solid transparent;
}


.main-nav a:hover{ opacity:1; }

/* Mobile: when space is tight, allow scroll inside nav only */
@media (max-width: 900px){
  .new-header{ gap:12px; }

  .main-nav{
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 10px;
  }
  .main-nav::-webkit-scrollbar{ display:none; }

  .main-nav a{ white-space: nowrap; }
}

@media (max-width: 520px){
  .main-nav a{
    font-size:16px;
  }
}


.map-embed iframe{
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(2,6,23,.08);
}
