/* Základní proměnné */
:root {
  --accent: #ffaa00;
  --green: #00774d;
  --dark: #181818;
  --light: #f7f7f7;
  --gray: #232323;
  --radius: 1.2rem;
  --shadow: 0 4px 24px #0002;
  --font-main: 'Roboto', Arial, sans-serif;
  --font-head: 'Montserrat', Arial, sans-serif;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: #181818;
  color: #f7f7f7;
  min-height: 100vh;
}
body {
  line-height: 1.6;
  font-size: 1.08rem;
}

/* Navigace a logo */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5vw 0.7rem 5vw;
  background: transparent;
  position: relative;
  z-index: 10;
}
.logo-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.logo-btn:focus {
  outline: 2px solid var(--accent);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3em;
  color: var(--accent);
  letter-spacing: 1px;
}
.logo svg {
  display: inline-block;
  vertical-align: middle;
}
.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-head);
  font-size: 1.05em;
  transition: color 0.2s;
}
.main-nav a:hover {
  color: var(--accent);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
@media (max-width: 800px) {
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 5vw;
    background: #232323;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 100;
  }
  .main-nav ul.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
    font-size: 2em;
    color: #fff;
  }
}

/* Hero sekce */
.hero {
  min-height: 55vh;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}
.hero-content {
  padding: 5vw 5vw 2vw 5vw;
  text-align: left;
  max-width: 700px;
}
.hero-content h1 {
  font-family: var(--font-head);
  font-size: 2.7rem;
  margin: 0 0 0.7em 0;
  color: var(--accent);
  letter-spacing: 1px;
}
.motto {
  font-size: 1.2em;
  color: #fff;
  margin-bottom: 2em;
  font-style: italic;
}
.cta, .big-cta {
  display: inline-block;
  background: var(--accent);
  color: #181818;
  font-family: var(--font-head);
  font-weight: 700;
  border: none;
  border-radius: 2em;
  padding: 0.7em 2em;
  font-size: 1.1em;
  text-decoration: none;
  margin-top: 1em;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.cta:hover, .big-cta:hover {
  background: var(--green);
  color: #fff;
}
.hero-scroll-indicator {
  width: 32px;
  height: 32px;
  margin: 0 auto 1.5em auto;
  border-bottom: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  transform: rotate(45deg);
  opacity: 0.7;
  animation: bounce 1.5s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(45deg);}
  50% { transform: translateY(12px) rotate(45deg);}
}

/* Sekce */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 5vw 2rem 5vw;
}
section {
  margin-bottom: 3.5rem;
}
h2 {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

/* Reference */
.references-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 5vw;
}
.references-main {
  flex: 2 1 0;
  min-width: 0;
}
.references-sidebar {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 320px;
  background: #232323;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px #0002;
  padding: 2rem 1.2rem;
  color: #eee;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-box h3 {
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-head);
}
.sidebar-box p {
  margin: 0 0 0.5rem 0;
  color: #ccc;
}
.sidebar-social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-social a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.sidebar-social a:hover {
  color: var(--green);
}
.sidebar-box blockquote {
  font-style: italic;
  color: #aaa;
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin: 0;
  font-size: 1.05em;
}
.ref-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  max-width: 700px;
  margin: 0;
  padding: 0;
}
.ref-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1.2rem 0;
  margin: 0;
  border-bottom: 1px solid #333;
  transition: none;
  gap: 1.2rem;
}
.ref-card:last-child {
  border-bottom: none;
}
.ref-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 1rem;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}
.ref-card blockquote {
  font-size: 1.04rem;
  color: #e0e0e0;
  margin: 0 0 0.3rem 0;
  padding: 0;
  border: none;
  background: none;
  font-style: italic;
  line-height: 1.6;
  text-align: left;
}
.ref-name {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.1em;
  text-align: left;
}
.ref-name span {
  display: block;
  color: #888;
  font-size: 0.97em;
  font-weight: 400;
  margin-top: 0.1em;
}
.ref-card-content {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 900px) {
  .references-layout {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 2vw;
  }
  .references-sidebar {
    max-width: 100%;
    width: 100%;
    margin-top: 1.5rem;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
  }
}

