@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');

/* Základní nastavení */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    padding-top: 80px; /* Přidáme padding, aby se obsah neposouval pod přilepený header */
  }

  h1, h2, h3 {
    font-weight: 700;
  }

  .navbar {
    height: 80px; /* Uprav výšku podle skutečné velikosti navigace */
  }

  .scrolled header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* Jemná bílá čára */
    background-color: rgba(51, 51, 51, 0.9); /* Lehce průhledná barva */
    height: 60px;
  }

  header {
    transition: all 0.3s ease-in-out;
    border-bottom: 2px solid transparent; /* Na začátku neviditelné */
    position: fixed; /* Přilepení pruhu */
    top: 0;
    left: 0;
    width: 100%;
    background-color: #333; /* Tmavě šedá barva */
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    z-index: 1000; /* Zajištění, že bude vždy nad ostatními prvky */
  }

  /* Když se stránka posune a aktivuje se třída .scrolled */
  .scrolled header .logo {
    width: 170px;
    transform: translateY(0) translateX(0);
  }

  .logo {
    width: 340px; /* Dvojnásobná velikost při načtení */
    transition: width 0.3s ease, transform 0.3s ease;
    transform: translateY(30px) translateX(-40px); /* Posuneme logo dolů o 20px a doleva o 10px */
    cursor: pointer; /* Ikona ruky při najetí */
  }
  
  header .logo img {
    max-height: 50px;
  }
  
  header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-right: 40px;
    display: flex;
    gap: 20px;
  }
  
  header nav ul li a {
    font-size: 1.2em; /* Původně bylo menší, teď zvětšíme */
    padding: 12px 20px; /* Větší mezery kolem textu */
    font-weight: bold;
    text-transform: uppercase; /* Pro lepší čitelnost */
    transition: transform 0.3s ease, font-size 0.3s ease;
    color: white;
    text-decoration: none; /* Odstraní podtržení */
  }

  nav ul li a:hover {
    color: #d9534f; /* Červený odstín */
    transition: color 0.5s ease-in-out;
    font-size: 1.3em; 
  }

  @font-face {
    font-family: "StencilCustom";
    src: url("fonts/stencil.ttf") format("truetype");
  }

  .fade-in-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
  }
  
  .fade-in-text:nth-child(1) {
    animation-delay: 0.5s; /* Zpoždění animace pro hlavní nadpis */
  }
  
  .fade-in-text:nth-child(2) {
    animation-delay: 1s; /* Zpoždění animace pro podnadpis */
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(-30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  section {
    padding: 80px 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    scroll-margin-top: 80px;
  }
    
  .container {
    max-width: 1200px; /* Maximální šířka obsahu */
    margin: 0 auto; /* Zarovnání na střed */
    padding: 40px 20px; /* Horní a dolní mezera + boční odsazení */
  }

  .hero {
    height: calc(80vh - 80px);  /* 100% výšky obrazovky mínus navigace */
    text-align: center;
    background-color: #333; /* Antracitová barva */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh; /* Lehce menší sekce než předtím */
  }
  
  .hero h1 {
    font-family: "StencilCustom", sans-serif;
    font-size: 6em; /* Zvětší nadpis */
    text-transform: uppercase; /* Velká písmena pro větší efekt */
    line-height: 1.2; /* Upravení rozestupů */
    letter-spacing: 0.1em; /* Zvětší mezeru mezi písmeny */
  }
  
  .hero p {
    font-size: 2em;
    max-width: 850px; /* Omezí šířku textu pro lepší čitelnost */
    margin: 0 auto;
    color: #fff;
    line-height: 1.4;
    letter-spacing: 0.05em; /* Možná změna mezery mezi písmeny */
    word-spacing: 0.8em; /* Zvětší mezeru mezi slovy */
    font-weight: bold;
    text-transform: uppercase;
  }

  /* Kontejner sekce */
  #services {
    text-align: center;
    padding: 0;
    background-color: #f9f9f9;
  }

  /* Kontejner sekce */
  .services {
    display: flex;
    width: 100%;
    height: 400px;
    margin: 0;
    padding: 0;
  }

  /* Obecný styl pro obě sekce */
  .service-card {
    position: relative;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    text-transform: uppercase;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    overflow: hidden;
  }

  .windows, .roof {
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
  }

  /* Levá sekce – Okna a dveře */
  .windows {
    width: 50%;
    height: 100%;
    background-image: url('okno2.jpg');
    background-size: cover;
    background-position: center;
    /* Pravý okraj je diagonálně zkosený z pravého horního rohu do bodu 95% dole */
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
  }

  /* Pravá sekce – Střechy */
  .roof {
    width: 50%;
    height: 100%;
    background-image: url('roof.jpg');
    background-size: cover;
    background-position: center;
    /* Levý okraj je diagonálně zkosený z bodu 5% nahoře do 0 100% */
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
  }

  /* Animace při hoveru */
  .service-card:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
  }

  /* Nadpisy ve středu sekcí */
  .service-title {
    position: absolute;
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  /* Popis (na začátku skrytý) */
  .service-description {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease 0.2s, visibility 0.5s ease 0.2s, transform 0.5s ease 0.2s;
    font-size: 0.6em; /* Menší a decentnější text */
    max-width: 70%;
    background: rgba(0, 0, 0, 0.5); /* Jemné pozadí pro lepší čitelnost */
    padding: 10px;
    border-radius: 8px;
    transform: translateY(10px); /* Mírné odsazení dolů pro efekt */
  }

  /* Efekt při najetí myší */
  .service-card:hover .service-title {
    opacity: 0;
    transform: translateY(-10px);
  }

  .service-card:hover .service-description {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px; /* případný vnitřní odsazení */
  }

  .gallery img {
    width: 100%;
    height: 250px; /* nastav jednotnou výšku, podle potřeby můžeš změnit */
    object-fit: cover; /* zajistí správné oříznutí a zachování poměru */
    border-radius: 8px; /* jemné zaoblení rohů */
    transition: transform 0.3s ease;
  }

  .gallery img:hover {
    transform: scale(1.05);
  }

  /* Lightbox overlay */
  .lightbox {
    display: none; /* Skryté, dokud nebude aktivní */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
  }

  /* Styl pro obrázek v lightboxu */
  .lightbox-content {
    display: block;
    margin: 5% auto;
    max-width: 90%;
    max-height: 80%;
  }

  /* Zavírací tlačítko */
  .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
  }

  .close:hover,
  .close:focus {
    color: #bbb;
  }

  /* Šipky pro navigaci */
  .prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    padding: 16px;
    user-select: none;
    transition: color 0.3s;
  }

  .prev:hover, .next:hover {
    color: #bbb;
  }
  .prev {
    left: 20px;
  }
  .next {
    right: 20px;
  }

  .image img {
    transition: transform 0.3s ease-in-out;
  }
  
  .image img:hover {
    transform: scale(1.05);
  }

  /* Efekt fade-in */
  .fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s, transform 1s;
  }
  
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Kontejner pro kontaktní skupiny */
  #contact .contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
  }

  /* Každá kontaktní skupina */
  #contact .contact-group {
    flex: 1;
    min-width: 280px;  /* Zajišťuje vhodnou šířku na menších obrazovkách */
    max-width: 400px;
    background: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  #contact .contact-group .contact-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #222;
    font-weight: 700;
  }  

  /* Nadpis pro jednotlivé skupiny */
  #contact .contact-group h3 {
    margin-top: 0;
    color: #333;
  }

  /* Úprava odstavců uvnitř skupiny */
  #contact .contact-group p {
    margin: 10px 0;
    font-size: 1em;
    color: #555;
  }

  footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 10px 20px;
    margin-top: 20px;
  }

  html {
    scroll-behavior: smooth;
  }
  