/*
 * Stories Beyond Stone brand theme, based on Faisal Tahseen's redesign.
 * Loaded after style.css, so these rules replace the template's defaults.
 */
:root {
  --sbs-cream: #f1ede2;
  --sbs-cream-light: #f9f7f2;
  --sbs-text: #5f615e;       /* 5.3:1 on cream, darker than the original #747673 for readability */
  --sbs-heading: #2f2d2a;
  --sbs-button-hover: #4a4540;
  --sbs-link: #7d5f1a;       /* The logo's gold, darkened so it's readable as text */
  --sbs-gold: #eba90c;       /* For decoration only: too light for text */
}

body,
p,
.footer-manu a,
.navigation .navbar .navbar-nav > li > a,
.btn {
  font-family: "Zain", sans-serif;
}

body,
p {
  color: var(--sbs-text);
  font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--sbs-heading);
  font-family: "Nanum Myeongjo", serif;
}

main a:not(.btn) {
  color: var(--sbs-link);
}

.feature p {
  color: var(--sbs-text);
}

/* Header */
.navigation {
  background: var(--sbs-cream);
}

.navigation .navbar-brand img {
  height: 54px;
  width: auto;
}

.navigation .navbar .navbar-nav > li > a {
  color: var(--sbs-button-hover);
  font-size: 15px;
  font-weight: 700;
}

.navigation .navbar-toggler {
  color: var(--sbs-heading);
}

/* Page headers: text on a plain background, never across a photo */
.slider,
.page-title {
  background: var(--sbs-cream);
}

.slider:before,
.page-title:before {
  display: none;
}

.slider {
  border-top: 1px solid rgba(47, 45, 42, 0.1);
  padding: 48px 0;
}

.slider .block h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-title .block h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.page-title {
  border-top: 1px solid rgba(47, 45, 42, 0.1);
  padding: 64px 0;
}

.slider .block h1,
.page-title .block h1 {
  color: var(--sbs-heading);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
  text-transform: none;
}

.slider .block h1:after,
.page-title .block h1:after {
  background: var(--sbs-gold);
  content: "";
  display: block;
  height: 2px;
  margin: 20px auto 0;
  width: 72px;
}

.slider .block p,
.page-title .block p {
  color: var(--sbs-text);
  font-size: 19px;
}

/* Home page sections */
.home-subhead {
  font-size: 22px;
  margin: 28px 0 8px;
}

.home-benefits {
  background: var(--sbs-cream-light);
}

.call-to-action {
  background: var(--sbs-button-hover);
}

.call-to-action h2,
.call-to-action p {
  color: #fff;
}

.call-to-action .btn-main {
  background: var(--sbs-cream);
  border: 0;
  color: var(--sbs-heading);
}

.call-to-action .btn-main:hover {
  background: #fff;
  color: var(--sbs-heading);
}

/* FAQ accordion, from Faisal's design */
.faq-section {
  background: var(--sbs-cream);
  padding: 60px 0;
}

.faq-section .col-md-12 {
  margin: 0 auto;
  max-width: 800px;
}

.faq-item {
  background: #fff;
  border: 1px solid #e0dbd5;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 15px;
}

.faq-question {
  align-items: center;
  color: var(--sbs-heading);
  cursor: pointer;
  display: flex;
  font-size: 1.15rem;
  font-weight: 700;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
  padding: 20px 25px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  color: var(--sbs-text);
  content: "+";
  flex-shrink: 0;
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 25px 10px;
}

/* Buttons */
.btn-main:hover,
.btn-small:hover,
.btn-transparent:hover {
  background: var(--sbs-button-hover);
  color: #fff;
}

.btn-main,
.btn-small,
.btn-transparent {
  border-radius: 28px;
  letter-spacing: 0.5px;
  text-transform: none;
}

/* Footer */
.footer {
  background: var(--sbs-cream);
}

