:root {
  --background-color: hsl(165, 100%, 99%);
  --background-color-darker: hsl(0, 0%, 90%);

  --text-color: hsl(0, 0%, 1%);

  --primary-color: hsl(360, 100%, 55%);

  --secondary-color: hsl(125, 40%, 48%);

  --gradient: linear-gradient(90deg, hsl(329, 100%, 36%), hsl(360, 100%, 55%));
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  font-family: "komet", sans-serif;
  font-weight: 400;
  font-style: normal;
  width: 100%;
}

.komet {
  font-family: "komet", sans-serif;
}

.gunter {
  font-family: "gunter", sans-serif;
}

/* Hlavní kontejner navigace */
.nav-container {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.7);

  /* Samotný efekt rozmazání */
  backdrop-filter: blur(10px);

  /* Podpora pro starší Safari prohlížeče */
  -webkit-backdrop-filter: blur(10px);

  /* Fixní pozice nahoře, aby při scrollování bylo pod navigací co rozmazávat */
  position: sticky;
  top: 0;
  z-index: 1000;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

nav {
  user-select: none; /* Zakáže výběr textu v navigaci */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  opacity: 0;
  transition:
    opacity 0.5s ease-in-out,
    box-shadow 0.6s ease-in-out;
}

nav.scrolled {
  /* Tady definujeme tvůj původní stín */
  box-shadow:
    10px 10px 30px rgba(61, 61, 61, 0.2),
    inset 5px 5px 10px rgb(90, 90, 90);
}

/* Logo - zabere místo vlevo */
.nav-logo {
  flex: 1; /* Tato část říká: "Vezmi si dostupný prostor vlevo" */
  display: flex;
  justify-content: flex-start;
  margin-left: 50px;
}

/* Hlavní menu - bude přesně uprostřed */
.nav-links {
  flex: 2; /* Větší váha pro střední část */
  display: flex;
  justify-content: center;
}

.nav-links ul {
  list-style-type: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

/* Kontakt - zabere místo vpravo */
.nav-contact {
  flex: 1; /* Tato část říká: "Vezmi si dostupný prostor vpravo" */
  display: flex;
  justify-content: flex-end;
  margin-right: 50px;
  align-items: center;
}

/* Styl pro odkazy, aby vypadaly čistě */
nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

.active-link {
  color: var(--primary-color);
  transition: color 0.3s ease-in-out;
}

nav a:hover {
  color: var(--primary-color);
  transition: color 0.3s ease-in-out;
}
.kontakt {
  padding: 10px 20px;
  background: var(--gradient);
  border-radius: 10px;
  color: white;
  transition: transform 0.3s ease-in-out;
  box-shadow: 0px 0px 30px rgba(61, 61, 61, 0.3);
}

.kontakt:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
}

#language-switcher {
  margin-right: 20px;
}

.hero-section {
  height: 700px;
  display: flex;
  flex-direction: column; /* Změna na column, aby šly prvky pod sebe */
  justify-content: start; /* Vycentrování vertikálně */
  align-items: center; /* Vycentrování horizontálně */
  padding-top: 0;
  padding-top: 80px; /* Odstranění horního paddingu, pokud chceš přesný střed */
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.hero-section h2 {
  width: 100%;
  font-size: 2rem;
  color: var(--text-color);
  font-weight: 300;
}

.bgText {
  position: absolute;
  top: 20px;
  line-height: 10px;
  width: 100%;
  font-size: 10rem;
  color: var(--text-color);
  font-weight: 900;
  text-align: center;
  z-index: -1;
  user-select: none;
  letter-spacing: 50px;
  text-shadow: 10px 10px 30px rgba(61, 61, 61, 0.2);
}

.outline-text {
  color: transparent; /* Průhledný vnitřek textu */
  -webkit-text-stroke: 5px var(--text-color); /* Tloušťka a barva obrysu */
}

.hero-section img {
  width: 700px;
  height: auto;
  margin-top: 20px;
  z-index: 100;
  position: absolute;
  bottom: 0;
}

.about {
  margin-left: 50px;
  margin-right: 50px;
  width: 100%;
  min-width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.colum1 {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 30%;
  margin-top: 40px;
  margin-bottom: 40px;
}

.colum2 {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 30%;
  margin-top: 40px;
  margin-bottom: 40px;
}

.colum3 {
  display: flex;
  flex-direction: column;
  align-items: space-between;
  width: 30%;
  margin-top: 40px;
  margin-bottom: 40px;
  overflow: hidden;
}

.colum1 .aboutImg {
  width: 400px;
  height: auto;
  border-radius: 20px;
  transform: rotate(-2deg);
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.1);
  filter: brightness(0.8) blur(0.2px);
  transition:
    transform 0.5s ease-in-out,
    filter 0.5s ease-in-out,
    box-shadow 0.6s ease-in-out;
}

.about .colum1 h3 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 0;
}

