.home {
    text-align: center;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

@media (max-width: 1200px) {
    .image-wrapper {
        font-size: 0.6em;
    }
}

main {
    padding-top: 151px;
    background-color: #FEFEFE;
}

.header-background {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: auto;
    overflow: hidden;
    margin-top: -144px;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
}

.header-content {
    position: absolute;
    right: 10%;
    text-align: right;
    color: #fff;
    z-index: 1;
    animation: fadeIn 2s ease-in-out;
    width: 80%;
    max-width: 600px;
}

.header-content h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
    animation: slideInRight 1.5s ease-out;
}

.header-content p {
    font-size: 1.2em;
    margin-bottom: 1em;
    line-height: 1.5;
    animation: slideInRight 1.8s ease-out;
}

.header-content button {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background-color: #f05454;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: slideInRight 2s ease-out;
}

.header-content button:hover {
    background-color: #d04343;
    transform: scale(1.05);
}

@media (max-width: 1600px) {
    .header-background {
        margin-top: -145px;
    }
}

@media (max-width: 1390px) {
    .header-background {
        margin-top: -146px;
    }
}

@media (max-width: 1200px) {
    .header-content {
        right: 5%;
    }
    .header-content h2 {
        font-size: 2em;
    }
    .header-content p {
        font-size: 1em;
    }
    .header-content button {
        font-size: 16px;
        padding: 12px 24px;
    }
}

@media (max-width: 992px) {
    .header-content {
        right: 2%;
    }
    .header-content h2 {
        font-size: 1.6em;
    }
    .header-content p {
        font-size: 1em;
    }
    .header-content button {
        font-size: 14px;
        padding: 12px 24px;
    }
}

@media (max-width: 768px) {
    .header-background {
        margin-top: -161px;
    }
    .header-content h2 {
        font-size: 1.3em;
        margin: 0.5em 0;
    }
    .header-content p {
        font-size: 0.9em;
        margin: 0.5em 0;
    }
    .header-content button {
        font-size: 12px;
        padding: 10px 20px;
    }
}

@media (max-width: 576px) {
    .header-background {
        margin-top: -195px;
    }
    .header-content h2 {
        font-size: 1em;
    }
    .header-content p {
        font-size: 0.6em;
    }
    .header-content button {
        font-size: 8px;
        padding: 8px 16px;
    }
}

@media (max-width: 425px) {
    .header-content h2 {
        font-size: 0.7em;
    }
    .header-content p {
        font-size: 0.4em;
    }
    .header-content button {
        font-size: 6px;
        padding: 6px 12px;
    }
}

@media (max-width: 300px) {
    .header-content h2 {
        font-size: 0.5em;
    }
    .header-content p {
        font-size: 0.2em;
    }
    .header-content button {
        font-size: 4px;
        padding: 4px 8px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.main-content {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
}

.blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.blocks .block .image-wrapper img {
    width: 100%;
    height: auto;
}

.block {
    background-color: rgba(128, 128, 128, 0.007);
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
}

.image-wrapper {
    position: relative;
    text-align: center;
    opacity: 1.0;
}

.image-wrapper img {
    border-radius: 5px;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
}

.image-wrapper h3 {
    position: absolute;
    font-family: 'Droid Sans', sans-serif;
    font-weight: 800;
    bottom: 10px;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -45%);
    color: #AE2C2A;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.5em;
    white-space: nowrap;
}

.block p {
    font-size: 16px;
    color: #555;
    margin-top: 15px;
}

.block a {
    color: #f05454;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.block a:hover {
    color: #AE2C2A;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .blocks {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .block {
        max-width: 100%;
    }
    
    .image-wrapper {
        font-size: 1.5em;
    }
}

@media (max-width: 576px) {
    .header-background {
        margin-top: -161px;
    }

    .image-wrapper {
        font-size: 1em;
    }
}

@media (max-width: 400px) {
    .image-wrapper h3 {
        font-size: 1em;
    }
}

@media (max-width: 292px) {
    .image-wrapper h3 {
        font-size: 0.6em;
    }
}

.partners-button {
    background-color: #AE2C2A;
    color: #FFFFFF;
    margin: 40px 0;
    padding: 12px 24px; 
    font-size: 16px; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); 
    text-transform: uppercase; 
    font-weight: bold; 
    letter-spacing: 1px;
    margin-bottom: 120px;
}

.partners-button:hover {
    background-color: #f05454; 
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}