/* Galerie */
.gallery {
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem 0;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 1.2rem;
  box-shadow: 0 4px 24px #0002;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  background: #232323;
  border: 2px solid transparent;
}
.gallery-grid img:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 8px 32px #ffaa0033;
  border-color: var(--accent);
}
/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,20,20,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  flex-direction: column;
  padding: 2vw;
  animation: fadeInUp 0.3s;
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 1.2rem;
  box-shadow: 0 8px 40px #0008;
  background: #232323;
  border: 3px solid var(--accent);
  margin-bottom: 1.5rem;
}
.lightbox-close {
  position: absolute;
  top: 2vw;
  right: 2vw;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--accent);
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #232323cc;
  border: none;
  color: #ffaa00;
  font-size: 2.5rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-arrow.left { left: 2vw; }
.lightbox-arrow.right { right: 2vw; }
.lightbox-arrow:hover {
  background: #ffaa00;
  color: #232323;
}

/* Kontakt */
.contact-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}
.contact-form {
  background: #232323;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 280px;
  max-width: 400px;
  flex: 1 1 320px;
}
.contact-form input,
.contact-form textarea {
  background: #181818;
  border: 1.5px solid #444;
  border-radius: 0.7em;
  color: #fff;
  font-size: 1em;
  padding: 0.8em 1em;
  font-family: var(--font-main);
  resize: none;
  transition: border 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.contact-form button {
  background: var(--accent);
  color: #181818;
  font-family: var(--font-head);
  font-weight: 700;
  border: none;
  border-radius: 2em;
  padding: 0.7em 2em;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.contact-form button:hover {
  background: var(--green);
  color: #fff;
}

/* Kalkulačka */
.fuel-calc {
  background: #232323;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2rem 1.5rem 2rem;
  max-width: 400px;
  margin: 0 auto 2rem auto;
}
.fuel-calc h2 {
  margin-top: 0;
}
#calc-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#calc-form input {
  background: #181818;
  border: 1.5px solid #444;
  border-radius: 0.7em;
  color: #fff;
  font-size: 1em;
  padding: 0.8em 1em;
  font-family: var(--font-main);
  transition: border 0.2s;
}
#calc-form input:focus {
  border-color: var(--accent);
  outline: none;
}
#calc-form button {
  background: var(--accent);
  color: #181818;
  font-family: var(--font-head);
  font-weight: 700;
  border: none;
  border-radius: 2em;
  padding: 0.7em 2em;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#calc-form button:hover {
  background: var(--green);
  color: #fff;
}
#calc-result {
  margin-top: 1.2em;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1em;
}

/* Animace */
.animated-fadein {
  opacity: 0;
  animation: fadeInUp 1s 0.2s both;
  animation-play-state: paused;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Footer */
footer {
  background: #232323;
  color: #aaa;
  text-align: center;
  padding: 2rem 0 1rem 0;
  font-size: 1em;
  margin-top: 3rem;
  border-top: 1px solid #333;
}

/* Responzivita */
@media (max-width: 700px) {
  main {
    padding: 1.2rem 2vw 1rem 2vw;
  }
  .hero-content {
    padding: 7vw 2vw 2vw 2vw;
    max-width: 100%;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .references-layout {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 2vw;
  }
  .references-sidebar {
    max-width: 100%;
    width: 100%;
    margin-top: 1.5rem;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
  }
  .contact-flex {
    flex-direction: column;
    gap: 1.2rem;
  }
  .contact-form, .fuel-calc {
    max-width: 100%;
    padding: 1.2rem 1rem 1rem 1rem;
  }
  .lightbox img {
    max-width: 98vw;
    max-height: 60vh;
  }
  .lightbox-arrow.left { left: 1vw; }
  .lightbox-arrow.right { right: 1vw; }
  .lightbox-close { top: 1vw; right: 1vw; }
}
@media (max-width: 1100px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
}