/* General styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.page-container {
    max-width: 1300px; /* Nastav max šířku stránky */
    margin: 0 auto; /* Vycentrování stránky */
    background-color: #84a1bf; /* Bílé pozadí pro obsah */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Stín pro oddělení od pozadí */
    border-radius: 8px; /* Hezky zaoblené rohy */
}
.page-container2 {
    max-width: 1300px; /* Nastav max šířku stránky */
    margin: 0 auto; /* Vycentrování stránky */
    background-color: #ffffff; /* Bílé pozadí pro obsah */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Stín pro oddělení od pozadí */
    border-radius: 8px; /* Hezky zaoblené rohy */
}

body {
    font-family: Arial, sans-serif;
    color: #000000;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #69808e; /* Tmavě modré pozadí */
}

h3 {
    font-size: 17px;
}

h2 {
    font-size: 25px;
    text-align: left;
    font-family: Arial;
    font-weight: bold;
    font-style: italic;
    color: #1f329b;
}

h1 {
    font-size: 45px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

p {
    font-size: 1.1em;
    color: black;
    text-align: left;
}

.main-p {
    font-size: 1em;
    color: black;
    text-align: left;
    padding-bottom: 40px;
}

.container {
    position: relative; /* Důležité pro překrytí textu přes obrázek */
    width: 100%;
    max-width: 800px;
    margin: 55px auto;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.container img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.6); /* Tmavší obrázek pro lepší čitelnost textu */
}

.text {
    position: absolute; /* Absolutní pozice pro překrytí obrázku */
    bottom: 0;
    left: 0;
    width: 100%;
    background: #5a6d7e; /* Poloprůhledné černé pozadí */
    padding: 20px;
    box-sizing: border-box;
    text-align: left; /* Zarovná text vlevo */
}

.text h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.text p {
    font-size: 1rem;
    margin: 5px 0;
    line-height: 1.5;
    color: #ffffff;
}

.text ul {
    padding-left: 20px;
    list-style-type: disc;
}

.section {
    max-width: 900px;
    margin: 20px 0;
}

.contact-box {
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f4f4f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.calc-section {
    max-width: 900px;
    margin-top: 65px;
    margin-bottom: 65px;
}

.hero-header {
    background-image: url('images/header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    text-align: center;
    filter: brightness(0.8);
    margin: 0 auto; /* Vycentrování na střed */
    color: #1a276f;
}

nav {
    display: flex;
    justify-content: left;
    gap: 25px;
    padding: 10px;
    padding-left: 15px;
    background: #222264;
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:focus {
    outline: 2px solid #ffffff;
}

.top-bar {
    background-color: #000000;
    padding: 1px;
    padding-left: 15px;
    text-align: left;
    font-size: 12px;
    color: #ffffff;
}

.top-bar p {
    color: #ffffff;
}

.lower-bar {
    background-color: #222264;
    padding: 5px;
}

main {
    padding: 20px;
    text-align: center;
    max-width: 800px;
    margin: auto;
}

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

footer p {
    color: white;
}

/* Services Section - Using Grid */
section#services {
    margin: 20px 0;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

section#services h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    width: 100%;
}

/* Service item styles */
.service {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.service img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    text-align: left;
}

.text-overlay h3 {
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
}

.text-overlay p {
    margin: 5px 0 0;
    font-size: 1em;
}

.service:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal:target {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-content ul li {
    background-color: #f1f1f1;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    color: #222;
    line-height: 1.5;
}

.modal-content ul li:before {
    content: "✔"; /* Symbol před každou položkou */
    color: #1f329b;
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
}
.carousel {
        position: relative;
        max-width: 100%;
        text-align: center;
    }

    .carousel img {
     max-width: 100%;
    height: auto;
    }

    .carousel-control {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(36, 110, 198, 0.5);
        color: #ffffff;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        padding: 10px;
        border-radius: 50%;
    }

    .carousel-control.prev {
        left: 10px;
    }

    .carousel-control.next {
        right: 10px;
    }

    .carousel-control:hover {
        background-color: rgba(6, 9, 105, 0.8);
    }

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1f329b;
    font-family: Arial, sans-serif;
    font-style: italic;
    font-weight: bold;
}

.modal-content {
    padding: 24px;
    background-color: white;
    border-radius: 8px;
    max-width: 600px;
    text-align: left;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    text-decoration: none;
    color: #000;
}
.container .text {
    color: #000; /* Černý text */
    padding: 15px;
    border-radius: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    section#services {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    section#services {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column; /* Obrázek a text půjdou pod sebe */
    }

    .text {
        position: static; /* Odstraní absolutní pozicování na malých zařízeních */
        background: #5a6d7e; /* Odstraní černé překrytí pro čitelnost */
        padding: 10px; /* Přidá odsazení kolem textu */
    }

    .container img {
        filter: none; /* Odstraní tmavý filtr pro lepší čitelnost */
    }
}