* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: poppins, sans-serif;
    line-height: 1.6;
    margin-top: 80px;
}

.container {
    width: 70%;
    margin: 0 auto;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    /* padding: 0.5rem 0; */
    transition: box-shadow 0.3s ease-in-out;
}

header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.logo-container {
    margin-right: auto;
}

.logo {
    height: 60px;
    margin-top: 0.5rem;
}

.nav-items {
    display: flex;
}

nav ul li {
    margin: 0 1rem;
    position: relative;
}

nav ul li a:not(.contact_btn, .logo, .logo-container) {
    color: #000;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    position: relative;
}

nav ul li a:not(.contact_btn, .logo, .logo-container)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #000;
    transform: translateX(-50%);
    transition: width 0.3s ease-out;
}

nav ul li a:not(.contact_btn):hover::after {
    width: 100%;
}

.nav-items .contact_btn {
    padding: 10px 20px;
    /* background-color: #F64740; */
    color: #F64740;
    text-decoration: none;
    border-radius: 10px;
    border: solid 3px #F64740;
    padding: 10px 20px;
    margin-top: 20px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-items .contact_btn:hover {
    background-color: #F64740;
    color: #fdfdfd;
}

.visuallyHidden {
    position: absolute; 
    overflow: hidden; 
    clip: rect(0 0 0 0); 
    height: 1px; width: 1px; 
    margin: -1px; padding: 0; border: 0; 
}

.hamburger {
    width: 30px;
    height: 30px;
    position: relative;
    display: none;
}

.hamburger .bar {
    padding: 0;
    width: 30px;
    height: 4px;
    background-color: black;
    display: block;
    border-radius: 4px;
    transition: all 0.4s ease-in-out;
    position: absolute; 
}

.bar1 {
    top: 0;
}

.bar2, .bar3 {
    top: 13.5px;
}

.bar3 {
    right: 0;
}

.bar4 {
    bottom: 0;
}

.hamburger3 .bar1 {
    transform-origin: 5%;
}

.hamburger3 .bar4 {
    transform-origin: 5%;
}

.checkbox3:checked + label > .hamburger3 > .bar1{
    transform: rotate(45deg);
    height: 3px;
    width: 42px;
}

.checkbox3:checked + label > .hamburger3 > .bar3{
    transform: rotate(45deg);
    height: 3px;
    background-color: transparent;
}

.checkbox3:checked + label > .hamburger3 > .bar2{
    transform: rotate(-45deg);
    height: 3px;
    background-color: transparent;
}

.checkbox3:checked + label > .hamburger3 > .bar4{
    transform: rotate(-45deg);
    height: 3px;
    width: 42px;
}

main {
    display: flex;
    padding: 2rem 0;
    gap: 20px;
    flex-direction: column;
}

.intro {
    flex: content;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0; /* Animace */
    transform: translateY(-100px); /* Animace */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out; /* Animace */
}

.intro #heading {
    margin: 0 auto 20px;
    border-radius: 20px;
    border-bottom: solid 7px #F64740;
    width: fit-content;
    padding: 0 20px
}

.intro.visible {
    opacity: 1; /* Animace */
    transform: translateY(0); /* Animace */
}


.intro h1 {
    font-size: 2.5em;
    text-align: center;
}

.intro h2 {
    line-height: 1.4;
}

.services {
    flex: content;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 60px;
    align-items: flex-start;
}

.service {
    background-color: #fff;
    border-radius: 20px;
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
    flex: 1 1 calc(50% - 20px);
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    text-align: left;
    border-bottom: solid 7px #F64740;
    min-height: auto;
    opacity: 0; /* Animace */
    transform: translateY(100px); /* Animace */
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.6s ease-out, transform 0.6s ease-out; /* Animace */
}

.service.visible {
    opacity: 1; /* Animace */
    transform: translateY(0); /* Animace */
}

.service:hover {
    background-color: #F64740;
    color: #fff;
    border-color: #000;
}

.service p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.service a {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: #000;
    transition: color 0.2s;
}

.service:hover a {
    color: #fff;
}

.service li {
    margin-left: 15px;
}

.service h4 {
    margin-top: 25px;
}

.service p:last-of-type {
    margin-bottom: 30px;
}

.service img {
    max-width: 100%;
    height: 60px;
    margin-bottom: 15px;
    margin-top: 15px;
    transition: filter 0.2s;
}

.service:hover img {
    filter: invert(100%);
}

.service h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.service .contact_btn {
    padding: 5px 10px;
    color: #F64740;
    text-decoration: none;
    font-size: 0.9em;
    border-radius: 10px;
    border: solid 3px #F64740;
    padding: 10px 20px;
    margin-top: 20px;
}

.service:hover .contact_btn {
    color: #fdfdfd;
    border-color: #fdfdfd;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.service:hover .contact_btn:hover {
    background-color: #fff;
    color: #F64740;
}

