html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll from dividers */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    width: 100%;
    padding: 0 30px;
    box-sizing: border-box;
}

.narrow-container {
    max-width: 800px;
}

/* Top Contact Bar */
.top-contact-bar {
    background-color: #004d40;
    color: #ecf0f1;
    padding: 10px 0;
    font-size: 0.9em;
    text-align: right;
}

.top-contact-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-contact-bar a {
    color: #ecf0f1;
    text-decoration: none;
}

.top-contact-bar a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: #FFFFFF;
    color: #333;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: #34495e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
    text-transform: uppercase;
}

nav ul li a:hover,
nav ul li a.active {
    color: #2ecc71;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #2ecc71;
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 0%;
    background-attachment: fixed;
    filter: brightness(0.6);
    z-index: -1;
    -webkit-transform: translate3d(0, 0, 0); /* Pro starší verze Webkit */
    transform: translate3d(0, 0, 0); /* Standard */
}

.hero .container {
    position: relative;
    z-index: 1;
    padding: 20px;
    border-radius: 8px;
    max-width: 900px;
    text-align: left;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero p {
    font-size: 1.4em;
    margin-bottom: 30px;
}

.button {
    display: inline-block;
    background-color: #2ecc71;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

.button-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

/* General Section Styling */
.section-padded {
    padding: 100px 0 80px 0;
    position: relative;
}

.section-padded h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #34495e;
    font-weight: 400;
}

.section-intro {
    font-size: 1.1em;
    margin-bottom: 50px;
    color: #555;
}

.bg-light {
    background-color: #f9f9f9;
}

/* Section Divider */
.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 10;
    transform: translateY(-100%);
}

#sluzby.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23f9f9f9' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#reference.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23ffffff' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#galerie-reference.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23f9f9f9' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#certifikaty.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23ffffff' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#cenik.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23f9f9f9' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#kontakt.section-divider::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23ffffff' d='M0,32L120,42.7C240,53,480,75,720,74.7C960,75,1200,53,1320,42.7L1440,32L1440,80L1320,80C1200,80,960,80,720,80C480,80,240,80,120,80L0,80Z'%3E%3C/path%3E%3C/svg%3E");
}

#o-mne {
    background-color: rgba(0, 77, 64, 0.9);
    color: white;
}
#o-mne h2 {
    color: white;
}

#kontakt {
    position: relative;
    background-image: url('pozadi2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    z-index: 1;
    padding: 80px 0;
}

#kontakt::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 45, 36, 0.75);
    z-index: -1;
}

#o-mne .container,
#kontakt .container {
    position: relative;
    z-index: 2;
}

#kontakt h2,
#kontakt .section-intro,
#kontakt .contact-info,
#kontakt .contact-info a {
    color: white;
}

#kontakt .contact-info a:hover {
    text-decoration: underline;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 250px;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    display: block;
    margin: 0 auto;
}

/* New Team Section Styling (Updated) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.team-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Umožní posun vnořeného obrázku */
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* KONKRÉTNÍ ÚPRAVA PRO TÝM - KLIKATELNÝ OBRÁZEK */
.team-card-image-wrapper {
    display: inline-block; /* Zajistí, že obal nebude roztažený */
    cursor: pointer; /* Indikuje klikatelnost */
    border-radius: 50%;
    overflow: hidden; /* Pro oříznutí rámečku */
    transition: transform 0.3s ease;
}

.team-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%; /* Kruhový obrázek */
    margin-bottom: 15px;
    border: 4px solid #2ecc71; /* Zelený rámeček */
    display: block;
    margin-left: auto;
    margin-right: auto;
    position: relative; /* Umožní posun */
    transition: transform 0.3s ease; /* Plynulý přechod pro transform */
}

/* Speciální styl pro Petra Šuchmana: posun obrázku mírně dolů a doprava */
.team-card-petr img {
    transform: translate(5px, 5px); /* Posun 5px doprava a 5px dolů */
}

.team-card h3 {
    color: #34495e;
    font-size: 1.6em;
    margin-bottom: 5px;
    font-weight: 700;
}

.team-card p {
    color: #555;
    font-size: 1.1em;
    font-style: italic;
    margin-top: 0;
}

/* Services Section */
#sluzby h2, #sluzby .section-intro {
    text-align: center;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-item {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-item h3 {
    color: #34495e;
    font-size: 1.8em;
    margin-top: 15px;
    margin-bottom: 15px;
    font-weight: 400;
    line-height:100%;
}

.service-item ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-top: 15px;
}

.service-item ul li {
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
}

.service-item ul li:last-child {
    border-bottom: none;
}

