html, body {
    overflow: auto;
}

.container-header {
    color: white;
    background-color: #01204C;
}

.container-header a {
    cursor: pointer;
    color: #3AA3FC;
    text-decoration: none;
}

.container-body p {
    line-height: 1.6;
    text-align: justify;
}

h4 {
    display: inline;
}

.group {
    display: inline-block; /* Garante que o bloco envolva a imagem */
    overflow: hidden; /* Evita que a imagem ultrapasse os limites */
}

.group img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out !important;
    animation: fadeIn 1s ease-out;
    padding: 0.4rem;
    opacity: 1;
    border-radius: 30px !important;
}

.group img:hover {
    opacity: 1;
    transform: scale(1.03) !important;
    border-radius: 2.5rem;
}

.image-description {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff; /* Ensure the text color is visible */
    margin: 1rem !important;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* Optional: Add a background for better readability */
    border-radius: 5px;
}

.image-container {
    position: relative; /* Make this container the reference for absolute positioning */
}

.image-description {
    position: absolute; /* Position the description over the image */
    bottom: 10px; /* Align the description at the bottom */
    left: 50%; /* Center the text horizontally */
    transform: translateX(-50%); /* Adjust for perfect centering */
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff; /* Ensure the text is visible */
    padding: 10px;
    background-color: rgba(1, 32, 76, 0.5); /* Optional: Add a background for better readability */
    border-radius: 5px;
    z-index: 1; /* Ensure the description appears above the image */
}

.group {
    display: inline-block;
    overflow: visible; /* Allow the text to overflow if necessary */
}

/* Animação de carregamento mais lenta */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px); /* Pequeno movimento para dar um efeito mais suave */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para telas grandes (Desktop) */
@media screen and (min-width: 1025px) {
    .container-header {
        padding: 50px 60px;
    }

    .container-header h2 {
        font-size: 50px;
        margin-bottom: 20px;
        font-weight: bold;
    }

    .container-header h3 {
        font-size: 30px;
        margin-bottom: 20px;
        font-weight: normal;
    }

    .container-header p {
        font-size: 16px;
        font-weight: normal;
    }

    .container-body {
        padding: 50px 60px;
    }

    .container-body p {
        font-size: 20px;
        font-weight: medium;
    }

    .gallery {
        gap: 40px;
        display: grid;
        margin: 50px 40px;
        grid-template-columns: repeat(2, 1fr);
    }

    .group {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .group img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 30px;
    }
}

/* Estilo para dispositivos com largura até 1024px (tablets e telas pequenas) */
@media screen and (max-width: 1024px) {
    .gallery {
        display: flex;
        flex-direction: column; /* Muda para layout em coluna */
        margin: 30px 40px;
        gap: 40px;
    }

    .group {
        width: 100%; /* Cada imagem ocupa toda a largura disponível */
        display: block; /* Imagens empilhadas verticalmente */
        gap: 10px;
    }
    
    .group img {
        width: 100%;
        height: auto; /* Mantém a proporção das imagens */
        object-fit: cover;
        border-radius: 15px;
    }

    .group img.wide {
        grid-column: span 2;
    }
}

/* Estilo para dispositivos com largura entre 601px e 1024px */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    .container-header {
        padding: 20px 70px;
    }

    .container-header h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .container-header h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .container-header p {
        font-size: 9px;
        font-weight: normal;
    }

    .container-body {
        padding: 20px 50px;
    }

    .container-body p {
        font-size: 14px;
        text-indent: 2em;
    }
}

/* Estilo para dispositivos com largura até 768px (telas médias) */
@media screen and (max-width: 768px) {
    h4 {
        font-size: 0.9rem;
    }

    .group img {
        opacity: 1;
    }
}

/* Estilo para dispositivos com largura até 600px (smartphones) */
@media screen and (max-width: 600px) {
    .container-header {
        padding: 20px 40px;
    }

    .container-header h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .container-header h3 {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .container-header p {
        font-size: 5px;
        font-weight: normal;
    }

    .container-body {
        padding: 20px 40px;
    }

    .container-body p {
        font-size: 10px;
        text-indent: 2em;
    }
    .gallery {
        gap: 10px;
    }
}
