/* Resetování základního stylu pro všechny prvky */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

*::-webkit-scrollbar {
    display: none; /* Skrýt scroll bar */
}

html {
    scroll-behavior: smooth;
}

/* Global Variables */
:root {
    --primary-bg: #333;
    --secondary-bg: #575757;
    --text-color: #fff;
    --h2-gallery-color: #dcdcdc;
    --p-contact-color: #85857e;
    --highlight-color: #ffd700;
    --highlight-color-small: #ff9900a2;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --hover-shadow: rgba(0, 0, 0, 0.2);
    --font-size-base: clamp(1rem, 2vw, 1.2rem);
    --font-size-small: clamp(0.9rem, 3vw, 1rem);
    --font-size-large: clamp(2.5rem, 5vw, 3.5rem);
    --margin-small: 15px;
    --padding-small: 8px 15px;
}

#SEO {
    display: none;
}

/* Navigační lišta */
#top_navigation_bar {
    background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: var(--margin-small) 0;
}

#top_navigation_bar ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 20px;
}

#top_navigation_bar ul li {
    margin: 0;
}

#top_navigation_bar ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-base);
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#top_navigation_bar ul li a:hover {
    background-color: #444;
    color: var(--highlight-color);
    box-shadow: 0 4px 6px var(--hover-shadow);
    transform: scale(1.05);
}
/* Responzivní úpravy pro galerie */
@media (max-width: 768px) {
    .photo_gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Menší sloupce pro mobil */
    }
}

/* Hlavička */
#header_styling {
    position: relative;
    height: 450px;
    background: url("sources/zem-techpic2.jpg") no-repeat center center/cover;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
}

#header_styling::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

#header_styling h1 {
    color: rgb(200, 200, 200);
    font-size: var(--font-size-large);
    font-weight: bold;
    text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.8);
    position: relative;
}

/* Sekce "O nás" */
#about {
    scroll-margin-top: 20px;
    padding: 50px 20px;
    background: #fff;
    margin: 30px auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#about h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 20px;
    color: #333;
}

#about p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    margin-bottom: 10px;
}

#about p:last-child {
    margin-bottom: 0;
}

#about a {
    color: blue;
    text-decoration: none;
}

#about a:hover {
    color: red;
    text-decoration: none;
}


/* Fotogalerie */
#gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    scroll-margin-top: 25px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}


#gallery h1 {    
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 20px;
    color: var(--text-color);
}

#gallery h2 {
    display: flex;
    flex-wrap: wrap;
    width: 300px;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: clamp(1.4rem, 3vw, 1.4rem);
    font-family: 'Lora', sans-serif;
    padding-bottom: 3px;
    color: var(--h2-gallery-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.photo_gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0 auto;
    max-width: 1200px;
}

.photo_gallery img {
    flex: 1 1 200px;
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item1 {
    height: 300px;
}
.gallery-item2 {
    height: 300px;
}

.photo_gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.modal {
    display: none; /* Skryté, dokud není otevřeno */
    justify-content: center;
    align-items: center;
    position: fixed; /* Pozice fixní vůči oknu */
    z-index: 1001; /* Nad ostatní obsah */
    left: 0;
    top: 0;
    width: 100vw; /* Šířka modálního okna na 100% */
    height: 100vh; /* Výška modálního okna na 100% */
    overflow: hidden; /* Skryje přetékající obsah */
    background-color: rgba(0, 0, 0, 0.9); /* Tmavé pozadí */
    padding: 0; /* Zajistí nulové odsazení */
}

/* Upravený styl pro obsah modálního okna */
.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%; /* Vertikální centrování */
    left: 50%; /* Horizontální centrování */
    transform: translate(-50%, -50%); /* Posun do středu */
    width: 90%; /* Šířka na menších obrazovkách */
    max-width: 900px; /* Maximální šířka obsahu */
    max-height: 90%; /* Maximální výška obsahu */
    padding: 40px; /* Přidáno odsazení uvnitř */
    border-radius: 10px; /* Přidáno zaoblení rohů */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Jemný stín pro lepší vizuální efekt */
    position: relative; /* Nové! Umožňuje pozicování potomků absolutně vůči tomuto prvku */
}

/* Styl pro navigační tlačítka v modálním okně */
.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    margin-top: 5px;
}

/* Styl pro obrázek */
#modalImage {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    margin-bottom: 20px; /* Přidáno pro oddělení obrázku od šipek */
}

#modalVideo {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}
/* Skrytí videa, když se zobrazuje obrázek */
#modalVideo {
    display: none;
    position: relative;
    
}

/* Skrytí obrázku, když se zobrazuje video */
#modalImage {
    display: none;
    position: relative;
}

#modalImage, #modalVideo {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    margin-bottom: 20px;
    position: relative; /* Zajistí, že obrázek nebo video zachová svůj kontext */
}