.footer-manu a,
.copyright {
  color: var(--sbs-text);
}

@media (max-width: 768px) {
  .navigation .navbar-brand img {
    height: auto;
    width: min(60vw, 360px);
  }

  .slider {
    padding: 40px 0;
  }

  .page-title {
    padding: 44px 0;
  }
}

/* Space between a section's button and the photo stacked below it on phones */
@media (max-width: 767px) {
  .about .block img {
    margin-top: 32px;
  }
}

/* Full-width photos between sections. Text never sits on them. */
.photo-band {
  height: 380px;
  overflow: hidden;
}

.photo-band img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.photo-band-top {
  height: 300px;
}

.photo-band-home-sunrise img {
  object-position: center 72%;
}

@media (max-width: 768px) {
  .photo-band-top {
    height: 220px;
  }
}

.photo-band-tributes-lilies img {
  object-position: center 25%;
}

.photo-band-contact-coast img {
  object-position: center 45%;
}

.about .about-img {
  max-height: 560px;
}

.about .about-img img {
  opacity: 1;
  height: 560px;
  object-fit: cover;
  object-position: center 40%;
  width: 100%;
}

/* Button groups keep their spacing when they wrap, and stack full width on phones */
.tribute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tribute-actions form {
  margin: 0;
}

/* The template's outlined button has white text, which disappears on these light backgrounds */
.tribute-actions .btn-solid-border,
.tribute-detail .btn-solid-border {
  background: transparent;
  border: 1px solid var(--sbs-heading);
  color: var(--sbs-heading);
}

.tribute-actions .btn-solid-border:hover,
.tribute-detail .btn-solid-border:hover {
  background: var(--sbs-button-hover);
  border-color: var(--sbs-button-hover);
  color: #fff;
}

.tribute-portrait {
  border-radius: 50%;
  height: 180px;
  object-fit: cover;
  width: 180px;
}

.tribute-icon {
  border-radius: 50%;
  display: inline-block;
  height: 40px;
  line-height: 40px;
  margin-right: 10px;
  object-fit: cover;
  text-align: center;
  vertical-align: middle;
  width: 40px;
}

.tribute-icon-blank {
  background: var(--sbs-cream);
  color: var(--sbs-heading);
  font-weight: 600;
}

.tribute-name-cell {
  white-space: nowrap;
}

.tribute-row {
  cursor: pointer;
}

.portrait-crop-area {
  max-height: 420px;
}

.portrait-crop-area img {
  display: block;
  max-width: 100%;
}

.memory-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-photos img {
  border-radius: 4px;
  height: 140px;
  object-fit: cover;
  width: 140px;
}

@media (max-width: 575px) {
  .tribute-actions {
    flex-direction: column;
  }

  .tribute-actions .btn,
  .tribute-actions form {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .photo-band {
    height: 220px;
  }

  .about .about-img,
  .about .about-img img {
    height: 380px;
  }
}

/* Tribute page: a calm header, the story beside where they rest, then full-width sections */
.tribute-owner-bar {
  background: var(--sbs-cream-light);
  border-bottom: 1px solid rgba(47, 45, 42, 0.1);
  padding: 12px 0;
}

.tribute-owner-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.tribute-owner-status:empty {
  display: none;
}

.tribute-owner-status {
  flex-basis: 100%;
}

.tribute-hero {
  background: var(--sbs-cream);
  padding: 48px 0 32px;
  text-align: center;
}

.tribute-hero .tribute-portrait {
  border: 5px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: block;
  margin: 0 auto 20px;
}

.tribute-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.2;
  margin-bottom: 12px;
}

.tribute-dates {
  color: var(--sbs-heading);
  font-size: 20px;
  margin-bottom: 20px;
}

.tribute-sections {
  display: flex;
  flex-wrap: wrap;
  font-size: 18px;
  gap: 8px 24px;
  justify-content: center;
}

