@import url('./fonts.css');
@import url('./reset.css');
@import url('./components.css');

body {
   font-family: "Roboto", sans-serif;
   font-size: 16px;
   font-weight: 400;
   line-height: 1.5;
   color: #212121;
   background-color: #FFFFFF;
}

.wrapper {
   display: flex;
   flex-direction: column;
   block-size: 100%;
}
.wrapper > main {
   flex-grow: 1;
}

[class*="__container"] {
   max-inline-size: 1230px;
   margin-inline: auto;
   padding-inline: 15px;
}

/* 393px */
@media (max-width: 393px) {
   body {
      font-size: 12px;
      line-height: 2.0;
   }
}

/* header */
.header__container {
max-inline-size: 1512px;
display: grid;
align-items: center;
grid-template-columns: auto 1fr auto;
padding-block: 11px;
padding-inline: 30px;
gap: 30px;
}

.search-form {
   max-inline-size: 592px;
}

.search-form__item {
   display: flex;
   border: 1px solid #d9d9d9;
   border-radius: 8px;
   position: relative;
}

.search-form__input {
   flex-grow: 1;
   padding: 10px;
   
}
.search-form__input::placeholder{
   padding-left: 5px;
   color: #707070;
}

input.search-form__input {
   background-image: url('../assets/img/svg/search_grey.svg');
   background-repeat: no-repeat;
   background-position: 5px center;
   padding-left: 35px;
}

.search-form__location {
   padding: 10px 17px;
   border-left: 1px solid #d9d9d9;
   font-size: 16px;
   color: #000;
}

.search-form__button {
   border-radius: 0 8px 8px 0;
   background-color: #f44336;
   padding: 10px 10px;
   cursor: pointer;
   
}

.search-form__button:hover {
   background-color: #d32f2f;
}


.actions-header__link-language {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   font-weight: 500;
   font-size: 14px;
   line-height: 1.43;
   text-align: center;
   color: #212121;
}

.actions-header__link-language:hover {
   color: #006977;
 }

.actions-header__link-language:hover .svg-language {
   fill: #006977;
}

.actions-header {
   display: flex;
   column-gap: 5px;
   align-items: center;
   flex-wrap: wrap;
}

/* 1300px */
@media (max-width: 1300px) {
   .header__container {
      max-inline-size: 1230px;

   }
}

/* 900px */
@media (max-width: 900px) {
   .search-form__location { 
      display: none;
   }
}

/* 768px */
@media (max-width: 768px) {
   .header__container {
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      gap: 16px;
      padding-inline: 15px;
   }

   .header__link-logo {
      grid-row: 1;
      grid-column: 1;
   }

   .header__actions {
      grid-row: 1;
      grid-column: 2;
      justify-self: end;
   }

   .header__search {
      grid-row: 2;
      grid-column: 1 / 3;
      width: 100%;
      display: flex;
      justify-content: center;
   }
   .search-form {
      width: 100%;
      max-width: 592px;
   }
   .search-form__location {
      display: block;
}
}

/* 480px */
@media (max-width: 480px) {
   .search-form__location {
      display: none;
   }
}

/* 393px */
@media (max-width: 393px) {
   .header__container {
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      gap: 16px;
      padding-block: 8px;
      padding-inline: 15px;
   }

   .header__link-logo {
      grid-row: 1;
      grid-column: 1;
   }

   .header__actions {
      grid-row: 1;
      grid-column: 2;
      justify-self: end;
   }

   .header__search {
      grid-row: 2;
      grid-column: 1 / 3;
      width: 100%;
      
   }

   .search-form__location {
      display: none;
   }

   .actions-header__link-language {
      gap: 3px;
      font-size: 12px;
      line-height: 1.42;
   }
   .actions-header__link-language svg {
      width: 16px;
      height: 16px;
   }
}

/* maim */
/* section meetup */
[class*="__display"] {
   margin-top: 65px;
}
.meetup__display {
   display: grid;
   grid-template-columns: 1fr 45%;
   column-gap: 55px;
   
}

.meetup__content {
display: flex;
flex-direction: column;
gap: 25px;
}

.meetup__img {
   display: flex;
   justify-content: center;
   align-items: center;
   height: 100%;
}
.meetup__img img {
   max-width: 100%;
   height: auto;
}

/* 768px */
@media (max-width: 768px) {
   [class*="__display"] {
      margin-top: 45px;
   }

   .meetup__content {
      gap: 15px;
   }

   .meetup__display {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: flex-start;
      row-gap: 10px;
      }
   
   .meetup__img {
      margin-top: 20px;
   }
   .meetup__button-btn {
      display: flex;
      justify-content: center;
   }
}

/* 393px */
@media (max-width: 393px) {
   
   [class*="__display"] {
      margin-top: 30px;
   }
   .meetup__img  {
      margin-top: 0;
      max-width: 215px;
   }
}

