/* ============================================================
   KaM Energy — hlavní stylesheet
   ============================================================ */

/* ---------- CSS proměnné ---------- */
:root {
  --bg:       #07090e;
  --bg2:      #0b0e16;
  --surface:  #0f1219;
  --surface2: #141820;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);
  --border-g: rgba(201,168,76,0.2);
  --text:     #f0f2f7;
  --text2:    #8b94a8;
  --text3:    #5a6278;
  --gold:     #c9a84c;
  --gold-d:   #a8893a;
  --gold-l:   #e0be6a;
  --stone:    #9aa0b0;
  --stone2:   #6b7285;
  --muted:    #6b7285;
  --nav-h:    70px;
}

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

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Kontejner ---------- */
.cont {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Sekce ---------- */
.sec {
  padding: 5rem 0;
}

/* ---------- Reveal animace ---------- */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.rv.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Typografie ---------- */
.sec-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.sec-eyebrow span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.sec-eyebrow::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.sec-h {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  line-height: 1.15;
}

/* ---------- Tlačítka ---------- */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: #08060a;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}
.btn-gold:hover { background: var(--gold-l); transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--border2);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

/* ---------- NAVIGACE ---------- */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 10000;
  background: rgba(7,9,14,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-sub2 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone2);
}

#mainMenu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#mainMenu li a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--stone);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: color 0.2s;
  text-decoration: none;
  display: block;
}
#mainMenu li a:hover { color: var(--text); }
#mainMenu li a.nav-active { color: var(--gold); }

.nav-btn {
  background: var(--gold) !important;
  color: #08060a !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 7px !important;
}
.nav-btn:hover { background: var(--gold-l) !important; }

.nsep {
  width: 1px;
  height: 20px;
  background: var(--border2);
  margin: 0 0.4rem;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  background: var(--bg);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(ellipse, rgba(201,168,76,0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-glow2 {
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(ellipse, rgba(201,168,76,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.hero-slab {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(135deg, rgba(15,18,25,0.5), rgba(20,24,32,0.3));
  border-left: 1px solid var(--border);
  pointer-events: none;
}

.hero-slab-line {
  position: absolute;
  right: 44.5%;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.htag-line { width: 2rem; height: 1px; background: var(--gold); }
.htag-text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-gold { color: var(--gold); }

.hero-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text2);
  margin-bottom: 2.2rem;
  max-width: 44ch;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hcard {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: rgba(15,18,25,0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.8rem;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}
.hcard:hover { border-color: rgba(201,168,76,0.3); }

.hcard-icon { font-size: 1.5rem; flex-shrink: 0; }

.hcard-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.hcard-desc {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ---------- SERVICES (karty) ---------- */
.sc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.sc:hover { border-color: rgba(201,168,76,0.3); transform: translateY(-2px); }

.sc-ico {
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}

.sc-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.sc-desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text2);
}

/* Tabs */
.tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--stone);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- REALIZACE ---------- */
.real-sec { background: var(--bg2); }

.real-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.rcard-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,9,14,0.92) 0%, rgba(7,9,14,0.1) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

/* ---------- PROJEKCE ---------- */
.projekce-sec { background: var(--bg); }

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.ft-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding: 4rem 0 3rem;
}

.ft-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.2rem;
}

.ft-links { list-style: none; padding: 0; margin: 0; }
.ft-links li { margin-bottom: 0.7rem; }
.ft-links a {
  font-size: 0.85rem;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}
.ft-links a:hover { color: var(--gold); }

.ft {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone2);
}

.ft-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  color: var(--stone);
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}
.ft-social:hover { border-color: var(--gold); color: var(--gold); }

.foot-copy {
  font-size: 0.78rem;
  color: var(--stone2);
}

.ft-bottom {
  border-top: 1px solid var(--border);
}

/* ---------- KONTAKTNÍ FORMULÁŘ ---------- */
.contact-sec { background: var(--bg2); }

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.cf {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.cf h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.cf p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text2);
  margin-bottom: 1.8rem;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.fin {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
  display: block;
  margin-bottom: 0.8rem;
}
.fin:focus { border-color: var(--gold); }
.fin::placeholder { color: var(--text3); }

textarea.fin {
  resize: vertical;
  min-height: 110px;
  font-family: 'Outfit', sans-serif;
}

select.fin {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b94a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select.fin option { background: #0f1219; color: var(--text); }

.fsend {
  display: block;
  width: 100%;
  background: var(--gold);
  color: #08060a;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.4rem;
}
.fsend:hover { background: var(--gold-l); transform: translateY(-1px); }

/* Kontaktní info */
.cinfo {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ci {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}
.ci:last-child { border-bottom: none; }
.ci:hover .ci-val { color: var(--gold); }

.ci-i {
  font-size: 1.2rem;
  width: 2.2rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.ci-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone2);
  margin-bottom: 0.3rem;
}

.ci-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.ci-note {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 0.2rem;
}

/* ---------- GALERIE ---------- */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gal-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gal-item:hover img { transform: scale(1.05); }

/* ---------- CERTIFIKACE ---------- */
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

/* ---------- LIGHTBOX ---------- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(12px);
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
#lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
#lb-close:hover { opacity: 1; }
#lb-caption {
  margin-top: 1rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- SCROLL OFFSET pro kotvy ---------- */
[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }

/* ---------- RESPONZIVNÍ ---------- */

/* Kontakt */
@media(max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media(max-width: 560px) {
  .frow { grid-template-columns: 1fr; }
  .cf { padding: 1.5rem; }
}

/* Footer */
@media(max-width: 900px) {
  .ft-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .ft-col.ft-brand {
    grid-column: 1 / -1;
  }
}

@media(max-width: 600px) {
  .ft-inner { grid-template-columns: 1fr; }
  .ft-col.ft-brand { grid-column: auto; }
}

/* Obecná mobilní responzivita */
@media(max-width: 768px) {
  .sec { padding: 3rem 0; }
  .cont { padding: 0 1.2rem; }

  /* Hero */
  .hero {
    min-height: auto;
    padding-top: var(--nav-h);
    padding-bottom: 2rem;
    align-items: flex-start;
  }
  .hero > div { width: 100%; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.2rem 1.5rem;
  }
  .hero-slab, .hero-slab-line, .hero-glow, .hero-glow2 { display: none; }
  .hero h1 { font-size: 2rem; margin-bottom: 1rem; }
  .hero-sub { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .hero-ctas { flex-direction: column; gap: 0.7rem; }
  .btn-gold, .btn-outline { text-align: center; width: 100%; padding: 0.9rem 1rem; }

  /* Hero cards */
  .hero-cards { gap: 0.7rem; }
  .hcard { padding: 1rem 1.2rem; }
  .hcard-title { font-size: 0.9rem; }
  .hcard-desc { font-size: 0.8rem; }

  /* Formulář */
  .form-row { grid-template-columns: 1fr; }

  /* Realizace */
  .real-head { flex-direction: column; align-items: flex-start; }
}