.tribute-intro {
  margin: 48px auto;
  max-width: 720px;
}

.tribute-intro.has-where {
  align-items: start;
  column-gap: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  max-width: none;
}

.tribute-intro.has-where .tribute-where {
  grid-column: 2;
  grid-row: 1;
}

.tribute-intro.has-where .tribute-story {
  grid-column: 1;
  grid-row: 1;
}

.tribute-story p {
  color: #3f3e3b;
  font-size: 20px;
  line-height: 1.75;
  margin-bottom: 1.2em;
}

.tribute-where {
  background: var(--sbs-cream);
  border-radius: 8px;
  padding: 24px;
}

.tribute-where h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.tribute-where figure {
  margin: 0 0 16px;
}

.tribute-where .area-photo-frame {
  display: block;
  width: 100%;
}

.tribute-where .area-photo-frame img {
  width: 100%;
}

.tribute-where figcaption {
  font-size: 15px;
  margin-top: 6px;
}

.tribute-map {
  margin-bottom: 12px;
}

.tribute-map iframe {
  border: 0;
  border-radius: 4px;
  display: block;
  height: 260px;
  width: 100%;
}

.tribute-section {
  border-top: 1px solid rgba(47, 45, 42, 0.1);
  padding: 44px 0;
}

.tribute-section > h2 {
  font-size: 1.7rem;
  margin-bottom: 24px;
  text-align: center;
}

.tribute-videos {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.tribute-videos.is-single {
  display: block;
  margin: 0 auto;
  max-width: 800px;
}

.tribute-memories .tribute-memory {
  background: var(--sbs-cream-light);
  border-radius: 8px;
  margin: 0 auto 16px;
  max-width: 760px;
  padding: 24px;
}

.tribute-memory p {
  color: #3f3e3b;
  font-size: 18px;
}

.tribute-memory .tribute-memory-by {
  color: var(--sbs-text);
  font-size: 16px;
  font-style: italic;
  margin-bottom: 0;
}

.tribute-footer {
  border-top: 1px solid rgba(47, 45, 42, 0.1);
  padding: 36px 0 56px;
  text-align: center;
}

.tribute-share {
  margin: 20px 0;
}

.tribute-share h2 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

@media (max-width: 991px) {
  .tribute-intro.has-where {
    display: block;
  }

  .tribute-intro.has-where .tribute-where {
    margin-bottom: 32px;
  }
}

@media (max-width: 575px) {
  .tribute-videos {
    grid-template-columns: minmax(0, 1fr);
  }

  .tribute-story p {
    font-size: 18px;
  }
}

/* Tribute editor: one part at a time, with a list of the parts beside it */
.edit-header {
  background: var(--sbs-cream);
  border-top: 1px solid rgba(47, 45, 42, 0.1);
  padding: 24px 0;
}

.edit-header-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.edit-header h1 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.edit-layout {
  align-items: start;
  column-gap: 40px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1120px;
  padding-bottom: 64px;
  padding-top: 32px;
}

.edit-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 16px;
}

main .edit-nav a,
.edit-nav a {
  align-items: center;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--sbs-heading);
  display: flex;
  font-size: 17px;
  justify-content: space-between;
  padding: 10px 14px;
  text-decoration: none;
}

.edit-nav a:hover {
  background: var(--sbs-cream-light);
}

main .edit-nav a[aria-current],
.edit-nav a[aria-current] {
  background: var(--sbs-cream);
  border-left-color: var(--sbs-link);
  font-weight: 700;
}

.edit-count {
  background: rgba(47, 45, 42, 0.1);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
}

.edit-count-new {
  background: #c0392b;
  color: #fff;
}

.edit-panel {
  margin-bottom: 40px;
}

.edit-panel[hidden] {
  display: none;
}

.edit-panel > h2 {
  border-bottom: 1px solid rgba(47, 45, 42, 0.12);
  font-size: 1.7rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
}