/* section events */
.events__header {
   display: grid;
   grid-template-columns: auto auto 1fr;
   gap: 16px;
   align-items: center;
    
}
.event-link {
justify-self: end;
}
.location {
display: flex;
gap: 15px;
background: rgba(151, 202, 209, 0.12);
padding: 11px 12px 8px 12px;
border-radius: 8px;
}
.events__items {
   margin-top: 26px;
   display: grid;
   gap: 36px;
   grid-template-columns: repeat(auto-fill, minmax(min(272px, 100%), 1fr));
}

.item-event__link-image {
   display: block;
   overflow: hidden;
   border-radius: 8px;
}

.item-event__image {
   transition: transform 0.5s;
   width: 100%;
   object-fit: cover;
}

.item-event__image:hover {
   transform: scale(1.05);
}

.date, .info, .going, .free {
   display: flex;
   gap: 6px;
}

.info
 {
   display: flex;
   gap: 15px;
   margin-top: 4px;
}
.item-event__body{
   margin-top: 12px;
   display: flex;
   flex-direction: column;
   gap: 2px;
}


/* 610px */
@media (max-width: 610px) {
   .event-link {
         display: none;
      }
    .location h3 {
      font-size: 16px;
    } 
   
    .events__header {
      gap: 8px;
    }

}

/* 393px */
@media (max-width: 393px) {
   
   
   .location {
      gap: 15px;
      background: rgba(151, 202, 209, 0.12);
      padding: 8px 8px 5.7px 8px;
      border-radius: 8px;
      font-size: 13px;
   }
   .location h3 {
         font-size: 13px;
         line-height: 1.2;
   }
   .location img {
    width: 16px; 
   }
   
   .item-event {
      display: flex;
}
 .item-event__body {
   margin-top: 5px;
 }

 .link-event {
   font-size: 9px;
   
 }
   .date-text {
      font-size: 8px;
   }
   .date img {
      display: none;
   }
   .category {
      font-size: 8px;
   }
   .info {
    display: none;
   }
   .item-event__link-image {
      width: 100%;
      max-width: 98px;
      display: flex;
      flex-direction: column;
   }
   .item-event {
      border-top: 1px solid #d9d9d9;
      gap: 8px;
   }
   .item-event__image {
         margin-top: 10px;
   }
.date {
   order: 1;
}

.title_h3 {
   order: 2;
}

.category {
   order: 3;
}

}


/* section events-online */
.events-online__header {
   display: grid;
   grid-template-columns: auto auto;
   align-items: center;

}

.event-online-link {
   justify-self: end;
}

/* section membership */
.membership__display {
   display: grid;
   grid-template-columns: 1fr 35%;
   column-gap: 55px;
   background: rgba(151, 202, 209, 0.08);
   border-radius: 8px;
   padding: 36px 56px;


}

.membership__content {
   display: flex;
   flex-direction: column;
   gap: 25px;
}

/* 768px */
@media (max-width: 768px) {
   
   .membership__display {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: flex-start;
      row-gap: 10px;
      padding: 25px 35px;
   }

   .membership__img {
      margin-top: 20px;
   }

   .membership__button-btn {
      display: flex;
      justify-content: center;
   }
   .membership__img {
      margin-top: 10px;
   }
}

/* 393px */
@media (max-width: 393px) {
   .membership__container {
      padding-inline: 0;
   }
      .membership__display {
      padding: 10px 15px;
      row-gap: 0;
   }
   .membership__content {
      gap: 5px;
   }
   .membership__img img {
      max-width: 238px;
   }
}

/* section categories */
.categories__items {
   display: flex;
   gap: 16px;
   flex-wrap: wrap;
   justify-content: center;
   margin-top: 26px;
   
}
.categories__item {
   display: flex;
   flex-direction: column;
   align-items: center;
   padding: 22px 8px;
   background: rgba(151, 202, 209, 0.08);
   border-radius: 8px;
   width: 135px;
   gap: 10px;
   
   
}
.categories__title {
   text-align: center;
}

/* 393px */
@media (max-width: 393px) {
   .categories__title {
      font-size: 16px;
      line-height: 1.5;
   }
}



/* section cities */
.cities__items {
   display: flex;
   gap: 41px;
   flex-wrap: wrap;
   justify-content: center;
   margin-top: 26px;
   
}

.cities__item {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
   gap: 25px;
   
}
.cities-item__link-image {
   display: block;
   overflow: hidden;
   border-radius: 50%;
  
}

.cities-item__image {
   transition: transform 0.5s;
   width: 100%;
   object-fit: cover;
}

.cities-item__image:hover {
   transform: scale(1.05);
}

.link-cities {
   color: #212121;
}

.link-cities:hover {
   color: #006977;
}
.cities-title {
   line-height: 1.40;
   text-align: center;
}
.cities-descr {
   margin-top: 20px;
}

@media (max-width: 580px) {
   .cities__items {
      gap: 25px;
   }
   
   .cities-item__image {
      max-width: 180px;
   }
}

