@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Montserrat Alternates", sans-serif;
}

header {
    background-color: #dcedda;
    padding: 10px 0; /* было больше — уменьшаем */
}

main h1 {
    align-self: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    position: relative;
}

.logo img {
    width: 100px;
    position: absolute;
    left: 240px;
    top: 0px;
}

.logo h1 {
    padding: 35px 0px 10px;
    color: #22590C;
    font-size: 48px;
    margin: 0;
    font-family: "Montserrat Alternates", sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.menu {
    display: flex;
    list-style-type: none;
    padding: 0;
}

.menu li {
    margin:15px 10px 0px 0px;
    border-radius: 50px;
    background: #3F7337;
    padding: 7px 10px;    
}
.menu li:hover {
    margin:15px 10px 0px 0px;
    border-radius: 50px;
    background: #96ce8e;
    padding: 7px 10px;    
}
.menu li:active {
    margin:15px 10px 0px 0px;
    border-radius: 50px;
    background: #264621;
    padding: 7px 10px;    
}

.menu li a {
    color: #fff;
    text-decoration: none;
}

main {
    flex: 1;
    padding: 20px 20px; 
    display: flex;
    align-items: center; 
}

.grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: #fff;
    box-shadow: 2px 4px 20px 3px rgba(0, 0, 0, 0.25);
    border-radius: 30px;
    min-height: 250px;
    justify-content: top;
    align-items: center;
}

.card img {
    justify-self: center;
    max-width: 350px;
    width: 100%;
    max-height: 350px;
    height: 100%;
    height: auto;
    border-radius: 15px;
}

.puppy-img {
    width: 550px;  /* ключевое ограничение */
    height: auto;
    border-radius: 10px;
}

/* текст компактнее */
.text-block p {
    text-align: justify;
    margin: 6px 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 20px;
}

.slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.prev-button,
.next-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.prev-button {
  left: 10px;
}

.next-button {
  right: 10px;
}

/* FOOTER всегда снизу */
footer {
    background-color: #dcedda;
    padding: 10px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

#questions {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
}

#form, #quests {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;     /* по горизонтали */
    text-align: center;
}

.quest-card {
    background-color: #fff;
    border-radius: 35px;
    background: #F6F6F6;
    box-shadow: 3px 4px 10px 4px rgba(0, 0, 0, 0.25);
    padding: 15px;
    color: rgba(39, 83, 34, 0.51);
    width: 100%;
    max-width: 700px;
    margin-bottom: 15px;
}

form {
    display: flex;
    flex-direction: column;
}

input,
textarea {
    outline: none;
    border: none;
}

.name-input {
    border-radius: 30px;
    padding: 10px;
    background: #D1DDCE;
    border: none;
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 14px;
    width: 50%;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 17px;
    resize: none;
}
.quest-input {
    border-radius: 20px;
    background: #E3E3E3;
    padding: 20px;
    border: none;

    font-family: "Montserrat Alternates", sans-serif;
    font-size: 14px;
    font-weight: 400;

    width: 100%;
    height: 184.19px;

    margin-bottom: 17px;
    resize: none;

    text-align: left;
    vertical-align: top;
    box-sizing: border-box;
}

.answer {
    background: #EAEF9F;
    color: rgba(0, 0, 0, 0.52);
}

.name-input span {
    display: block;
    text-align: left;
}

div .quest-input {
    color: rgba(0, 0, 0, 0.45);
    height: auto;
}

#form button {
    color: #635930;
    font-family: sans-serif;
    display: block;
    margin-left: auto;
    width: 125px;
    height: 35px;
    border-radius: 50px;
    background: #DDE380;
    outline: none;
    border: none;
}
/* Адаптив */

@media (max-width: 1024px) {
    .puppy-img {
        width: 400px;
    }
    #questions {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #form, #quests {
        width: 70%;
    }
}
@media (max-width: 768px) {
    /* header */
    .header-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .logo {
        flex-direction: column;
        align-items: center;
    }

    .logo img {
    width: 70px;
    left: 110px;
    }

    .logo h1 {
        margin-left: 0;
        text-align: center;
        font-size: 24px;
        font-weight: 500;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* main */
    .main-container {
        flex-direction: column;
        gap: 20px;
    }

    .puppy-img {
        width: 500px;
    }

    .text-block h2 {
        font-size: 20px;
    }

    .footer-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 550px) {
    .puppy-img {
        width: 100%;
        height: auto;
        padding: 0;
    }
    main {
        padding: 0;
        padding-top: 10px;
    }
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}