/*
The bakery demo avoids using tooling so doesn't use SASS. This is a static
CSS file that extends Bootstrap. It's deliberately verbose to aid
readability with global themes, themes for each list view and themes for
each detail view
1. Global styles
2. Page header
3. Main menu
4. Breadcrumb
5. Location styles
6. Blog styles
8. Form styles
9. Homepage styles
9. Miscellaneous/ Helper styles
*/

/* Global styles */

/* CSS Variables */
/* TODO: Define colour variables */

:root {
  --dark: #333;
  --grey: #6e6e6e;
  --border-grey: #e1dcd3;
  --transparent-border: rgb(135 116 79 / 25%);
  --white: #fff;
  --cream: #f5f3e9;
  --light-brown: #87744f;
  --mid-brown: #825600;
  --dark-brown: #553801;
  --orange: #a92000;
  --dark-orange: #833701;
  --font--primary: "Marcellus", serif;
  --font--secondary: "Open Sans", sans-serif;
  --font-sm: 1rem;
  --font-md: 1.125rem;
}

html {
  font-size: 16px;
}

[hidden] {
  display: none !important;
}

/* Body */

body {
  font-family: var(--font--secondary);
  font-size: 1rem;
  line-height: 1.5;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--white);
  color: var(--dark);
  min-height: 100vh;
}

body.no-scroll {
  overflow-y: hidden;
}

@media (min-width: 768px) {
  body {
    font-size: var(--font-md);
    line-height: 1.55;
  }
}

/* Headings and Paragraphs */

h1,
h2,
h3 {
  font-family: var(--font--primary);
}

h1 {
  font-size: 2.375rem;
  line-height: 1.16;
}

h2 {
  font-size: 2rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.625rem;
  line-height: 1.15;
}

h4 {
  font-family: var(--font--secondary);
  font-style: normal;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.35;
}

p {
  font-family: var(--font--secondary);
  font-style: normal;
  font-weight: 400;
  font-size: var(--font-sm);
  line-height: 1.5;
}

@media (min-width: 768px) {
  body {
    font-size: var(--font-md);
    line-height: 1.55;
  }

  h1 {
    font-size: 3.75rem;
    line-height: 1.07;
  }

  h2 {
    font-size: 2.875rem;
    line-height: 1.09;
  }

  h3 {
    font-size: 2rem;
    line-height: 1.31;
  }

  h4 {
    font-size: 1.5rem;
    line-height: 1.38;
  }

  p {
    font-size: var(--font-md);
    line-height: 1.55;
    margin: 0 0 30px;
  }
}

ol,
ul {
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .intro {
    font-size: 1.875rem;
    margin: 0 0 60px;
  }
}

/* Links, Lists */

a,
a:focus {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  color: var(--dark-orange);
  text-decoration: none;
}

a.btn {
  background-color: var(--orange);
  color: var(--white);
  display: inline-block;
  font-family: var(--font--secondary);
  font-size: var(--font-md);
  line-height: 1.55;
  font-weight: 700;
  padding: 15px 20px;
}

a.btn:hover {
  background-color: var(--grey);
  color: var(--white);
}

a.btn-sm {
  border-radius: 4px;
  font-size: 1rem;
  line-height: normal;
  padding: 6px 8px;
}

ul {
  margin: 0 0 30px;
}

@media (min-width: 768px) {
  ul {
    margin: 0 0 50px;
  }
}

figcaption {
  color: var(--grey);
  font-family: var(--font--secondary);
  font-size: 0.875rem;
  line-height: 1.57;
  padding-top: 10px;
}

@media (min-width: 768px) {
  figcaption {
    font-size: var(--font-sm);
    line-height: 1.5;
  }
}

img {
  display: block;
  width: 100%;
  height: auto;
}

/* Generic detail page styles */
.intro {
  font-family: var(--font--secondary);
  font-weight: 300;
  margin: 0 0 40px;
  font-size: 1.375rem;
}

.alert {
  margin: 40px auto 0;
  max-width: 1400px;
  border-radius: 0;
  background-color: var(--orange);
  color: var(--white);
  padding: 40px;
}

.alert > .alert__title {
  color: var(--white);
  font-family: var(--font--primary);
  font-size: 1.625rem;
  margin-bottom: 5px;
}

.alert__messages {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}