@media (max-width: 420px) {
   .cities__items {
      gap: 17.5px;
   }

   .cities-item__image {
      max-width: 154px;
   }
}

@media (max-width: 393px) {
   .cities__items {
      margin-top: 10px;
   }
   .cities-descr {
   margin-top: 5px;
   }
   
}

/* section work */
.work__items {
   display: flex;
   gap: 32px;
   margin-top: 26px;
   justify-content: center;
}

.work__item {
   display: flex;
   padding: 32px 24px 32px 24px;
   background: rgba(151, 202, 209, 0.08);
   border-radius: 8px;
   gap: 24px;
   align-items: flex-start;
   justify-content: flex-start;
   max-width: 580px;
   width: 100%;
}
.work__content{
   display: flex;
   flex-direction: column;
   gap: 16px;
   max-width: 379px;
}
/* 800px */
@media (max-width: 800px) {
  .work__items {
   flex-wrap: wrap;
   } 
   .work__item {
      max-width: 670px;
   }
}

/* 393px */
@media (max-width: 393px) {
.work__item img{
   max-width: 25.5px;
}
.work__item {
   gap: 15px;
   padding: 19px 30px 15px 15px;
}
.work__content {
   gap: 10px;
}
.work__content h3 {
font-size: 12px;
line-height: 1.24;
}
.work__title {
   font-size: 9px;
   line-height: 1.50;
}
.work-link p {
   font-size: 10px;
   line-height: 1.49;
}
}

/* section articles */
.articles__items {
   margin-top: 28px;
   display: grid;
   gap: 32px;
   grid-template-columns: repeat(auto-fill, minmax(min(376px, 100%), 1fr));
}

.articles-item__link-image {
   display: block;
   overflow: hidden;
   border-radius: 8px;
}

.articles-item__image {
   transition: transform 0.5s;
   width: 100%;
   object-fit: cover;
}

.articles-item__image:hover {
   transform: scale(1.05);
}

.link-articles {
   color: #212121;
}
.link-articles:hover {
   color: #006977;
}
.articles-descr {
   max-width: 893px;
   margin-top: 16px;
}
.articles-title {
   margin-top: 24px;
}
.articles__text {
   margin-top: 12px;
   margin-bottom: 16px;
}

/* 814px */
@media (max-width: 814px) {
.articles__items{
   gap: 32px;
   grid-template-columns: repeat(auto-fill, minmax(min(272px, 100%), 1fr));
}
}
/* 393px */
@media (max-width: 393px) {
   .articles-descr {
      display: none;
   }
   .articles-title {
      font-size: 16px;
      line-height: 168%;
   }
   .articles__text {
      line-height: 1.92;
   }
}
/* footer */
.footer {
   background-color: #212121;
   margin-top: 60px;
}

.footer__container {
   max-width: 1120px;
}
.footer__top {
   display: flex;
   padding: 30px 0;
   gap: 30px;
}

.top-title {
   font-weight: 600;
   line-height: 1.50;
   color: #f6f7f8;
}

.footer__body {
   border-top: 1px solid #707070;
   padding-block: 24px;
   display: flex;
   flex-wrap: wrap;
   column-gap: 48px;
}

.footer__nav {
   flex: 1;
}

.nav-footer__title {
   color: #f6f7f8;
   margin-bottom: 10px;
}

.nav-footer__item {
   margin-bottom: 10px;
}

.nav-footer__link {
   font-size: 14px;
   line-height: 1.43;
   color: #c5c4c4;
}
.nav-copy__item {
   color: #fff;
   font-size: 14px;
   line-height: 1.43;
}

.nav-footer__link:hover {
   text-decoration: underline;
}

.footer__bottom {
   padding-block: 12px;
   display: flex;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 20px;
}

.footer__copy {
   color: #c5c4c4;
}

.social-title {
   color: #f6f7f8;
   padding-block: 12px;
}

.social {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   column-gap: 32px;
   
}
.footer__app{
   display: flex;
   align-items: flex-end;
   column-gap: 32px;
}
.nav-footer__copy {
   display: flex;
   gap: 24px;
   padding-block: 40px;
}

@media (max-width: 510px) {
   .nav-footer__copy .nav-footer__link {
      display: none;
   }
   .footer__top {
      gap: 20px;
   }
   .footer__body{
      column-gap: 20px;
   }
   .nav-footer__link {
      white-space: nowrap;
      display: inline-block;
   }
   
   .nav-footer__item {
   flex-shrink: 0;
   }
}
 
@media (max-width: 393px) {
   .top-title {
      font-size: 16px;
   }
   .footer__top {
      flex-wrap: wrap;
   }
   .nav-footer__title {
      font-size: 16px;
      line-height: 1.5;
   }
   .footer__body {
      column-gap: 10px;
   }
   .footer__bottom {
      padding-block: 0;
   }
   .footer__app {
      display: none;
   }
   .footer__social p {
      font-size: 16px;
      line-height: 1.50;
   }
}