/* Styl pro šipky */
.arrow {
    background-color: rgba(0, 0, 0, 0.7); /* Poloprůhledné pozadí */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    pointer-events: auto; /* Povolení klikání pouze na šipky */
    z-index: 10; /* Ujistí se, že šipky jsou nad obsahem */
    border-radius: 2px;
    font-size: 1.5vh;
    transition: background-color 0.3s ease;
}

.arrow:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.close {
    position: absolute;
    top: -13px;
    right: 2px; /* Vzdálenost od pravého okraje obrázku */
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid black;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7); /* Poloprůhledné pozadí */
    border-radius: 5px;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    scroll-margin-top: 25px;
    padding: 30px 10px 0 10px;
    background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#contact h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.contact-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Umožní rovnoměrné rozložení */
    align-items: center;
    gap: 0; /* Mezera mezi sloupci */
    margin: 0 auto; /* Centrování celé sekce */
    width: 100%;
    max-width: 1200px;
}

.contact-columns > div {
    flex: 1 1 30%; /* Každý sloupec má stejné šířkové proporce */
    text-align: center; /* Zarovnejte text uvnitř sloupců na střed */
    white-space: nowrap; /* Zabrání zalomení textu na další řádek */
    color: #fff;
    margin: 5px;
}

.contact-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-columns li {
    margin-bottom: 10px;
}

span {
    font-weight: 1000;
}

.contact4 {
    margin-bottom: 10px;
}

.contact4 p:first-of-type {
    color: var(--p-contact-color);
    margin-top: -10px;
}

.contact4 p:last-of-type {
    color: var(--p-contact-color);
    margin-top: -10px;
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .contact4 {
        margin-top: 15px;
        margin-bottom: 10px;
    }
    .contact4 p:first-of-type {
        margin-top: -10px;
    }   
}

/* Tabulka cen */
#pricing h1 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 20px;
}

.pricing {
    width: 80%;
    margin: auto;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pricing_header, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

.pricing_header {
    background: var(--primary-bg);
    color: var(--text-color);
    font-size: 1.2rem;
}

.specifikace {
    font-weight: bold;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #e9e9e9;
    transition: background-color 0.3s ease;
}

/* Responzivní tabulka pro malé obrazovky (menší než 460px) */
@media (max-width: 460px) {
    .pricing {
        width: 80%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Pro lepší posouvání na iOS */
        display: block;
        touch-action: pan-x; /* Umožní hladké horizontální posouvání dotykem */
    }

    .pricing_header, td {
        padding: 8px 10px; /* Zmenšení paddingu pro menší obrazovky */
        font-size: 0.9rem; /* Snížení velikosti písma */
    }

    .pricing_header {
        font-size: 1rem; /* Zajistí, že záhlaví je čitelné */
    }

    /* Scrollbar na mobilu */
    .pricing::-webkit-scrollbar {
        display: block;
        height: 20px;
    }

    .pricing::-webkit-scrollbar-thumb {
        background: var(--primary-bg); /* Barva "thumb" scrollbar */
        border-radius: 4px;
    }

    /* Odstranění problémů s interakcí na mobilních zařízeních */
    *::-webkit-scrollbar {
        display: none;
    }

    .pricing {
        overflow-x: scroll; /* Povolit horizontální scrollování na mobilu */
    }
}


/* Responzivní úpravy pro mobil */
@media (max-width: 600px) {
    #header_styling {
        position: relative;
        max-height: 350px;
        background: url("sources/zem-techpic2.jpg") no-repeat center center/cover;
        background-size: cover;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: var(--text-color);
    }
    #header_styling h1 {
        bottom: -12px;
    }
    #top_navigation_bar ul {
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }
    #top_navigation_bar ul li a {
        font-size: var(--font-size-small);
        padding: var(--padding-small);
    }
}

/* Responzivní úpravy pro mobil menší než 400px */
@media (max-width: 400px) {
    #header_styling {
        max-height: 300px;
    }
    #top_navigation_bar ul {
        flex-direction: row;
        gap: 1px;
    }
    #top_navigation_bar ul li a {
        font-size: var(--font-size-small);
        padding: var(--padding-small);
    }
}

@media (max-width: 642px) {
    .contact-columns > div {
        padding-top: 10px;
        
        flex: 1 1 100%; /* Každý div bude mít 100% šířku */
        max-width: 100%; /* Zajistí, že se rozbalí na celou šířku */
    }
}
@media (max-width: 340px){
    .photo_gallery img {
        width: 200px;
        height: 100px;
    }
}

@media (max-width: 234px){
    .photo_gallery img {
        width: 150px;
        height: 75px;
    }
}

/* oddělání místa nad textem u fotogalerie obrazku */
@media (max-width: 654px) {
    .gallery-item1 {
        height: auto;
    }
    .gallery-item2 {
        height: auto;
    }
}