* {
  margin: 0;
  box-sizing: border-box;
}

body {
  direction: rtl;
  font-family: "iranyekanwebregularfanum.woff2", irany, Farhang;
  text-align: justify;
  text-justify: inter-word;
  line-height: 2.5;
  background-color: #eee;
}

@font-face {
  font-family: 'iranyekanwebregularfanum.woff2';
  src: url('../font/iranyekanwebmediumfanum.woff2') format('woff2'),
    url('../font/iranyekanwebregularfanum.woff2') format('woff2'),
    url('../font/iranyekanwebmediumfanum.woff2') format('woff2');
  font-display: swap;
}
.header {
  width: 100%;
  margin-top: 0.5em;
  padding: 1em;
  height: 10em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header img {
  width: 10%;
  height: auto;
}

.topnav {
  overflow: hidden;
  border-radius: 10px;
  transition-duration: 0.4s;
  cursor: pointer;
  background-color: white;
  color: #000000;
}

.topnav a {
  float: right;
  display: block;
  margin: 4px 2px;
  padding: 16px 32px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}

.topnav a:hover {
  color: black;
  background-color: #B2DDEB;
}

.topnav a.active {
  background-color: #008CBA;
  color: white;
}

.topnav .icon {
  display: none;
}

#myTopnav {
  position: sticky;
  top: 0;
}
.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.item {
    display: inline-block;
    width: 23%;
    margin: 0.3em;
    padding: 0.5em;
    height: 300px;
    border-radius: 10px;
    background-color: white;
    -webkit-transition-duration: 0.4s;
    /* Safari */
    transition-duration: 0.4s;
    cursor: pointer;
}

.item:hover {
    box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
}

.image {
    width: 100%;
    display: block;
    margin: 0 auto;
}

.caption {
    text-align: center;
    padding-top: 1.5em;
    font-size: 20px;
    cursor: pointer;
    border-top: 2px solid #008CBA;
}
/* foote starts */
.footer {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.text {
  display: inline-block;
  width: 23%;
  margin: 0.5em;
  padding: 1em;
  text-align: center;
  border-right: 5px solid #008CBA;
}

/* footer ends */
@media only screen and (max-width: 900px) {
  .header {
    flex-direction: column-reverse;
  }

  .header img {
    width: 20%;
    padding-top: 1em;
  }

  /* Topnav start */
  .topnav a:not(:first-child) {
    display: none;
  }

  .topnav a.icon {
    float: left;
    display: inline;
  }

  .topnav.responsive {
    position: relative;
  }

  .topnav.responsive .icon {
    position: absolute;
    left: 0;
    top: 0;
  }

  .topnav.responsive a {
    float: none;
    display: block;
    text-align: right;
  }

  /* top nav ends */
  .container {
    flex-direction: column;
  }

  .item {
    width: 98%;
  }

  .image {
    width: 50%;
  }

  .text {
    width: 47%;
  }

  .content {
    flex-direction: column;
  }

  .pagecontent {
    width: 98%;
  }

  .sidenav {
    width: 100%;
  }

  #mySidenav {
    display: none;
  }

  .footer {
    flex-direction: column;
  }
}