.about .colum1 ul li {
  font-size: 1rem;
  line-height: 1.5rem;
  margin-top: 10px;
}

.about .colum2 h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 900;
}

.about .colum2 ul {
  padding: 0;
}

.about .colum2 li {
  width: fit-content;
  font-size: 1.2rem;
  line-height: 2rem;
  margin-top: 20px;
  border-bottom: 1px solid var(--text-color);
}

.about .colum3 h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 900;
}

.about .colum3 ul {
  padding: 0;
}

.about .colum3 li {
  width: fit-content;
  font-size: 1.2rem;
  line-height: 2rem;
  margin-top: 20px;
  border-bottom: 1px solid var(--text-color);
}

.colum1 .aboutImgActive {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.5);
  filter: brightness(1.1);
  transition:
    filter 0.5s ease-in-out,
    transform 0.5s ease-in-out,
    box-shadow 0.6s ease-in-out;
}

.top-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0px 8px rgba(0, 0, 0, 0.5);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1000;
}

.top-button:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
}

.top-button span {
  font-size: 24px;
  line-height: 50px;
}

.top-button:hover span {
  animation: buttonHop 1s ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes buttonHop {
  0% {
    transform: translateY(2px);
  }
  25% {
    transform: translateY(-4px);
  }
  50% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Definice animace */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px); /* Prvek začne o 30px níže */
  }
  100% {
    opacity: 1;
    transform: translateY(0); /* Skončí na své pozici */
  }
}

/* Třída, kterou dostanou prvky pro animaci */
.reveal-init {
  opacity: 0; /* Na začátku jsou neviditelné */
}

/* Tuto třídu přidáme pomocí JS po načtení */
.is-loaded .reveal-init {
  animation: fadeInUp 0.8s ease out forwards;
}

/* Přidáme zpoždění pro jednotlivé položky, aby se objevovaly postupně (stagger efekt) */
.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}

.portfolio {
  padding-left: 50px;
  padding-right: 50px;
  padding-top: 40px;
  margin-bottom: 100px;
  height: fit-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-wrap: wrap;
  opacity: 1;
  gap: 20px;
  transition: box-shadow 0.5s ease-in-out;
  box-shadow: 0px 0px 20px rgba(61, 61, 61, 0.2);
}

.portfolio ul {
  text-align: center;
  list-style-type: none;
  display: flex;
  gap: 100px;
  width: 100%;
  justify-content: center;
  margin: auto;
  padding: 0;
  margin-bottom: 30px;
}

.portfolio-link {
  text-align: center;
  font-family: "gunter", sans-serif;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s ease-in-out;
  letter-spacing: 5px;
}

.portfolio-table a {
  text-decoration: none;
}

.portfolio-table a {
  border-bottom: 0px solid transparent;
}

.portfolio-link:hover {
  color: var(--primary-color);
  transition: color 0.3s ease-in-out;
}

.portfolio-link.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 5px;
  transition: color 0.3s ease-in-out;
}

/* Styl pro celou tabulku */
.portfolio-table {
  width: 100%;
  border-collapse: separate; /* Aby fungoval border-radius a spacing */
  border-spacing: 20px; /* Nahrazuje 'gap' u flexboxu */
  table-layout: fixed; /* Zajistí, že sloupce budou stejně široké */
  margin-bottom: 40px;
}

