/* pages/home.css
   Homepage only (<body class="homepage">). */

/* homepage */


.homepage {
  color: black;
}

.homepage .salamat-title {
   font-weight: 400 !important;
}

.homepage > .container {
  --custom-max-width: 40rem;
  padding-top: 1.5rem;
}

.homepage .container img {
  margin: 0 auto;
  margin-bottom: 1rem;
}

.homepage article header {
  /*  The calligraphy will be aligned center, due to margin rule in ".container img" selector above. 
      BUT since we will be declaring max-width for <h2>, we have to introduce flex to align <h2> center.
      Note, Having "text-align: center" here does NOT do the job because we have max-width for our <h2>. 
  */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.homepage article .title {
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.4;
}

.homepage article header h2 {
  max-width: 40ch;
  /* We should have the following rule, so that if the text needs more than one line, it looks good. */
  text-align: center;
}

/* Sections on the homepage (books, honours) */

.homepage .home-section {
  margin-top: 2.5rem;
}

@media (max-width: 29.99rem) {
  .homepage .home-section {
    margin-top: 1.5rem;
  }
}

/* Gray heading with a long line stretching to each side. Flex + two pseudo-elements, so it
   works in RTL and LTR without any direction-specific rule. */
.homepage .section-title {
  --section-title-gray: #707070;
  --section-title-line: #d4d4d4;

  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: none;
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--section-title-gray);
  white-space: nowrap;
}

.homepage .section-title::before,
.homepage .section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: var(--section-title-line);
}

.homepage #honours {
  margin-top: 0;
  --custom-flow-space: 1.25rem;
  list-style: square;
  padding: 0;
  /* prevent the markers touch the edges on smaller screens. */
  padding-right: 12px;
}

.homepage #honours li p {
  line-height: 1.5;
  font-size: 1.15rem;
}

.homepage #honours li::marker {
   color: lightgray;
}

.homepage #honours li .subtext {
  margin-top: 0.25rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.homepage img {
  height: auto;
  /*  Actually the next rule is going to be overwritten afterwards, but we keep it, in case some day we omit 
      overwriting rules. */
  max-width: 100%;
}

/* Now an inline <svg> (previously an <img>), so it no longer picks up the
   generic ".container img" / ".homepage img" rules above (margin/centering,
   height: auto, max-width: 100%) — restated here to render at the same
   size and position as before. */
.homepage #calligraphy {
  display: block;
  width: 100%;
  height: auto;
  max-width: clamp(10rem, 80vw, 18rem);
  margin: 0 auto 1rem;
}

/* Sits in normal flow at the end of the page (not fixed to the viewport).
   Pulled left past body's side padding (--body-px, base.css) so it ends
   up only 4px from the actual edge, with the same 4px gap at the bottom. */
.homepage aside {
  margin-left: calc(-1 * var(--body-px) + 4px);
  margin-bottom: 4px;
}

.homepage #picoiran-logo {
  width: 48px;
  height: 38px;
}

.homepage footer {
  display: block;
  margin-top: 4rem;
  margin-bottom: 5rem;
}

.homepage .actions {
  display: flex;
  padding-top: 1rem;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 20rem;
}

.homepage .actions a {
  display: inline-block;
  text-align: center;
  outline: none;
  padding: .425rem 2.5rem;
  margin: 0 auto;
  border-radius: 1rem;
  text-decoration: none;
  font-size: 1.325rem;
  font-weight: 600;
  width: 100%;
}

/* Copied from btn-11 of https://codepen.io/yuhomyan/pen/OJMejWJ. */
.homepage #btn-go-to-app {
  transition: all 0.3s ease;
  position: relative;
  background: linear-gradient(to right, #ff9a47 0%, #e7a72e 51%, #d49a49 100%);
  color: #fff;
  overflow: hidden;
}

.homepage #btn-go-to-app::before {
  position: absolute;
  content: '';
  display: inline-block;
  top: -180px;
  left: 0;
  width: 30px;
  height: 100%;
  background-color: #fff;
  animation: shiny-btn1 6s ease-in-out infinite;
}

.homepage #btn-go-to-app:hover {
  opacity: .7;
}

.homepage #btn-go-to-app:active {
  box-shadow: 4px 4px 6px 0 rgba(255, 255, 255, .3),
    -4px -4px 6px 0 rgba(116, 125, 136, .2),
    inset -4px -4px 6px 0 rgba(255, 255, 255, .2),
    inset 4px 4px 6px 0 rgba(0, 0, 0, .2);
}

@keyframes shiny-btn1 {
  0% {
    -webkit-transform: scale(0) rotate(45deg);
    opacity: 0;
  }

  80% {
    -webkit-transform: scale(0) rotate(45deg);
    opacity: 0.5;
  }

  81% {
    -webkit-transform: scale(4) rotate(45deg);
    opacity: 1;
  }

  100% {
    -webkit-transform: scale(50) rotate(45deg);
    opacity: 0;
  }
}


.homepage #btn-go-to-direct-payment {
  background: linear-gradient(to right, #000000 0%, #434343 51%, #000000 100%);
  color: white;
  margin-bottom: .5rem;
}

.homepage #btn-go-to-direct-payment:hover {
  opacity: .7;
}

.homepage #btn-participate {
  /* background: linear-gradient(to right, #0c3f6e 0%, #1264a7 51%, #1c61a1 100%);
  color: white; */

  background: linear-gradient(to right, #000000 0%, #434343 51%, #000000 100%);
  color: white;
  margin-bottom: .5rem;
}

.homepage #btn-participate:hover {
  opacity: .7;
}

/* .homepage #btn-go-to-help {
  margin-top: .5rem;
  color: black;
  border: 2px solid black;
  font-weight: lighter;
} */


.homepage p.need-help {
  margin-top: .5rem;
  text-align: center;
  color: #434343;
}

.homepage #btn-go-to-help {
  line-height: 42px;
  padding: 0;
  border: 2px solid black;
  border-radius: 0;
  position: relative;
  color: rgb(0, 0, 0);
  font-size: 1.1rem;
  font-weight: lighter;
  transition: all .3s ease;
}
.homepage #btn-go-to-help:hover {
  color: white;
  background-color: black;
}