blockquote {
  border-left: 3px solid var(--orange);
  margin: 40px 0 30px;
  padding: 0 0 0 20px;
}

blockquote .text {
  color: var(--orange);
  margin: 0 0 30px;
  font-family: var(--font--primary);
  font-size: 1.625rem;
  line-height: 1.15;
}

blockquote .attribute-name {
  color: var(--dark);
  font-size: var(--font-md);
  line-height: 1.56;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  blockquote {
    border-left: 3px solid var(--orange);
    margin: 50px 0;
    padding: 0 40px;
  }

  blockquote .text {
    font-size: 2rem;
    line-height: 1.31;
  }
}

/* Richtext Styles */
/* stylelint-disable-next-line selector-class-pattern */
.block-paragraph_block p {
  color: var(--dark);
}

/* stylelint-disable-next-line selector-class-pattern */
.block-paragraph_block a {
  text-decoration: underline;
}

/* stylelint-disable-next-line selector-class-pattern */
.block-embed_block iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
}

@media screen and (min-width: 768px) {
  .header,
  .footer {
    padding-right: 0;
    padding-left: 0;
  }
}

/* Page header */
.header {
  padding: 0;
  width: 100%;
  background: var(--white);
  z-index: 10;
}

.index-header__title {
  color: var(--dark);
  font-weight: 400;
  font-size: 2.875rem;
  margin-top: 30px;
}

.index-header__introduction {
  color: var(--dark);
  font-family: var(--font--primary);
  font-weight: 400;
  font-size: 1.625rem;
  margin-top: 20px;
  margin-bottom: 60px;
}

.index-header__introduction.index-header__introduction--blog {
  margin-bottom: 20px;
}

.index-header__body-introduction p:first-child {
  color: var(--dark);
  font-family: var(--font--primary);
  font-weight: 400;
  font-size: 1.625rem;
  margin-top: 20px;
  margin-bottom: 30px;
}

.index-header__body-introduction {
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .index-header__title {
    margin-top: 70px;
  }

  .index-header__introduction {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .index-header__body-introduction p:first-child {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .index-header__body-introduction {
    margin-bottom: 30px;
  }
}

/* Main menu */
.navigation {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 25px 0;
}

.navigation__mobile {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--white);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 80px;
}

.navigation__mobile-toggle {
  background-color: transparent;
  border: none;
  margin: 0 0 0 auto;
}

.navigation__mobile-toggle[aria-expanded="true"] {
  position: absolute;
  z-index: 15;
  top: 30px;
  right: 20px;
}

@media (min-width: 1150px) {
  .navigation__mobile {
    display: none;
  }
}

.navigation__mobile-toggle[aria-expanded="true"] .navigation__toggle-icon-bar {
  opacity: 0;
}

.navigation__mobile-toggle[aria-expanded="true"]
  .navigation__toggle-icon-bar:first-of-type {
  transform: translateY(10px) rotate(45deg);
  opacity: 1;
}

.navigation__mobile-toggle[aria-expanded="true"]
  .navigation__toggle-icon-bar:last-child {
  transform: translateY(-10px) rotate(-45deg);
  opacity: 1;
}

.navigation__mobile-search {
  margin-top: 20px;
  position: relative;
}

.navigation__search {
  display: none;
  margin: 15px 0 0;
  position: relative;
}

.navigation__search-icon {
  display: block;
  position: absolute;
  right: 13px;
  top: 13px;
}

@media (min-width: 768px) {
  .navigation__search-icon {
    top: 11px;
  }
}

.navigation__search-input {
  color: var(--dark);
  font-size: var(--font-sm);
  line-height: 1.5;
  border: 1px solid var(--dark);
  padding: 10px;
}

.navigation__items {
  list-style: none;
  margin: 0;
  padding: 20px 0 0;
}

.navigation__desktop {
  display: none;
}

@media (min-width: 1150px) {
  .navigation__desktop {
    display: block;
  }

  .navigation__search {
    display: block;
    margin: 0 0 0 auto;
  }

  .navigation__items {
    padding: 0 0 0 20px;
  }
}

.navigation__items > li {
  padding: 10px 0;
}

.navigation__items > li > a {
  color: var(--dark);
  font-family: var(--font--secondary);
  font-size: var(--font-md);
  line-height: 1.55;
  padding: 10px 0;
}

@media (min-width: 1150px) {
  .navigation__items {
    display: block;
  }

  .navigation__items > li {
    padding: 0 0 0 20px;
  }

  .navigation__items > li > a {
    padding: 10px;
  }

  .navigation__items > li:first-child {
    padding: 0 0 0 20px;
  }
}

/* N.B. We're overriding Bootstrap's default nav styles here,
   these rules set what the currently active nav tab looks like. */
.navigation__items > li.active > a,
.navigation__items > li.active > a:focus,
.navigation__items > li.active > a:hover {
  color: var(--dark);
  border-radius: 0;
  border: none;
  background-color: transparent;
}

.navigation__items > li:hover,
.navigation__items > li > a:focus,
.navigation__items > li > a:hover {
  text-decoration: underline;
}

/* Required as bootstrap nav automatically hides this otherwise */
@media (min-width: 768px) {
  .navigation__mobile-toggle {
    display: block;
  }
}

@media (min-width: 1150px) {
  .navigation__mobile-toggle {
    display: none;
  }
}

.navigation__toggle-icon-bar {
  background-color: var(--dark);
  width: 30px;
  height: 2px;
  margin-bottom: 8px;
  display: block;
}

.navigation__toggle-icon-bar:last-child {
  margin-bottom: 0;
}

.collapse.in {
  padding: 0;
}

@media (max-width: 1150px) {
  .collapse.in {
    flex-basis: 100%;
    overflow-y: hidden;
  }

  .collapse.in .navigation__items {
    display: block;
  }
}

.navigation__logo,
.navigation__logo:visited,
.navigation__logo:focus {
  display: inline-block;
  color: var(--dark);
  font-family: var(--font--primary);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0;
  position: relative;
}

@media (min-width: 1150px) {
  .navigation__logo::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -5px;
    bottom: 0;
    width: 1px;
    height: 42px;
    background-color: var(--border-grey);
  }
}