.portfolio-item {
  /* Odebrán flexbox, tabulka se o zbytek postará */
  vertical-align: top; /* Zarovnání obsahu buněk nahoru */
  background-color: var(--background-color-darker);
  border-radius: 20px;
  box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: left;
  
  /* Animace zůstávají */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Hover efekt musí být na TD (buňce) */
.portfolio-item:hover {
  transform: scale(1.008);
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.2);
}

/* Obrázky a videa uvnitř tabulky */
.portfolio-item img, 
.portfolio-item video,
.portfolio-item iframe {
  width: 100%;
  height: auto;
  border-radius: 15px;
  display: block; /* Odstraní mezeru pod obrázkem */
}

.portfolio-item h3 {
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
}

.portfolio-item h3 {
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
}

p a {
  color: var(--primary-color);
  font-weight: bold;
}

footer {
  width: 100%;
  height: 60px;
  background: var(--gradient);
  display: flex;
  color: var(--background-color);
  justify-content: center;
  align-items: center;
  box-shadow: inset 0px 5px 10px rgba(0, 0, 0, 0.1);
  margin-top: 50px;
}

.contact-section {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-form {
  background: var(--background-color);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.5); /* Jemný stín jako u nav */
}

.form-group {
  margin-bottom: 20px;
}

form {
  padding-top: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color); /* Barva z tvé navigace */
}

