/* ==========================================================================
   Reusable components. Sizes in rem (1rem = 10 design px) — see base.css.
   ========================================================================== */

/* ---------- Page banner: dark green strip with an underlined title ---------- */
.page-banner {
  display: flex; flex-direction: column; align-items: center;
  height: 18rem; padding-top: 5.1rem;
  background: var(--green-900); color: var(--cream); text-align: center;
}
.page-banner__title {
  display: inline-block; position: relative;
  font-weight: var(--heavy); font-size: 5.2rem; line-height: 6.24rem;
}
.page-banner__title::after { /* lilac underline, slightly narrower than the text */
  content: ""; position: absolute; left: .3rem; right: .6rem; bottom: -.5rem;
  border-top: .5rem solid var(--lilac-500);
}
@media (max-width: 600px) {
  .page-banner { height: 8.1rem; padding-top: 2rem; }
  .page-banner__title { font-size: 2.6rem; line-height: 3.12rem; }
  .page-banner__title::after { left: -.2rem; right: -.1rem; bottom: -.5rem; }
}

/* ---------- Contact form (contact/templates/contact/form.html) ---------- */
.contact-form {
  display: grid; grid-template-columns: 20.2rem 20.2rem; column-gap: 1.8rem;
  width: 45.8rem; padding: 1.6rem 1.8rem;
  color: var(--ink);
}
.contact-form__field { grid-column: 1 / -1; margin-bottom: 1.4rem; }
.contact-form__field--half { grid-column: auto; }
.contact-form label { display: block; margin-bottom: .9rem; padding-left: .2rem; font-size: 1.9rem; line-height: 1; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; height: 3.7rem; padding: .3rem .3rem .3rem 1rem;
  border: 1px solid var(--ink); background: var(--cream);
  font-size: 1.9rem; line-height: normal;
}
.contact-form textarea { height: 8.6rem; padding: 1.05rem 1rem .3rem; resize: none; }
.contact-form__field:nth-of-type(4) { margin-top: .4rem; }
.contact-form__submit {
  grid-column: 1 / -1; justify-self: end;
  width: 11.7rem; height: 7rem; margin-top: 1.5rem;
  border: 1px solid var(--lime); border-radius: 10rem; background: var(--lime);
  font-size: 1.9rem; line-height: 2.66rem; color: var(--cream);
  transition: background-color .4s ease, border-color .4s ease, color .4s ease;
}
.contact-form__submit:hover { background: var(--cream); border-color: var(--sage); color: var(--sage); }
.contact-form__notice { grid-column: 1 / -1; margin-top: 1.6rem; font-size: 1.6rem; color: var(--purple); }

@media (max-width: 600px) {
  .contact-form { display: block; width: 29.6rem; padding: 1rem 1.3rem; }
  .contact-form__field { margin-bottom: 1rem; }
  .contact-form__field:nth-of-type(4) { margin-top: 0; }
  .contact-form input { height: 3.9rem; }
  .contact-form textarea { height: 8.5rem; padding-top: 1.125rem; }
  .contact-form__submit { width: 100%; height: 4.2rem; margin-top: 0; font-size: 1.773rem; line-height: 2.482rem; }
}

/* ---------- Pill buttons ---------- */
.btn {
  display: inline-grid; place-items: center;
  border-radius: 20rem; text-decoration: none; text-align: center;
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .2s ease;
}
.btn--lilac { padding: 1.4rem 4rem; background: var(--lilac-300); color: var(--cream); font-size: 1.8rem; }
.btn--lilac:hover { background: var(--purple); color: var(--white); }

/* ---------- Rounded first photo (same inset and corners as the homepage hero) ---------- */
.photo-rounded { margin-left: 7.2rem; margin-right: 7.2rem; border-radius: 2rem; overflow: hidden; }
/* Same height as the homepage hero. The doubled class outranks the pages' own height rules
   (.parmums-hero, .pirmsskola-photo, .skola-photo …), which also size other photos further down. */
.photo-rounded.photo-rounded { height: auto; aspect-ratio: 1238 / 519; }
.photo-rounded.photo-rounded :is(div, picture, img) { display: block; width: 100%; height: 100%; }
.photo-rounded.photo-rounded img { max-width: none; object-fit: cover; }
@media (max-width: 600px) {
  .photo-rounded { margin-left: 1.6rem; margin-right: 1.6rem; border-radius: 1.6rem; }
  .photo-rounded.photo-rounded { aspect-ratio: auto; height: 24rem; }
}