.dropdown-menu {
  /* TODO: Set to secondary colour */
  background-color: var(--grey);
  border: black;
}

.dropdown-menu > li > a {
  border-bottom: 1px solid var(--border-grey);
  color: var(--dark);
  font-family: var(--font--secondary);
  padding: 10px 20px;
}

.dropdown-menu > li > a:hover {
  text-decoration: underline;
}

/* Menu dropdown hack to allow toggling */
li.has-submenu a.allow-toggle {
  float: left;
  padding-right: 0;
}

.caret-custom {
  float: right;
  padding: 10px 10px 15px 5px !important;
}

.caret-custom::after {
  content: "▼" !important;
}

/* Mobile menu styling */
@media (max-width: 1150px) {
  .nav-pills > .presentation {
    float: none;
    width: 100%;
  }
}

/* Pagination navigation */
.pagination {
  display: block;
  margin: 0 auto 40px;
}

.pagination__list {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 20px;
  list-style-type: none;
  padding-left: 0;
}

.pagination .page-item a {
  text-transform: capitalize;
  text-decoration: underline;
}

.pagination .page-item.active span {
  color: var(--grey);
}

.pagination .page-item.disabled a {
  color: var(--grey);
  text-decoration: none;
  cursor: default;
}

/* ---- Gallery Page ---- */

.gallery__container {
  padding-top: 40px;
  padding-bottom: 60px;
}

.gallery__introduction {
  color: var(--dark);
  font-family: var(--font--primary);
  font-size: 1.625rem;
  line-height: 1.15;
  margin: 0 0 60px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .gallery__container {
    padding-top: 180px;
    padding-bottom: 80px;
  }

  .gallery__introduction {
    font-size: 2rem;
    line-height: 1.31;
    margin: 0 0 85px;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* Generic title image header include */
.base-header img {
  height: auto;
  margin-top: 20px;
  max-width: 100%;
  width: auto;
}

@media (max-width: 970px) {
  .base-header img {
    width: 100%;
  }
}

/* Miscellaneous helper styles */

/* No gutters */
.row.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 970px) {
  .row.no-gutters {
    display: block;
  }
}

.row.no-gutters > [class^="col-"],
.row.no-gutters > [class*=" col-"] {
  padding-right: 0;
  padding-left: 0;
}

/* Bootstrap Equal height rows */
.row-eq-height {
  display: box;
  display: flex;
  display: flexbox;
  display: flex;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .hidden-md-up {
    display: none;
  }
}

@media (max-width: 991px) {
  .hidden-md-down {
    display: none;
  }
}

/* From Wagtail core */
.richtext-image.left {
  float: left;
  width: 50%;
}

.richtext-image.right {
  float: right;
  width: 50%;
}

/* ---- Component Styles ---- */

/* #region ---- Picture Card ---- */
.picture-card {
  position: relative;
}

.picture-card__link:hover .picture-card__image img {
  transform: scale(1.05);
}

.picture-card__link:hover .picture-card__title {
  text-decoration: underline;
}

.picture-card__title {
  color: var(--white);
  font-family: var(--font--primary);
  font-size: 1.625rem;
  line-height: 1.15;
  margin: 0;
}

.picture-card__image {
  overflow: hidden;
  margin-bottom: 0;
}

.picture-card__image img {
  transition: transform 0.2s ease;
}

.picture-card__image::before {
  content: "";
  position: absolute;
  height: 200px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0%) 0%, #000 67.69%);
  z-index: 2;
}

