@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap");

:root {
  --bg-main: rgb(224, 223, 223);
  --bg-additional: #010103;
  --blue-color: rgb(0, 204, 255);
  --blue-text-color: #0f76ce;
  --red-color-text: rgb(209, 14, 14);
  --text-backgound-color: rgba(255, 255, 255);
}
* {
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-decoration: none;
}

html {
  overflow-x: hidden;
  scroll-padding-top: 4.9rem;
}

body {
  background-color: var(--bg-main);
}

a {
  color: inherit;
}

img {
  cursor: pointer;
}
/* header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-additional);
  height: 5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

header .logo-image {
  height: 4.5rem;
  margin-left: 2rem;
  padding-top: 0.25rem;
}

header nav a {
  color: white;
  padding: 0.4rem;
  font-size: larger;
  text-transform: capitalize;
}

header nav a:hover {
  color: var(--blue-color);
  border-bottom: 0.1rem solid yellow;
  border-top: 0.1rem solid yellow;
}

header p.city {
  font-size: 1.6rem;
  color: yellow;
  margin-right: 2rem;
  text-transform: capitalize;
}

header p.city span {
  color: var(--blue-color);
}

header .menu-btn {
  height: 2.2rem;
  background-color: white;
  display: none;
  border-radius: 15%;
  margin-right: 1.2rem;
  cursor: pointer;
}

/* main section */

h2 {
  text-align: center;
  text-transform: uppercase;
  padding: 1rem;
  color: rgb(0 138 255);
}

/* home */

section.home {
  min-height: 100vh;
  display: flex;
  justify-content: space-between;
  background: url(../images/bg-img.jpg);
  background-size: cover;
  background-position: center;
}

section.home div {
  margin-top: 8rem;
  padding: 4rem;
  text-transform: uppercase;
  font-size: 1.8rem;
  text-align: center;
}

section.home div h2 {
  color: rgb(1, 29, 46);
  padding: 0;
}

section.home div p {
  margin-top: 1rem;
  color: rgb(87, 1, 44);
}

/* about section*/

section.about {
  min-height: 100vh;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

section.about .about-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

section.about .about-content-container {
  width: 80%;
  background: var(--text-backgound-color);
  display: flex;
}

section.about .img-city-flags-container {
  width: 30%;
  padding-left: 2rem;
  position: sticky;
  position: -webkit-sticky;
  align-self: flex-start;
  height: auto;
  top: 5rem;
}

.img-city-flags-container div {
  width: 100%;
  margin: 1rem 0;
  border: 1px solid grey;
  background-color: rgb(218, 223, 218);
}

.img-city-flags-container div img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1rem;
  width: 90%;
}

.img-city-flags-container div p {
  text-align: center;
  margin: 0.6rem 0.2rem;
}

.about-city-info-container {
  width: 70%;
  padding: 2rem;
}
.about-city-info-container p {
  margin-top: 1.4rem;
  line-height: 1.4rem;
  letter-spacing: 0.1rem;
  font-size: 1rem;
  text-align: justify;
}

.about-city-info-container p span {
  font-weight: bolder;
}

.about-city-info-container p span.map-link {
  color: var(--blue-text-color);
}

.about-city-info-container p span.map-link:hover {
  text-decoration: underline;
}

.about-city-info-container img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.4rem;
  width: 80%;
}

.about-city-info-container div.table-population {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-city-info-container table {
  border-collapse: collapse;
  margin: 4rem 0 2rem;
  width: 80%;
}

.about-city-info-container table,
th,
td {
  border: 1px solid black;
  padding: 0.8em 0.6em;
  text-align: center;
}

.about-city-info-container table th.population {
  background-color: #b1afaf;
  text-transform: uppercase;
}

.about-city-info-container table th.nationality {
  background-color: rgb(218, 223, 218);
}

.about-city-info-container table td:first-child {
  color: var(--red-color-text);
  font-weight: bolder;
}

.about-city-info-container table th {
  background-color: rgb(109, 209, 226);
}

section.about .city-compare-container {
  display: flex;
  flex-direction: column;
  background-color: rgb(218, 223, 218);
}

section.about .img-compass-earth-container {
  display: flex;
  justify-content: space-around;
  margin-top: 5rem;
  width: 80%;
}

div.globe-img,
.compass-img {
  width: 25%;
}

.img-compass-earth-container img {
  cursor: auto;
}

section.about .city-compare-container {
  width: 80%;
  margin-top: 5rem;
  border-radius: 0.7rem;
  background-color: var(--blue-text-color);
}

section.about .city-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

section.about .city-form-container h2 {
  padding: 3rem 0 1rem;
  color: white;
}

section.about .form-input-city {
  width: 15rem;
  border: none;
  font-size: 1.7rem;
  text-align: center;
  color: var(--red-color-text);
  padding: 0.3rem 1rem;
  border-radius: 0.7rem;
  font-weight: bolder;
}

section.about .city-label {
  display: block;
  font-size: 1.3rem;
  color: rgb(201, 197, 197);
  padding-bottom: 0.2rem;
  letter-spacing: 0.1rem;
}
section.about .city-btn {
  border: none;
  border-radius: 0.7rem;
  font-size: 1.7rem;
  text-align: center;
  padding: 0.3rem 0.4rem;
  display: inline-block;
  cursor: pointer;
  margin-left: 0.3rem;
  background-color: rgb(144, 236, 231);
  color: rgb(11, 76, 131);
}

section.about .city-btn:hover {
  background-color: orange;
  color: black;
}

section.about .compare-cities {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  font-size: 2rem;
}

section.about .city {
  background-color: #fff;
  font-size: 1.8rem;
  width: 20rem;
  height: 33rem;
  border-radius: 0.7rem;
  margin: 0 3rem;
}

section.about .city-data {
  padding: 1.7rem 3rem;
}

section.about .city-data-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 13rem;
}

