html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* zabrání vodorovnému scrollu */
    width: 100%;
}

.main-page {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(rgba(172, 84, 84, 0.563), rgba(25, 50, 27, 0.322)), url('images/background.jpg');
    background-size: cover;
    width: 100%;
}
.main-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* obsah uvnitř boxu dolů */
    color: #fff;
    padding: 0 5% 20% 5%; /* přidán spodní padding pro mezeru od spodku */
    box-sizing: border-box;
    width: 100%;
}

.main-box h1 {
    font-size: 5rem;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.main-box h2 {
    font-size: 1.5rem;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.btn {
    display: flex;
    flex-direction: row;
    margin-top: 1%;
}

.btn a {
    font-size: 15px;
    padding: 10px 15px;
    margin: 10px;
    color: #fff;
    border-radius: 2px;
    border: solid 2px #fff;
    text-decoration: none;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.btn a:hover {
    transition: 8ms;
    color: #fff;
    border-radius: 6px;
    transform: scale(1.05);
    cursor: pointer;
    background: #00000070;
}

.photobox {
    background: linear-gradient(#000,#141414);
    display: flex;
    height: 100%;
    width: 100%;
}

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
}

.photo-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* Skrytí části obrázků, která přeteče */
    transition: 1s ease-in-out;
    border-radius: 15px;
}


.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zajišťuje, že obrázek vyplní celý prostor bez deformace */
    transition: 1s;
}

.photo-item img:hover {
    scale: 110%;

}

.photo-item p {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}

@media (max-width: 768px) {
    .main-page {
    max-height: 100vh;
}
    .photo-item {
    height: 200px;
}
}


.about-me {
    display: flex;
    background: #141414;
    background-size: cover;
    justify-content: center;
    text-align: left;
    width: 100%;
    height: 100%;
}

.about-me p {
    font-size: 3.8rem;
    padding: 5% 20%;
    color: #ffffff;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
    
}




.porfolio-box {
    display: flex;
    width: 100%;
    background: #141414      
    ;
    align-items: center;
    justify-content: center;
    justify-items: center;
    padding: 0px 20px;
    

}

.detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 sloupce na řádku */
    gap: 40px;
    
}

.box-portfolio {
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 4px 4px 6px #000;
    height: 650px;
    border-radius: 15px;
}

.box-portfolio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out;
    
}

.links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0; /* Skrytý odkaz */
    transition: opacity 0.3s ease-in-out;
    text-shadow: 2px 2px 4px #000;
}

.links a {
    display: flex;
    color: #fff;
    text-shadow: (10, 20, 30) #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 2rem;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s ease-in-out; /* Přidání přechodu pro transformaci */
}

.box-portfolio:hover .links {
    opacity: 1; /* Odkaz se zobrazí při najetí na box */
}

.box-portfolio img:hover {
    transform: scale(1.05); /* Zvětšení obrázku i odkazu při hoveru nad .box */
    text-align: center;
}

@media (max-width: 768px) {
    .box-portfolio .links {
    opacity: 1; /* Odkaz se zobrazí při najetí na box */

    
}
    .detail {
    display: block;
    
    
}
    .box-portfolio {
    margin: 5%;
    box-shadow: none;
    
}
    .box-portfolio img {
    height: 20rem;
    width: 25rem;
}
}

.contact {
    display: flex;
    width: 100%;
    height: 100%;
    background: linear-gradient(#141414, #000);
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
    align-items: center;
    justify-content: center;
    padding: 5% 0%;

}


/* Sekce formuláře */
.contact-section {
    width: 700px;
    height: 100%;
    max-height: 700px;
    padding:40px;
    
}

.contact-section h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #ffffffdd;
}

/* Stylování <p> elementů v {{ form.as_p }} */
.contact-section form p {
    margin-bottom: 20px;
}

/* Labely */
.contact-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffffcc;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;

}

/* Vstupní pole a textarea */
.contact-section input[type="text"],
.contact-section input[type="email"],
.contact-section textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: #ffffff;
    color: #181818;
    font-size: 16px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;

}

.contact-section textarea {
    min-height: 120px;
    resize: none;

}

.contact-section input,
.contact-section textarea {
    transition: 0.3s ease-in;
    
}

.contact-section input:focus,
.contact-section textarea:focus {
    outline: none;
    background-color: #ffffff;
    scale: 105%;
}

/* Tlačítko */
.contact-section button[type="submit"] {
    padding: 12px 20px;
    background-color: #000000;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
    width: 100%;
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
    transition: 0.3s ease-in;

}

.contact-section button[type="submit"]:hover {
    background-color: #404041;
    scale: 110%;
}

@media (max-width: 768px) {
    body {
        width: 100%;
    }
    .main-page {
        flex-direction: column;
        background-position: center;
        justify-content: end;
    }

    .main-box {
        
        align-items: center;
        text-align: center;
    }

    .main-box h1 {
        font-size: 3rem;
    }

    .main-box h2 {
        font-size: 1.2rem;
    }

    .btn {
        flex-direction: column;
        align-items: center;
    }

    .btn a {
        margin: 5px 0;
    }

    .photos {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }

    .about-me p {
        font-size: 2rem;
        padding: 10% 10%;
        text-align: center;
    }

    .detail {
        grid-template-columns: 1fr; /* pouze 1 sloupec */
        gap: 20px;
    }

    .box-portfolio {
        height: auto;
    }

    .links a {
        font-size: 1.5rem;
        padding: 8px 16px;
    }

    .contact-section {
        width: 90%;
        padding: 20px;
    }

    .contact-section h1 {
        font-size: 24px;
    }

    .contact-section input[type="text"],
    .contact-section input[type="email"],
    .contact-section textarea {
        font-size: 14px;
        padding: 10px;
    }

    .contact-section button[type="submit"] {
        font-size: 16px;
        padding: 10px;
    }
}
