* {
  box-sizing: border-box;
}

body {
  margin: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #fafafa;
  color: #212121;
  line-height: 1.5;
}


/* Gallery */

.gallery{
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background-color:#FFFFFF;
}

.gallery > li {
   width: 360px;          
    height: 300px;
  list-style-type: none;
}

.item > img {
  width: 100%;           
  height: 100%;           
  object-fit: cover;     
  display: block;
}

/*Сategories*/

.categories-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 392px;
    margin: 0;
    padding: 0;
}

.categories-list__item {
    background-color: #F6F6FE;
    border: 1px solid #808080;
    border-radius: 8px;
    padding: 16px;
}

.categories-list__title {
    color: #2E2F42;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 16px 0;
    letter-spacing: 0.04em;
}

.categories-list__sublist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.categories-list__subitem {
    background-color: #F6F6FE;
    border: 1px solid #808080;
    border-radius: 4px;
    padding: 8px 16px;
    color: #2E2F42;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.categories-list__subitem:hover {
    border-color: #2E2F42;
    background-color: #ffffff;
    cursor: pointer;
}

@media (max-width: 480px) {
    .categories-list {
        max-width: 100%;
    }
    
    .categories-list__item {
        padding: 12px;
    }
    
    .categories-list__title {
        font-size: 20px;
    }
    
    .categories-list__subitem {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/*Greeting-wrapper*/

.greeting-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 8px;
}

.greeting-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #808080;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #2E2F42;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
    outline: none;
}

.greeting-input::placeholder {
    color: #808080;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
}


/* Hover */
.greeting-input:hover {
    border-color: #2E2F42;
    border-width: 2px;
    padding: 11px 15px; 
}

/* Focus/Active*/
.greeting-input:focus {
    border-color: #2E2F42;
    border-width: 2px;
    padding: 11px 15px; 
}


.greeting-title {
    margin-top: 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
    letter-spacing: 0.02em;
    color: #2E2F42;
}

.greeting-name {
    font-weight: 700;
    color: #2E2F42;
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .greeting-wrapper {
        padding: 20px;
    }
    
    .greeting-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .greeting-title {
        font-size: 24px;
        line-height: 32px;
        margin-top: 20px;
    }
}

body > p {
    margin-bottom: 20px;
}

body > p a {
    color: #2E2F42;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: color 0.3s ease;
}

body > p a:hover {
    color: #808080;
    text-decoration: underline;
}

/* Login Form */

.login-form {
    max-width: 344px;
    margin: 0 auto;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form__label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form__label-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #2E2F42;
}

.login-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #808080;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #2E2F42;
    background-color: #ffffff;
    outline: none;
}

.login-form__input::placeholder {
    color: #808080;
}

.login-form__input:hover {
    border: 2px solid #2E2F42;
    padding: 11px 15px;
}

.login-form__input:focus {
    border: 2px solid #2E2F42;
    padding: 11px 15px;
}

.login-form__button {
    width: 100%;
    height: 40px;
    padding: 8px 16px;
    background-color: #4E75FF;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    cursor: pointer;
    
}

.login-form__button:hover {
    background-color: #6C8CFF;
}

.login-form__button:active {
    background-color: #4E75FF;
}

body > p {
    margin-bottom: 20px;
}

body > p a {
    color: #2E2F42;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

body > p a:hover {
    color: #808080;

}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .login-form {
        padding: 20px;
    }
    
    .login-form__input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .login-form__button {
        height: 36px;
        font-size: 14px;
    }
}

/* Random Color */

.widget {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget p {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #2E2F42;
}

.widget .color {
    font-weight: 600;
    color: #2E2F42;
}

.change-color {
    width: 148px;
    height: 40px;
    padding: 8px 16px;
    background-color: #4E75FF;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    cursor: pointer;
}

.change-color:hover {
    background-color: #6C8CFF;
}

.change-color:active {
    background-color: #4E75FF;
}

body > p {
    margin-bottom: 20px;
}

body > p a {
    color: #2E2F42;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

body > p a:hover {
    color: #808080;
    text-decoration: underline;
}