.service-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* References Section */
.reference-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.reference-list {
    list-style: disc;
    padding-left: 20px;
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    margin-bottom: 30px;
    font-size: 1.1em;
    flex: 1; /* Allows the list to grow */
    min-width: 300px;
}
#map-container {
    flex: 1; /* Allows the map container to grow */
    min-width: 300px;
    height: 400px; /* Adjust height as needed */
    background-color: #e0e0e0; /* Placeholder color for the map */
    border-radius: 8px;
}
.reference-more {
    margin-top: 30px;
    font-style: italic;
    color: #666;
}

/* Certifications Section (ÚPRAVA PRO 4 V RÁDKU) */
#certifikaty .cert-download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 sloupce */
    gap: 20px;
}

#certifikaty .cert-download-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

#certifikaty .cert-download-item h3 {
    color: #34495e;
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 400;
}

#certifikaty .cert-download-item p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 20px;
    display: block;
}

/* Pricing Section */
#cenik ul {
    list-style: disc;
    padding-left: 20px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

#cenik ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Contact Section specific (FORM STYLES ADDED) */
.contact-info {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2em;
}

.contact-info p {
    margin: 5px 0;
}

/* Form styles */
.contact-form-container {
    background-color: #f4f4f4; /* Světlejší pozadí pro formulář */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #34495e; /* Tmavá barva popisku */
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Zajišťuje, že padding a border nemění šířku */
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #2ecc71;
    outline: none;
}

/* Honeypot styl - Skrytí pole pro lidi */
.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    visibility: hidden;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Úprava barvy textu ve formuláři, protože je na tmavém pozadí */
#kontakt .contact-form-container,
#kontakt .form-group label {
    color: #333; /* Změna barvy pro čitelnost na světlém pozadí kontejneru */
}


/* Gallery Grid Styling */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 3 fotky na řádek pro širší displeje */
    gap: 20px; /* Mezery mezi fotkami */
    margin-top: 50px;
}

.gallery-item {
    width: 100%; /* Zajistí, že se obrázek roztáhne v rámci buňky gridu */
    height: 200px; /* Pevná výška pro jednotný vzhled */
    object-fit: cover; /* Ořízne obrázky tak, aby vyplnily prostor bez deformace */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Indikuje, že je obrázek klikatelný */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}


/* Gallery Modal */
.modal {
    display: none; /* Skryto ve výchozím stavu */
    position: fixed; /* Zůstává na místě */
    z-index: 2000; /* Sedí nahoře */
    padding-top: 60px; /* Umístění shora */
    left: 0;
    top: 0;
    width: 100%; /* Plná šířka */
    height: 100%; /* Plná výška */
    overflow: auto; /* Povolit posouvání, pokud je obsah příliš velký */
    background-color: rgba(0,0,0,0.9); /* Černá se zmenšenou průhledností */
}

/* Modal Content (image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80%; /* Omezí výšku pro lepší zobrazení na menších obrazovkách */
    object-fit: contain; /* Zajistí, že se obrázek vejde do kontejneru */
}

/* Caption of Modal Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* The Close Button */
.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Animation */
.modal-content, #caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
    from {-webkit-transform:scale(0)}
    to {-webkit-transform:scale(1)}
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}


/* Responsive Design */
@media (max-width: 1200px) {
    /* Pro certifikace na menších obrazovkách (např. 2 na řádek) */
    #certifikaty .cert-download-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 15px;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1.1em;
    }

    .about-content,
    .team-content,
    .reference-content {
        flex-direction: column;
    }

    .about-text,
    .about-image,
    .team-list,
    .team-image,
    .reference-list,
    #map-container {
        min-width: unset;
        width: 100%;
    }

    /* Zrušení posunu obrázku Petra Šuchmana na mobilu */
    .team-card-petr img {
        transform: translate(0, 0);
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .section-padded {
        padding: 70px 15px 50px 15px;
    }
    
    #o-mne.section-padded, #kontakt.section-padded {
        padding: 30px 15px;
    }

    .section-padded h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .section-intro {
        margin-bottom: 30px;
    }

    .reference-list {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 2 fotky na řádek pro tablety */
    }

    /* Certifikace 1 na řádek na mobilech */
    #certifikaty .cert-download-grid {
        grid-template-columns: 1fr; 
    }

    .modal-content {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .top-contact-bar .container {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    .top-contact-bar span {
        font-size: 0.8em;
    }

    .hero {
        height: 450px;
    }

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

    .hero p {
        font-size: 0.9em;
    }

    .button {
        padding: 12px 20px;
        font-size: 0.9em;
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* 1 fotka na řádek pro mobily */
    }
}