.picture-card__contents {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: left;
  display: flex;
  align-items: end;
  padding: 20px;
  z-index: 2;
}

@media (min-width: 768px) {
  .picture-card__title {
    font-size: 2rem;
    line-height: 1.31;
  }

  .picture-card__contents {
    padding: 30px 40px;
  }
}

/* #endregion */

/* #region ---- Listing Card ---- */
.listing-card {
  margin-bottom: 40px;
}

.listing-card__meta {
  border-collapse: separate;
  border-spacing: 5px;
}

.listing-card__link {
  display: flex;
  flex-direction: row;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-grey);
}

.listing-card__contents {
  padding-top: 10px;
  padding-left: 25px;
}

.listing-card__title {
  color: var(--orange);
  margin-top: 0;
}

.listing-card__meta-category {
  color: var(--grey);
  font-size: 0.875rem;
  line-height: 1.57;
  padding-right: 10px;
  vertical-align: top;
}

.listing-card__meta-content {
  color: var(--dark);
  font-size: 0.875rem;
  line-height: 1.57;
  vertical-align: top;
}

.listing-card__meta-row:last-child {
  margin-bottom: 0;
}

.listing-card__image {
  width: 100%;
  overflow: hidden;
  margin: 0;
  max-width: 100px;
  max-height: 110px;
}

.listing-card__image img {
  transition: transform ease 0.2s;
}

.listing-card:hover .listing-card__image img {
  transform: scale(1.05);
}

.listing-card:hover .listing-card__title {
  color: var(--dark-orange);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .listing-card__contents {
    padding-left: 45px;
    padding-top: 30px;
  }

  .listing-card__image {
    width: 100%;
    overflow: hidden;
    margin: 0;
    max-width: 180px;
    max-height: 180px;
  }

  .listing-card__meta-category,
  .listing-card__meta-content {
    font-size: var(--font-sm);
    line-height: 1.5;
  }
}

/* #endregion */

/* #region ---- Location Card ---- */

.location-card {
  display: flex;
  flex-direction: column;
  margin: 0 auto 50px;
  text-align: left;
}

.location-card:hover .location-card__image img {
  transform: scale(1.05);
}

.location-card:hover .location-card__title {
  color: var(--dark-orange);
}

.location-card__image {
  margin-bottom: 0;
  overflow: hidden;
}

.location-card__image img {
  object-fit: cover;
  min-height: 210px;
  transition: transform 0.2s ease;
}

.location-card__title {
  color: var(--orange);
  font-size: 1.625rem;
  line-height: 1.15;
  margin-bottom: 10px;
  font-weight: 400;
  width: max-content;
  position: relative;
}

.location-card__title::before {
  content: "";
  bottom: 3px;
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--dark-orange);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.location-card:hover .location-card__title::before {
  opacity: 1;
}

.location-card__text {
  color: var(--dark);
  font-size: var(--font-sm);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .location-card {
    margin-bottom: 0;
  }

  .location-card__image {
    margin-bottom: 30px;
  }

  .location-card__image img {
    min-height: 320px;
  }

  .location-card__title {
    font-size: 2rem;
    line-height: 1.31;
    margin-bottom: 20px;
  }

  .location-card__text {
    font-size: var(--font-md);
    line-height: 1.55;
  }
}

/* #endregion */

/* Utilities */

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