section.about .city-name {
  font-size: 2.7rem;
  margin-bottom: 0.7rem;
}

section.about .city-country {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  color: var(--red-color-text);
}

section.about .city-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1.9rem;
}

section.about .city-row img.compare-city {
  margin-left: -0.5rem;
  height: 3rem;
  cursor: auto;
}

section.about .city-error-message {
  background-color: #fff;
  font-size: 1.8rem;
  width: 20rem;
  height: 33rem;
  border-radius: 0.7rem;
  margin: 0 3rem;
  color: orangered;
  text-align: center;
}

section.about .city-error-message p {
  padding: 0.2rem;
  margin-top: 2rem;
}

/* history  section*/

section.history .history-container {
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

section.history .history-content {
  width: 80%;
  background-color: var(--text-backgound-color);
}

section.history .history-content {
  padding: 0 2rem;
}

section.history .history-content h3 {
  text-align: center;
  text-transform: uppercase;
  padding: 1rem 0;
  margin-top: 1.5rem;
}

section.history .history-content p {
  line-height: 1.4rem;
  margin-top: 0.8rem;
  text-align: justify;
  letter-spacing: 0.1rem;
}

section.history .history-content p:last-child {
  margin-bottom: 0.8rem;
}

section.history .history-img-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  text-align: center;
  justify-content: space-around;
}

section.history .history-img-container img {
  display: block;
  width: 14rem;
}

section.history p.img-description {
  text-align: center;
}

section.history img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 60%;
  margin-top: 0.8rem;
}

section.history .history-text img.old-map:hover {
  transform: none;
  cursor: auto;
}

section.history .history-text p.img-description {
  text-align: center;
}

section.history .history-text p.img-description:last-child {
  padding-bottom: 0.8rem;
}

/*articles  section*/

article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.articles-container {
  background: var(--text-backgound-color);
  padding: 1rem;
  width: 80%;
}

.articles-container h3 {
  font-size: 2.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.articles-container h3 span {
  color: var(--blue-text-color);
  cursor: pointer;
}

.articles-container h3 span:hover {
  text-decoration: underline;
}

p.open-article,
p.close-article {
  color: var(--blue-text-color);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0;
  width: 8rem;
}
p.close-article {
  width: 8.3rem;
}

p.open-article:hover,
p.close-article:hover {
  text-decoration: underline;
}

.articles-container p {
  line-height: 1.5rem;
  text-align: justify;
}

article .article-open {
  display: none;
}

/*visit section*/

section.visit {
  min-height: 100vh;
  background-color: var(--bg-main);
}

section.visit .visit-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 0.5rem;
}

section.visit .visit-container .visit-info {
  height: 30rem;
  width: 30rem;
  background-color: var(--text-backgound-color);
}

section.visit .visit-container .visit-img-container {
  height: 27rem;
}
section.visit .visit-container img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

section.visit .visit-container div.text-container {
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

section.visit .visit-container .text-container p {
  text-align: center;
}

/*events section*/

section.events {
  background-color: var(--bg-main);
}

section.events .events-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 0.5rem;
}

section.events .events-container .event-info {
  height: 30rem;
  width: 30rem;
  background-color: var(--text-backgound-color);
}

section.events .event-image-container {
  height: 27rem;
}

section.events img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

section.events div.event-text {
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* map section */

section.mapCity {
  background-color: rgb(238, 161, 130);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-main);
}
section.mapCity #map {
  height: 65vh;
  width: 100%;
  object-fit: cover;
  z-index: 0;
}

/* gallery section */

section.gallery {
  background-color: var(--bg-main);
}

section.gallery .gallery-slider {
  height: 51rem;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0px -8px 6px -6px rgb(158, 158, 240);
}

section.gallery .gallery-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  transition: transform 1s;
}

section.gallery .text-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2rem;
}

section.gallery h2 {
  padding-bottom: 0.5rem;
}

section.gallery p {
  letter-spacing: 0.1rem;
  font-size: 1.2rem;
  color: rgb(150 12 74);
}

section.gallery img {
  width: 100%;
  height: 49rem;
  object-fit: cover;
  cursor: auto;
}