.edit-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.edit-panel label {
  color: var(--sbs-heading);
  font-size: 16px;
  font-weight: 700;
}

.edit-panel .form-check-label {
  font-weight: 400;
}

.edit-panel .form-control {
  font-size: 17px;
  height: auto;
  padding: 10px 12px;
}

.edit-panel .form-control-sm {
  font-size: 15px;
  padding: 6px 10px;
}

.edit-panel .form-text {
  font-size: 15px;
  line-height: 1.45;
}

.edit-two {
  column-gap: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.edit-subsection {
  background: var(--sbs-cream-light);
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 20px;
}

.portrait-summary {
  align-items: center;
  display: flex;
  gap: 20px;
}

.portrait-summary .tribute-portrait {
  flex-shrink: 0;
  height: 110px;
  width: 110px;
}

.edit-photos {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.edit-photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-photo img {
  aspect-ratio: 1;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.edit-photo .form-check-label {
  font-size: 15px;
}

/* Stays in view at the bottom of the screen, so saving is always one click away */
.edit-savebar {
  background: #fff;
  border-top: 1px solid rgba(47, 45, 42, 0.15);
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 0;
  position: sticky;
  z-index: 5;
}

.edit-savebar .btn-solid-border,
.edit-panel .btn-solid-border {
  background: transparent;
  border: 1px solid var(--sbs-heading);
  color: var(--sbs-heading);
}

.edit-savebar .btn-solid-border:hover,
.edit-panel .btn-solid-border:hover {
  background: var(--sbs-button-hover);
  border-color: var(--sbs-button-hover);
  color: #fff;
}

@media (max-width: 991px) {
  .edit-layout {
    display: block;
    padding-top: 16px;
  }

  /* On phones the list becomes one row to swipe along */
  .edit-nav {
    background: #fff;
    border-bottom: 1px solid rgba(47, 45, 42, 0.12);
    flex-direction: row;
    margin: 0 -15px 24px;
    overflow-x: auto;
    padding: 0 15px 8px;
    position: static;
  }

  main .edit-nav a,
  .edit-nav a {
    border-left: 0;
    border-radius: 18px;
    flex-shrink: 0;
    font-size: 16px;
    gap: 6px;
    padding: 8px 14px;
    white-space: nowrap;
  }
}

@media (max-width: 575px) {
  .edit-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .edit-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .edit-savebar .btn {
    flex: 1 1 100%;
  }

  .portrait-summary {
    align-items: flex-start;
  }

  .portrait-summary .tribute-portrait {
    height: 80px;
    width: 80px;
  }
}

.tribute-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tribute-gallery figure {
  flex: 0 1 175px;
  margin: 0;
}

@media (max-width: 575px) {
  .tribute-gallery figure {
    flex-basis: calc(50% - 6px);
  }
}

.tribute-gallery img {
  aspect-ratio: 1;
  border-radius: 4px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.tribute-gallery figcaption {
  font-size: 0.9rem;
  margin-top: 4px;
}

.tribute-more-photos summary {
  cursor: pointer;
  font-weight: 600;
  margin: 16px 0;
  text-align: center;
}

.area-photo-frame {
  display: inline-block;
  max-width: 100%;
  position: relative;
}

.area-photo-frame[hidden] {
  display: none;
}

.area-photo-frame img {
  border-radius: 4px;
  display: block;
  max-height: 480px;
  max-width: 100%;
}

.area-photo-picker img {
  cursor: crosshair;
}

.area-marker {
  background: #c0392b;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
  height: 22px;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
}

.area-marker[hidden] {
  display: none;
}

.tribute-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* The full logo is too wide beside the open menu at these widths, so show the letters alone. */
.navigation .navbar-brand .brand-mark {
  display: none;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .navigation .navbar-brand .brand-full {
    display: none;
  }

  .navigation .navbar-brand .brand-mark {
    display: inline-block;
  }
}