.submit-btn {
  background: var(--gradient);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.submit-btn:hover,
.reset-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reset-btn {
  background-color: var(--text-color);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  margin-left: 15px;
}

/* ============================================================
   RESPONZIVNÍ STYLY PRO MOBILNÍ ZAŘÍZENÍ
   Breakpoint 768px = tablet a menší
   Breakpoint 480px = malé telefony
   ============================================================ */

@media (max-width: 768px) {

  /* --- NAVIGACE ---
     Na mobilu skryjeme prostřední menu a přeskládáme na 2 řádky */
  .nav-container {
    flex-wrap: wrap;       /* Dovolí zalomení na nový řádek */
    padding: 8px 0;
  }

  /* Logo zabere celou šíři, kontakt jde na stejný řádek */
  .nav-logo {
    flex: 1;
    margin-left: 15px;    /* Menší odsazení na mobilu */
  }

  .nav-logo h1 {
    font-size: 1.1rem;    /* Menší název */
    margin: 5px 0;
  }

  /* Prostřední menu schováme – na malé obrazovce by se nevešlo */
  .nav-links {
    display: none;
  }

  /* Kontakt (CZ/EN + tlačítko) zůstane vpravo */
  .nav-contact {
    flex: 1;
    margin-right: 15px;
    justify-content: flex-end;
  }

  .kontakt {
    padding: 8px 14px;    /* Menší tlačítko kontakt */
    font-size: 0.85rem;
  }

  #language-switcher {
    margin-right: 10px;
    font-size: 0.85rem;
  }

  /* --- HERO SEKCE ---
     Obrovský bgText by přetekl přes celou obrazovku */
  .hero-section {
    height: auto;
    min-height: 300px;
    padding-top: 60px;    /* Nav má fixní výšku ~50px, trochu prostoru navíc */
    padding-bottom: 20px;
  }

  .hero-section h2 {
    font-size: 1.2rem;    /* Menší pozdrav */
    text-align: center;
    padding: 0 20px;
  }

  /* Velký text na pozadí – zmenšíme drasticky */
  .bgText {
    position: relative;   /* Vyjmeme z absolutní pozice, ať netlačí obsah */
    top: auto;
    font-size: 3rem;      /* Z 10rem na 3rem */
    letter-spacing: 10px; /* Z 50px na 10px */
    line-height: normal;
  }

  .bgText h3.gunter {
    font-size: 4rem !important; /* Byl 16rem – na mobilu nereálné */
  }

  /* Obrázek v hero sekci skryjeme nebo zmenšíme */
  .hero-section img {
    width: 90%;           /* Místo fixních 700px */
    position: relative;   /* Vyjmeme z absolute, ať netlačí přes text */
    bottom: auto;
    margin-top: 10px;
  }

  /* --- ABOUT SEKCE ---
     Tři sloupce vedle sebe → jeden pod druhým */
  .about {
    flex-direction: column;  /* Sloupce pod sebe */
    align-items: center;
    margin-left: 20px;       /* Menší okraje */
    margin-right: 20px;
    width: auto;
    min-width: unset;
  }

  .colum1,
  .colum2,
  .colum3 {
    width: 100%;             /* Každý sloupec zabere plnou šíři */
    margin-top: 20px;
    margin-bottom: 10px;
  }

  /* Fotka v about – zarovnáme a zrušíme otočení */
  .colum1 .aboutImg {
    width: 100%;
    transform: rotate(0deg); /* Na mobilu rotace působí divně */
  }

  /* --- PORTFOLIO ---
     Tabulka se třemi sloupci je na mobilu nepoužitelná */
  .portfolio {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 20px;
    margin-bottom: 50px;
  }

  /* Menu kategorií portfolia – zmenšíme mezery a font */
  .portfolio ul {
    gap: 20px;             /* Z 100px na 20px */
    flex-wrap: wrap;       /* Zalomí, pokud se nevejde */
    margin-bottom: 15px;
  }

  .portfolio-link {
    font-size: 1.1rem;     /* Z 2rem na 1.1rem */
    letter-spacing: 2px;  /* Z 5px na 2px */
  }

  /* Tenčí obrys u "& VIDEO EDITOR" – 5px je na tabletu také dost výrazné */
  .outline-text {
    -webkit-text-stroke: 2.5px var(--text-color);
  }

  /* Klíčová změna: tabulka → blokové zobrazení
     Každá <tr> a <td> se zachová jako blok = sloupce pod sebou */
  .portfolio-table {
    display: block;        /* Tabulka se chová jako div */
    border-spacing: 0;
  }

  .portfolio-table tr {
    display: block;        /* Řádky jako bloky */
  }

  .portfolio-table td.portfolio-item {
    display: block;        /* Buňky jako bloky = každý projekt na vlastním řádku */
    width: 100%;           /* Plná šíře */
    margin-bottom: 15px;   /* Mezera mezi projekty */
    box-sizing: border-box;
  }

  /* Portfolio sekce (video, grafika...) */
  .portfolio-table a {
    display: block;        /* Aby odkaz zabral celou šíři jako buňka */
  }

  /* --- KONTAKTNÍ FORMULÁŘ --- */
  .contact-section {
    padding: 10px;
  }

  .contact-form {
    padding: 20px;         /* Z 40px na 20px */
  }

  .submit-btn,
  .reset-btn {
    width: 100%;           /* Tlačítka na plnou šíři */
    margin-left: 0;
    margin-top: 10px;
    text-align: center;
  }

  /* --- FOOTER --- */
  footer {
    height: auto;
    padding: 15px;
    text-align: center;
  }

  footer p {
    position: static !important; /* Zrušíme absolute right:50px */
    right: auto !important;
    margin: 0;
    font-size: 0.8rem;
  }

  /* --- TLAČÍTKO ZPĚT NAHORU --- */
  .top-button {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .top-button span {
    font-size: 20px;
    line-height: 40px;
  }
}

/* ============================================================
   Extra malé telefony (< 480px)
   ============================================================ */
@media (max-width: 480px) {

  .nav-logo h1 {
    font-size: 0.95rem;
  }

  .bgText h3.gunter {
    font-size: 3rem !important;
  }

  .bgText {
    font-size: 2.2rem;
    letter-spacing: 5px;
  }

  .hero-section h2 {
    font-size: 1rem;
  }

  /* Ještě menší nadpis O mně sekce */
  .about .colum2 h3,
  .about .colum3 h3 {
    font-size: 1.2rem;
  }

  .portfolio-link {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  /* Tenčí obrys u "& VIDEO EDITOR" textu – 5px je na mobilu moc tlusté */
  .outline-text {
    -webkit-text-stroke: 1.5px var(--text-color);
  }
}