/* Reset some default browser styles */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
    margin: 0;
    padding: 0;
}

/* Set a base font size and family */
body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff; /* Changed background color to white */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.site-wrapper {
    max-width: 1200px;
    margin: auto auto 0 auto; /* Přidání horního odsazení */
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.main-content {
    margin-top: 50px; /* Nastavení horního odsazení */
    padding-bottom: 2rem;
    min-height: calc(100vh - 150px); /* Adjust the value based on your header/footer height */
}

/* Container for consistent padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
}

/* Navbar styles */
.navbar {
    margin-bottom: 20px;
    padding: 0;
    background-color: #f8f9fa;
}

.navbar-nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navbar-nav .nav-item {
    padding: 0 15px;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: bold; /* Made the text bold */
    padding: 10px 15px; /* Reduced padding */
    font-size: 1em; /* Reduced font size */
}

.navbar-nav .nav-link:hover {
    color: #007bff;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* Paragraphs */
p {
    margin-bottom: 20px;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

header {
    padding: 1rem 0;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header img {
    max-height: 42px;
    width: auto;
    display: block;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-left: auto;
}

/* Contact page styles */
.contact-page {
    padding: 2rem 0;
}

.contact-page .card {
    height: 100%;
    transition: transform 0.2s;
}

.contact-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-page .card-title {
    color: #007bff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-page .card-text {
    margin-bottom: 1rem;
}

.contact-page .card-text:last-child {
    margin-bottom: 0;
}

.contact-page strong {
    color: #495057;
}

.popup-form {
    position: fixed;
    right: 29%;
    top: 80%;
    transform: translate(50%, -50%);
    width: 300px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px; 
    padding: 20px;
    z-index: 1000;
}

/* Add this new style */
.main-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: calc(100vh - 150px); /* Adjust the value based on your header/footer height */
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-content {
    padding: 0 15px;
}

#post-65 {
    margin-top: 0;
    padding-top: 0;
}

/* Service page specific styles */
.container h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

.container h2 {
    color: #34495e;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.container ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.container ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.container ul li:before {
    content: "•";
    color: #28a745; /* Changed from #007bff (blue) to #28a745 (green) */
    position: absolute;
    left: 0;
}

.contact {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.carousel {
    margin-bottom: 30px;
}

.carousel-item {
    height: 400px; /* Pevná výška pro všechny slidy */
}

.carousel-item img {
    object-fit: cover; /* Zajistí, že obrázek vyplní celý prostor bez deformace */
    height: 100%;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5); /* Poloprůhledné pozadí pro lepší čitelnost textu */
    padding: 20px;
    border-radius: 5px;
}

.carousel-caption h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 16px;
    margin-bottom: 0;
}

/* Gallery styles */
.image-gallery {
    width: 100%;
    padding: 20px 0;
    background: #f8f9fa;
    margin-bottom: 30px;
}

.gallery-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Pro horní galerii se dvěma obrázky */
.image-gallery:first-of-type .gallery-item {
    flex: 1;
    max-width: calc(50% - 10px); /* Pro dva obrázky vedle sebe */
}

/* Pro spodní galerii se čtyřmi obrázky */
.image-gallery:last-of-type .gallery-item {
    flex: 1;
    max-width: calc(25% - 15px); /* Pro čtyři obrázky vedle sebe */
}

.gallery-item {
    flex: 1;
    max-width: calc(25% - 15px); /* zajistí rovnoměrné rozdělení prostoru pro 4 obrázky */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    text-align: center;
}

.gallery-caption h3 {
    margin: 0;
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-caption p {
    margin: 0;
    font-size: 14px;
}

/* Hero section styles */
.hero-section {
    width: 100%;
    height: 500px;
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.hero-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    padding: 40px 20px 20px;
    color: white;
    text-align: center;
}

.hero-caption h2 {
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-caption p {
    font-size: 18px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Responsive hero section */
@media (max-width: 768px) {
    .hero-section {
        height: 300px;
    }
    
    .hero-caption h2 {
        font-size: 24px;
    }
    
    .hero-caption p {
        font-size: 16px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .gallery-container {
        flex-wrap: wrap;
    }
    
    .gallery-item {
        max-width: calc(50% - 10px); /* 2 obrázky na řádek na tabletech */
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        max-width: 100%; /* 1 obrázek na řádek na mobilech */
    }
}

/* Featured Project Section */
.featured-project {
    margin: 40px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.featured-project h2 {
    color: #009036;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
}

.featured-project-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.featured-project-image {
    flex: 1 1 300px;
    max-width: 500px;
    height: 300px; /* Stejná výška jako obrázek */
}

.featured-project-image img {
    width: 100%;
    height: 300px; /* Pevná výška pro všechny obrázky v sekcích featured-project */
    object-fit: cover; /* Zachová poměr stran obrázku a ořízne přesahující části */
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.featured-project-info {
    flex: 1 1 300px;
}

.featured-project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.featured-project-info p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.btn-view-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #009036;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-view-more:hover {
    background-color: #007f47;
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    .featured-project-content {
        flex-direction: column;
    }
    
    .featured-project-image {
        margin-bottom: 20px;
        height: 250px; /* Menší výška pro mobilní zařízení */
    }
    
    .featured-project-image img {
        height: 250px; /* Menší výška pro mobilní zařízení */
    }
}

/* Footer Styles */
.site-footer {
    background-color: #fff;
    padding: 20px 0 10px;
    width: 100%;
    margin-top: 40px;
    border-top: 1px solid #eee;
    font-size: 14px;
    clear: both;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    text-align: center;
    padding: 10px 0;
}

.footer-main-block {
    margin-bottom: 10px;
}

.footer-title {
    color: #009036;
    font-size: 20px;
    margin-bottom: 5px;
    font-weight: bold;
}

.footer-slogan {
    color: #009036;
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
    margin-bottom: 15px;
}

.footer-info-item {
    color: #333;
    font-size: 14px;
}

.footer-info-item a {
    color: #2C77BB;
    text-decoration: none;
}

.footer-info-item a:hover {
    text-decoration: underline;
}

.footer-copyright {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .footer-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* vybaveni.html */
.equipment-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.category-section {
    margin-bottom: 50px;
}

.category-title {
    color: #009036;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 3px solid #009036;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.equipment-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.equipment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.equipment-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.equipment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.equipment-item:hover .equipment-image img {
    transform: scale(1.05);
}

.equipment-info {
    padding: 20px;
    text-align: center;
}

.equipment-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.equipment-description-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: 30px;
    text-align: left;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

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

.modal-caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.2rem;
}

/* aktuality.html */
.aktuality-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.aktualita-preview {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 35px;
    padding: 20px;
    transition: box-shadow 0.3s;
}
.aktualita-preview:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.aktualita-thumb {
    width: 160px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 30px;
    background: #f8f8f8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aktualita-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aktualita-info {
    flex: 1;
}
.aktualita-title {
    color: #009036;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}
.aktualita-date {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 8px;
}
.aktualita-short {
    color: #444;
    font-size: 1rem;
    margin-bottom: 10px;
}
.aktualita-detail-link {
    color: #007f47;
    font-weight: 600;
    text-decoration: underline;
    font-size: 1rem;
    transition: color 0.2s;
}
.aktualita-detail-link:hover {
    color: #009036;
    text-decoration: none;
}
@media (max-width: 700px) {
    .aktualita-preview {
        flex-direction: column;
        align-items: flex-start;
    }
    .aktualita-thumb {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        height: 180px;
    }
}
.page-header {
    text-align: center;
    margin-bottom: 50px;
}
.page-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.page-header p {
    color: #666;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
}
.pagination li {
    margin: 0 5px;
}
.pagination a {
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}
.pagination a:hover {
    background: #e1e1e1;
}
.pagination .active a {
    background: #009036;
    color: #fff;
}

/* aktualita_detail.html a reference_detail.html */
.aktualita-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 10px 40px 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.aktualita-detail-title {
    color: #009036;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}
.aktualita-detail-description {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: left;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.aktualita-detail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}
.aktualita-detail-image {
    width: 320px;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aktualita-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.aktualita-detail-image img:hover {
    transform: scale(1.05);
}
@media (max-width: 700px) {
    .aktualita-detail-images {
        flex-direction: column;
        gap: 10px;
    }
    .aktualita-detail-image {
        width: 100%;
        height: 180px;
    }
}
.back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: #007f47;
    font-weight: 600;
    text-decoration: underline;
    font-size: 1rem;
    transition: color 0.2s;
}
.back-link:hover {
    color: #009036;
    text-decoration: none;
}
/* Modal fix: hide modal and close button unless open */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}
.modal.show {
    display: flex;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1100;
}
.modal:not(.show) .close-modal {
    display: none;
}
.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
}
.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.modal-caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.2rem;
}

/* reference.html */
.reference-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.reference-preview {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 35px;
    padding: 20px;
    transition: box-shadow 0.3s;
}
.reference-preview:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.reference-thumb {
    width: 160px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 30px;
    background: #f8f8f8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reference-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reference-info {
    flex: 1;
}
.reference-title {
    color: #009036;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}
.reference-date {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 8px;
}
.reference-short {
    color: #444;
    font-size: 1rem;
    margin-bottom: 10px;
}
@media (max-width: 700px) {
    .reference-preview {
        flex-direction: column;
        align-items: flex-start;
    }
    .reference-thumb {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        height: 180px;
    }
}

/* ke_stazeni.html */
.category-section {
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}
.category-title {
    color: #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
}
.category-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background-color: #007f47;
}
.document-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.document-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.document-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.document-icon {
    margin-right: 20px;
    font-size: 2rem;
    color: #dc3545;
    flex-shrink: 0;
}

.document-info {
    flex: 1;
}

.document-title {
    margin-bottom: 8px;
}

.document-title a {
    color: #000; /* Černé nadpisy dokumentů */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.document-title a:hover {
    color: #333;
    text-decoration: underline;
}

.document-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.document-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.document-actions .btn {
    background-color: #009036; /* Zelené tlačítka */
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.document-actions .btn:hover {
    background-color: #007f30; /* Tmavší zelená při hover */
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .document-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .document-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* kariera.html */
.career-page {
    padding: 2rem;
}
.job-position {
    margin-bottom: 3rem;
}
.position-details {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: transform 0.2s;
}
.position-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.position-meta {
    margin-top: 1rem;
}
.apply-btn {
    background: #009036;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
}

/* =================================
   STYLY PŘENESENÉ Z BASE.HTML
   ================================= */

/* Navbar & Dropdown Styles */
.navbar-nav {
    list-style: none;
    padding-left: 0;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #eee;
    z-index: 1000;
    list-style: none;
    padding: 8px 0;
    min-width: 250px;
    margin-top: 5px;
}

.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown:focus-within > .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

/* Submenu se zobrazí pouze při hoveru/fokusu na .dropdown-submenu */
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-item {
    padding: 12px 25px;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.2s ease;
    display: block;
    width: 100%;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #009036;
    text-decoration: none;
    padding-left: 30px;
}

.dropdown-item:visited {
    color: #333;
    text-decoration: none;
}

.dropdown-item:active {
    background-color: #f8f9fa;
    color: #009036;
    text-decoration: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item.dropdown > .nav-link {
    position: relative;
    padding-right: 1.5rem;
}

.nav-item.dropdown > .nav-link:after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: solid #333;
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: translateY(-50%) rotate(45deg);
}

/* Geotermální submenu (druhá úroveň v dropdownu) */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.1rem;
    margin-left: 0.1rem;
    border-radius: 0.25rem;
    min-width: 220px;
    display: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
}
.dropdown-submenu > .dropdown-item:after {
    content: "\25B6";
    float: right;
    margin-left: 0.5em;
    font-size: 0.8em;
}

@media (max-width: 991px) {
  .dropdown-submenu > .dropdown-menu {
    left: 0;
    top: 100%;
    min-width: 180px;
  }
}

/* Hero Section & Gallery Styles - upravené pro base.html */
.hero-section {
    width: 100%;
    position: relative;
    margin: 10px auto 20px auto;
    border-radius: 8px;
}

.hero-section img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-gallery {
    padding: 40px 0;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-item {
    flex: 1 1 calc(25% - 10px);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 0;
    padding-bottom: 25%;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.gallery-item:hover img {
    transform: scale(1.00);
}

.gallery-item:first-child {
    flex: 1 1 calc(50% - 10px);
}

.gallery-item:first-child img {
    border-radius: 8px;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.gallery-caption h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.gallery-caption p {
    font-size: 1.1rem;
    margin: 0;
}

/* Project Images Styles */
.project-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-image {
    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Header Logo Styles */
header img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    max-height: 150px;
}

/* Request Form Styles */
.request-form-wrapper {
    position: fixed;
    bottom: -50px;
    left: 24%;
    right: 0%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    transition: bottom 0.3s ease;
}

.request-form-wrapper .request-form.expanded {
    bottom: 0;
}

.request-form {
    width: 100%;
    max-width: 700px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.request-form-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid #ddd;
    border-bottom: none;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease;
}

.request-form-header:hover {
    background: #e9ecef;
}

.request-form-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.request-form-header span {
    font-size: 1.2rem;
    color: #666;
}

.request-form-content {
    padding: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 60%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn-submit {
    background-color: #009036;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-submit:hover {
    background-color: #007f47;
}

.btn-submit:active {
    transform: scale(0.98);
}

#map {
    width: 100%;
    height: 300px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-fields {
    flex: 1;
    min-width: 280px;
}

.form-map {
    flex: 1;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
}

/* Custom styles for bullet points and list text */
ul {
    list-style-type: disc;
    margin-left: 20px;
}

ul li {
    color: #333;
    font-size: 1rem;
}

ul li::marker {
    color: #009036;
}

/* Responsive Styles for Base Template */
@media (max-width: 1200px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-image {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    .request-form-wrapper {
        left: 10%;
        right: 10%;
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .request-form-wrapper {
        left: 5%;
        right: 5%;
    }
    .form-control {
        width: 80%;
    }
}

/* Mobile Large (landscape phones) */
@media (max-width: 896px) {
    .request-form-wrapper {
        left: 2%;
        right: 2%;
    }
    .form-control {
        width: 90%;
    }
}

/* Mobile Medium and below */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
    .navbar-nav {
        flex-direction: column;
        align-items: center;
    }
    .nav-item {
        margin-bottom: 10px;
    }
    .request-form-wrapper {
        left: 0 !important;
        right: 0 !important;
        width: 100vw;
        bottom: -40px;
    }
    .request-form {
        border-radius: 0;
        box-shadow: 0 -2px 15px rgba(0,0,0,0.15);
        max-width: 100%;
    }
    .request-form-header {
        padding: 12px 15px;
    }
    .request-form-header h3 {
        font-size: 1rem;
    }
    .request-form-content {
        padding: 15px;
    }
    .form-container {
        flex-direction: column;
        gap: 15px;
    }
    .form-fields, .form-map {
        min-width: 100%;
        max-width: 100%;
    }
    .form-control {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    .btn-submit {
        width: 100%;
        padding: 14px;
        font-size: 1.1rem;
    }
    .form-map #map-container {
        height: 250px;
    }
    #map {
        height: 250px;
    }
    .project-image {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .nav-item.dropdown > .nav-link {
        cursor: pointer;
    }
}

/* Mobile Small */
@media (max-width: 576px) {
    .hero-section img {
        border-radius: 0;
    }
    .gallery-item {
        flex: 1 1 100%;
        padding-bottom: 50%;
    }
    .gallery-item:first-child {
        flex: 1 1 100%;
    }
    .gallery-caption h3 {
        font-size: 1.2rem;
    }
    .gallery-caption p {
        font-size: 1rem;
    }
    .request-form-wrapper {
        bottom: -35px;
    }
    .request-form-header {
        padding: 10px 12px;
    }
    .request-form-header h3 {
        font-size: 0.9rem;
    }
    .request-form-content {
        padding: 12px;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .form-control {
        padding: 10px;
        font-size: 16px;
    }
    .btn-submit {
        padding: 12px;
        font-size: 1rem;
    }
    .form-map #map-container {
        height: 200px;
    }
    #map {
        height: 200px;
    }
}

/* Mobile Extra Small */
@media (max-width: 390px) {
    .request-form-wrapper {
        bottom: -30px;
    }
    .request-form-header {
        padding: 8px 10px;
    }
    .request-form-header h3 {
        font-size: 0.85rem;
    }
    .request-form-content {
        padding: 10px;
    }
    .form-control {
        padding: 8px;
    }
    .btn-submit {
        padding: 10px;
        font-size: 0.95rem;
    }
    .form-map #map-container {
        height: 180px;
    }
    #map {
        height: 180px;
    }
}

/* Mobile Ultra Small (older phones) */
@media (max-width: 320px) {
    .request-form-wrapper {
        bottom: -25px;
    }
    .request-form-header {
        padding: 6px 8px;
    }
    .request-form-header h3 {
        font-size: 0.8rem;
    }
    .request-form-content {
        padding: 8px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    .form-control {
        padding: 6px;
        font-size: 14px;
    }
    .btn-submit {
        padding: 8px;
        font-size: 0.9rem;
    }
    .form-map #map-container {
        height: 160px;
    }
    #map {
        height: 160px;
    }
}

