@import url('variables.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.4s ease, color 0.4s ease;
}

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Volitelné přechody pro plynulý efekt */
.theme-image {
  transition: filter 0.3s ease;
}

/* Filtr pouze pro light mód */
body.light-mode .theme-image {
  filter: brightness(1.2) contrast(0.8);
}

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0px;
}

.logo img {
  height: 50px;
  width: 50px;
}

.logo span {
  font-size: 25px;
  font-style: italic;
  font-weight: 800;
  color: var(--text);
}

/* ===== THEME SWITCH ===== */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  background-color: #2c2c2c;
  border-radius: 34px;
  position: absolute;
  inset: 0;
  cursor: pointer;
  transition: background-color 0.4s ease;
}

.theme-switch input:checked + .slider {
  background-color: #f7c948;
}

.thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}

.theme-switch input:checked + .slider .thumb {
  transform: translateX(30px);
}

.icon {
  position: absolute;
  max-width: 18px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.8);
}

.icon-sun { color: #f7c948; }
.icon-moon { color: #3333ff; }

.theme-switch input:checked + .slider .thumb .icon-sun {
  opacity: 1;
  transform: scale(1);
}
.theme-switch input:checked + .slider .thumb .icon-moon {
  opacity: 0;
}
.theme-switch input:not(:checked) + .slider .thumb .icon-moon {
  opacity: 1;
  transform: scale(1);
}
.theme-switch input:not(:checked) + .slider .thumb .icon-sun {
  opacity: 0;
}

/* ===== HERO SECTION (PARALLAX) ===== */
.hero {
  position: relative;
  height: 75vh;
  background-image: url('./../images/main_banner.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2); /* Dark overlay */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  color: var(--text);
}

.hero h1 {
  color: aliceblue;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  color: aliceblue;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.btn {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn a {
  color: #fff;
  text-decoration: none;
}

.emoji {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* ===== INFO SECTIONS ===== */
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 60px 40px;
}

.card {
  background: var(--accent);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-5px);
}

/* == INTRO SECTION == */
.intro {
  background-color: var(--bg-intro);
  color: var(--text);
  padding: 50px 20px;
  margin-bottom: 15px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1000px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
}

.intro h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text);
}

.intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.4s ease, color 0.4s ease;
}

footer p {
  color: var(--text);
}

footer a {
  color: var(--link);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .header {
    padding: 10px 10px;
  }

  .logo b {
    display: none;
  }

  .hero {
    height: 60vh;
    background-attachment: scroll; /* Problémové na mobilech */
    background-position-y: 0%;
    background-size: cover;
    padding: 20px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 15px 25px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .sections {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }

  .intro {
    padding: 30px 15px;
    margin: 0 10px 20px;
  }

  .intro h2 {
    font-size: 1.6rem;
  }

  .intro p {
    font-size: 1rem;
  }

  .logo span {
    font-size: 20px;
  }
}