#stavby-a-rekonstrukce, #instalaterske-sluzby, #topenarske-prace, #vykopove-a-zemni-prace {
    scroll-margin-top: 150px;
}

footer {
    background: #00000010;
    color: #000;
    padding: 1rem 0;
}

footer a {
    text-decoration: none;
    color: #000;
    transition: color 0.1s;
}

footer a:hover {
    color: #F64740;
}

.footer_info {
    display: flex;
    justify-content: space-between;
    align-items: first baseline;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.footer_company_info {
    text-align: left;
    max-width: 300px;
    word-wrap: break-word;
}

.footer_company_info img {
    mix-blend-mode: multiply;
    height: 60px;
    margin-bottom: 20px;
}

.footer_company_info h4 {
    margin-bottom: 20px;
}

.footer_company_info p {
    font-size: 15px;
    margin-bottom: 7px;
}

.footer_services {
    text-align: left;
}

.footer_services h4{
    font-weight: normal;
    margin-bottom: 7px;
}

.footer_services h3 {
    margin-bottom: 10px;
}

.footer_workhours h3 {
    text-align: left;
    margin-bottom: 10px;
}

.footer_workhour_list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.footer_workhour_list p {
    margin-bottom: 7px;
}

.footer_workhour_day {
    text-align: left;
}

.footer_workhour_time {
    text-align: right;
}

.footer_contacts {
    text-align: left;
}

.footer_contacts h3 {
    margin-bottom: 10px;
}

.footer_contacts h4 {
    font-weight: normal;
    margin-bottom: 7px;
}

.footer_contacts img {
    height: 25px;
}

.footer_contacts img:hover {
    filter: invert(39%) sepia(67%) saturate(3440%) hue-rotate(339deg) brightness(102%) contrast(93%);
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.desktop-only {
    display: inline;
}

#scrollToTopBtn {
    visibility: hidden;
    display: none;
}

@media only screen and (max-width: 1000px) {
    .container {
        width: 80%;
        margin: 0 auto;
        flex-direction: column;
    }

    .nav-items {
        flex-direction: column;
        position: absolute;
        top: 88px;
        right: 0;
        background-color: white;
        width: 100%;
        box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
        transition: max-height 0.4s ease-out, visibility 0s linear 0.4s;
        overflow: hidden;
        max-height: 0;
        z-index: 1;
    }

    .nav-items.active {
        max-height: 500px;
        visibility: visible;
        transition: max-height 0.8s ease-out, visibility 0s linear 0s;
    }


    .nav-items li {
        margin: 0;
        text-align: center;
        width: 100%;
        padding: 1rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-items.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}

@media only screen and (max-width: 768px) {
    header {
        position: absolute;
    }

    header.scrolled {
        box-shadow: none
    }

    .logo {
        height: 50px;
        margin-top: 0.5rem;
    }

    .container {
        width: 80%;
    }

    .services {
        flex-direction: column;
    }
    
    #stavby-a-rekonstrukce, #instalaterske-sluzby, #topenarske-prace, #vykopove-a-zemni-prace {
        scroll-margin-top: 111px;
    }

    .footer_workhours {
        margin-top: 30px;
    }

    .copyright {
        justify-content: center;
        text-align: center;
    }

    #scrollToTopBtn {
        position: fixed;
        bottom: 20px;
        right: 30px;
        z-index: 99;
        font-size: 18px;
        border: none;
        outline: none;
        background-color: #000;
        color: white;
        cursor: pointer;
        padding: 15px;
        border-radius: 10px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s, visibility 0.4s;
        display: block;
    }

    #scrollToTopBtn img {
        width: 20px;
        filter: invert(1) brightness(100%);
    }
    
    #scrollToTopBtn.show {
        opacity: 75%;
        visibility: visible;
    }

    #scrollToTopBtn.show:hover {
        opacity: 1;
    }
}

@media only screen and (max-width: 599px) {
    .intro h1 {
        font-size: 2em;
        line-height: 40px;
        padding-bottom: 5px;
    }

    .intro h2 {
        font-size: 1.3em;
        line-height: 1.4;
    }

    .service h2 {
        font-size: 1.3em;
        line-height: 1.2;
    }

    .footer_info {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    .footer_services, .footer_contacts {
        margin-top: 30px;
    }

    .footer_company_info {
        text-align: center;
        max-width: 300px;
        word-wrap: break-word;
    }

    .footer_services {
        text-align: center;
    }

    .footer_workhours h3 {
        text-align: center;
    }

    .footer_contacts {
        text-align: center;
    }

    .copyright {
        justify-content: center;
        text-align: center;
    }

    .desktop-only {
        display: none;
    }

    .data-policy {
        display: block;
    }
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    
}