section.gallery .slider-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  background: rgba(255, 255, 255);
  opacity: 0.5;
  border-radius: 50%;
  height: 5.5rem;
  width: 5.5rem;
  cursor: pointer;
}

section.gallery .gallery-slider-btn-left {
  left: 6%;
  transform: translate(-50%, -50%);
}

section.gallery .gallery-slider-btn-right {
  right: 6%;
  transform: translate(50%, -50%);
}

section.gallery .gallery-dots {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}

section.gallery .gallery-dots-dot {
  border: none;
  background-color: #b9b9b9;
  opacity: 0.7;
  height: 1rem;
  width: 1rem;
  border-radius: 50%;
  margin-right: 1.75rem;
  cursor: pointer;
  transition: all 0.5s;
}

.gallery-dots .gallery-dots-dot:last-child {
  margin: 0;
}

section.gallery .dots-dot-active {
  background-color: #fff;
  opacity: 1;
}

/* footer */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: darkgrey;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  gap: 1rem;
}

footer .links a {
  font-size: 1.6rem;
  padding: 0.5rem 2rem;
  border: 1px solid black;
  border-radius: 2rem;
  font-size: 1.5rem;
}

footer .links a:hover {
  background-color: var(--blue-color);
  color: #4b4a4a;
  border-color: #4b4a4a;
}

footer img {
  height: 5rem;
  padding: 0.5rem;
}

footer img:hover {
  transform: scale(1.3);
}

footer .author-info p {
  text-align: center;
  font-size: 2rem;
  padding: 1.5rem;
  font-size: medium;
}

footer .author-info p span {
  color: rgb(199, 5, 76);
}

footer .author-info p a:hover {
  color: rgb(105, 36, 94);
}

/* MODAL WINDOW */

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background-color: #f3f3f3;
  padding: 5rem 6rem;
  box-shadow: 0 4rem 6rem rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 1.5s;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  transition: all 0.5s;
}

.modal img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-close-modal {
  font-family: inherit;
  color: inherit;
  position: absolute;
  top: 0.5rem;
  right: 2rem;
  font-size: 4rem;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none;
}

/* media queries  */

@media (max-width: 1350px) {
  section.home div {
    margin-top: 6rem;
    font-size: 1.5rem;
  }
}

@media (max-width: 991px) {
  html {
    font-size: 90%;
  }

  section.home div {
    padding: 3rem;
    font-size: 1.4rem;
  }

  section.about .about-content-container {
    width: 90%;
  }

  section.about .globe-img,
  .compass-img {
    width: 40%;
  }

  section.history .history-img-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: space-around;
  }

  section.about .about-content-container {
    width: 100%;
  }

  section.history .history-img-container img {
    display: block;
    width: 60%;
  }

  section.history img {
    width: 80%;
  }
}

@media (max-width: 879px) {
  .header .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgb(52, 59, 63);
    width: 70%;
    height: calc(100vh - 9.5rem);
  }

  .header .navbar.hide {
    display: none;
  }
  .header .navbar a {
    color: white;
    display: block;
    margin: 1.2rem;
    padding: 0.9rem;
    font-size: 1.8rem;
    text-align: center;
  }
  .header .navbar a:hover {
    background-color: rgb(15, 17, 19);
    color: white;
    margin-right: 0;
    margin-left: 0;
    border: none;
  }

  header .menu-btn {
    display: inline-block;
    transition: 0.3s linear all;
  }

  header .logo-image {
    margin-left: 1.2rem;
  }

  header .menu-btn.rotate {
    transform: rotate(90deg);
    transition: 0.3s linear all;
  }
  section.about .compare-cities {
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: center;
    gap: 1rem;
  }

  section.gallery .slider-btn {
    height: 5rem;
    width: 5rem;
  }
}

@media (max-width: 768px) {
  section.home div {
    margin-top: 5rem;
    padding: 2rem;
    font-size: 1.3rem;
  }

  section.about div.img-compass-earth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
  }

  section.about .globe-img,
  .compass-img {
    width: 65%;
  }

  section.about .compass-img {
    margin-top: 2rem;
  }

  section.about .about-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  section.about .img-city-flags-container {
    position: static;
    align-self: auto;
    width: 55%;
    padding-left: 0;
  }

  section.about .about-city-info-container {
    width: 100%;
  }

  section.about .about-city-info-container table,
  th,
  td {
    padding: 0.5em 0.4em;
  }

  section.history .history-content {
    width: 100%;
  }

  section.history img {
    width: 90%;
  }

  .articles-container {
    width: 100%;
  }

  div.mapCity {
    border: none;
  }
  div.mapCity #map {
    width: 100%;
  }

  section.gallery .slider-btn {
    height: 4rem;
    width: 4rem;
  }

  section.gallery .gallery-slider-btn-left {
    left: 8%;
  }

  section.gallery .gallery-slider-btn-right {
    right: 8%;
  }
}

@media (max-width: 600px) {
  .modal {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 70%;
  }
  section.about .img-city-flags-container {
    width: 60%;
  }

  .modal {
    width: 100%;
    height: auto;
  }
}
