@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 */

[class*="__display"] {
   margin-top: 65px;
}
.events__display {
   display: grid;
      grid-template-columns: 1fr 30%;
      column-gap: 55px;
}

.event-link p {
   font-size: 20px;
   text-decoration: underline;
   margin-top: 16px;
}
.filters {
   display: flex;
   gap: 12px;
   margin-bottom: 20px;
   flex-wrap: wrap;
   padding: 16px;
}

.filter-group {
   display: flex;
   flex-direction: column;
}

select {
   cursor: pointer;
   border-radius: 40px;
   border: 14px solid #f6f7f8;
   font-size: 14px;
   background: #f6f7f8;
   color: #333;
   min-width: 130px;
}

.events-container {
   display: flex;
   flex-direction: column;
   gap: 4px;
   max-width: 650px;
}

.event-card {
   border-top: 1px solid #d9d9d9;
   overflow: hidden;
   display: flex;
}

.event-image-container {
   width: 100%;
   max-width: 160px;
   display: flex;
   flex-direction: column;
}

.event-image-link {
   display: block;
   padding-top: 16px;
}

.event-image {
   width: 100%;
   height: 100px;
   object-fit: cover;
   border-radius: 8px;
}

.event-content {
   padding: 16px;
}

.event-date {
   color: #666;
   font-size: 13px;
   font-weight: 500;
   margin-bottom: 8px;
}

.event-title-link {
   text-decoration: none;
   color: inherit;
   display: block;
}

.event-title {
   font-size: 16px;
   font-weight: 600;
   color: #1d1d1f;
   margin-bottom: 12px;
   line-height: 1.4;
}

.event-title-link:hover .event-title {
   color: #006977;
}

.event-category {
   display: flex;
   align-items: center;
   font-size: 14px;
   color: #666;
   margin-bottom: 16px;
}

.event-distance {
   margin-left: 4px;
   font-size: 14px;
   font-weight: 500;
}

.event-attendees {
   padding-top: 18px;
   color: #666;
   font-size: 14px;
   font-weight: 500;
}

.no-events {
   text-align: center;
   padding: 40px;
   color: #888;
   font-size: 16px;
   grid-column: 1 / -1;
   background-color: white;
   border-radius: 12px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.map__content h2 {
padding: 5px 0 14px 0;
font-weight: 700;
}
.map__img img {
   width: 100%;
}

/* 900px */
@media (max-width: 900px) {
.events__display {
      display: flex;
      flex-direction: column;
   }
   .map__content {
      margin-top: 30px;
   }
   .map__img img {
max-width: 400px;
   }
   .map__img {
      display: flex;
      justify-content: center;
   }
}
/* 450px */
@media (max-width: 450px) {
.event-image-container {
   max-width: 120px;
}
.event-image {
   max-height: 85px;
}
}
/* 393px */
@media (max-width: 393px) {
  .events__display {
   margin-top: 30px;
  } 
.events__header h2 {
   font-size: 25px;
}
.event-image-container {
   max-width: 97.5px;
}
.event-date,
.event-category,
.event-attendees,
.event-distance {
   font-size: 8px;
   margin-bottom: 0;
}
.event-title {
   font-size: 9px;
   margin-bottom: 0;
}
.event-image {
   max-height: 56px;
}
   .map__content {
      display: none;
   }

   
}
/* 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;
   }
}