:root {
  --color-mode: "light";
  --color-white: #ffffff;
  --color-black: #323232;
  --color-light: #f7f4ef;
  --color-dark: #424242;
  --color-text: #424242;
  --color-text-light: #707070;
  --color-bg: #e9e9e9;
  --color-footer: #69707f;
  --color-card-bg: #ffffff;
  --color-accent-1: #69707f;
  --color-accent-2: #836060;
  --color-footer: #69707f;
  --font-heading: "Cabinet Grotesk", sans-serif;
  --font-body: "Cabinet Grotesk", sans-serif;
}

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../fonts/CabinetGrotesk-Variable.woff2') format('woff2'),
       url('../fonts/CabinetGrotesk-Variable.woff') format('woff');
  font-weight: 1 999;
  font-display: swap;
  font-style: normal;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-mode: "dark";
  }

  :root:not([data-user-color-scheme]) {
    --color-bg: var(--color-dark);
    --color-text: var(--color-light);
    --color-text-light: var(--color-light);
    --color-footer: var(--color-light);
    --color-accent-1: var(--color-light);
    --color-accent-2: var(--color-light);
    --color-footer: var(--color-black);
    --color-card-bg: var(--color-black);
  }
}

[data-user-color-scheme="dark"] {
  --color-bg: var(--color-dark);
  --color-text: var(--color-light);
  --color-text-light: var(--color-light);
  --color-footer: var(--color-light);
  --color-accent-1: var(--color-light);
  --color-accent-2: var(--color-light);
  --color-footer: var(--color-black);
  --color-card-bg: var(--color-black);
}

/*********************** CSS Reset ************************/

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding-left: 0;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*********************** Elements ************************/

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-light);
}

h2 {
  font-size: 2rem;
  margin: 3rem 0 2rem 0;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1.1rem;
}

a {
  color: var(--color-accent-2);
}

img {
  border-radius: 5px;
  width: 100%;
  height: 100%;
}

hr {
  color: #bfbfbf;
}

figcaption {
  font-size: 1rem;
  font-style: italic;
}

blockquote {
  font-size: 1.5rem;
  font-style: italic;
}

button {
  cursor: pointer;
  border: none;
}

main {
  min-height: 80vh;
  padding-top: 1rem;
}

@media (min-width: 45rem) {
  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.5rem;
  }

  h4 {
    font-size: 2rem;
  }

  h5 {
    font-size: 1.8rem;
  }

  h6 {
    font-size: 1.4rem;
  }

  figcaption {
    position: sticky;
    bottom: 0;
  }
}

/************************ Header *************************/

/**** Skip Link ****/
#skip-link {
  display: inline-block;
  padding: 0.7rem 1rem;
  background: var(--color-bg-light);
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: bolder;
  position: absolute;
  top: 1rem;
  left: 1rem;
}

#skip-link:hover {
  background: var(--color-accent-1);
  color: var(--color-text-light);
}

#skip-link:not(:focus) {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

/*********** Navigation **************/

header a {
  text-decoration: none;
  color: inherit;
}

.header-title {
  text-transform: uppercase;
  font-weight: 400;
  font-size: 1.65rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.header-title span {
  display: block;
  width: max-content;
  font-weight: 200;
  line-height: 1.1;
  color: var(--color-accent-1);
}

.header-title span:last-child {
  font-size: 2rem;
  color: var(--color-accent-2);
  border-top: 1px solid #bfbfbf;
}

.nav-list {
  display: -webkit-flex;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: normal;
  margin: 0;
}

.nav-list li:last-child {
  margin-left: 0.5rem;
}

@media screen and (min-width: 35rem) {
  #navigation > div {
    display: -webkit-flex;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 1.3rem;
  }
}

/************* Home Hero *********************/
.hero__text {
  margin-bottom: 1rem;
}

.hero__text h1 {
  font-size: 2.5rem;
  font-weight: 200;
}

.hero__image {
  margin-bottom: 1rem;
} 

@media screen and (min-width: 60rem) {
  .hero__text h1 {
    font-size: 3.5rem;
  }

  .hero__image {
    width: 50%;
  }

  .hero__image img {
    box-shadow: 0px 20px 34px 0px rgba(0, 0, 0, 0.2);
  }
}

@media screen and (min-width: 75rem) {
  .hero__text h1 {
    font-size: 4rem;
  }

  #hero h2 {
    font-size: 4rem;
    font-weight: 200;
  }
}

/************* Home Introduction *******************/
#home-introduction {
  background-color: var(--color-footer);
  color: var(--color-white);
  padding: 2.5rem 1rem;
  margin: 3rem 0;
  font-size: 1.3rem;
}

/*************** Home Collections ******************/
#home-collections h2 {
  margin-bottom: 1rem;
}

#home-collections > div > * {
  margin-bottom: 3rem;
}

@media screen and (min-width: 45rem) {
  .home-collections__child-pages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 2rem;
  }
}

@media screen and (min-width: 75rem) {
  .home-collections__child-pages {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.home-latest-images h2 {
  margin: 2rem 0;
}

.home-latest-images__button {
  text-align: center;
}


/******************* Page Banner ******************/
.page p {
  max-width: 40rem;
}

.page > section > * {
  margin-bottom: 3rem;
}

#page-banner h1 {
  font-weight: 300;
  font-size: 2.5rem;
  margin-top: 1.5rem;
  line-height: 1.2;
}

#page-banner p {
  max-width: 40rem;
  margin: 1.5rem 0;
  font-size: 1.2rem;
}

.page-banner__text {
  margin-bottom: 1.5rem;
}

@media screen and (min-width: 45rem) {
  #page-banner h1 {
    font-size: 6rem;
  }

  #page-banner p {
    font-size: 1.5rem;
  }

  .page > section > * {
    margin-bottom: 0;
  }
}

figcaption h1 > span {
  font-size: 1rem;
  display: block;
}


/************** Child Pages **************/

@media screen and (min-width: 45rem) {
  .child-pages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 2rem;
  }
}

@media screen and (min-width: 75rem) {
  .child-pages {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/********************* Page builder *******************/
.image-section figure {
  margin-bottom: 2rem;
}

.image-section figure h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.image-section figcaption h1 {
  font-size: 1.5rem;
  margin-top: 1rem;
}

.image-section img {
  max-height: 45rem;
  object-fit: contain;
  object-position: left;
}

@media screen and (min-width: 45rem) {
  .image-section figure {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 2rem;
    align-items: flex-end;
    margin-bottom: 4rem;
  }
}


/********************Footer ****************/
.return {
  text-align: center;
}

footer {
  background-color: var(--color-footer);
  color: var(--color-white);
  padding: 2rem 0 0.5rem 0;
  text-align: center;
}

footer a {
  color: var(--color-white);
  text-decoration: none;
}

.footer__copyright {
  margin-top: 2rem;
}

/*********************** Utility ***********************/
.container-m {
  margin: 0 auto;
  padding: 0 1rem 1rem 1rem;
  max-width: 85rem;
}

.return {
  margin-bottom: 1rem;
}

.btn {
  background-color: var(--color-accent-2);
  color: var(--color-card-bg);
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  margin: 2rem 0;
  transition: all 0.3s ease-in-out;
  border: 1px solid var(--color-accent-2);
}

.btn:hover {
  background-color: var(--color-bg);
  color: var(--color-accent-2);
  border: 1px solid var(--color-accent-2);
}

.card {
  text-align: center;
  background-color: var(--color-card-bg);
  border-radius: 5px;
  margin-bottom: 2rem;
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease-in;
}

.card__image {
  height: 100%;
  overflow: hidden;
  border-radius: 5px 5px 0 0;
}

.card a:hover {
  box-shadow: 0px 20px 34px 0px rgba(0, 0, 0, 0.2);
}

.card a:hover img {
  transform: scale(1.02);
}

.card h3 {
  font-size: 1.4rem;
  padding: 1rem 0;
}

.card img {
  object-fit: cover;
  object-position: center;
  border-radius: 5px 5px 0 0;  
  transition: transform 0.5s ease-in-out;
}

.card__no-text img, .card__no-text .card__image {
  border-radius: 5px;
}

@media screen and (min-width: 45rem) {
  .card {
    margin-bottom: 0;
  }
  .card__image {
    height: 20rem;
  }
}

/****************** Other *******************/

.image-navigation {
  position: relative;
  padding: 2rem 0;
}

.image-navigation a {
  display: -webkit-flex;
  display: flex;
}

.image-navigation .next, .previous {
  position: absolute;
}

.image-navigation .next {
  right: 0;
}

.c-breadcrumbs ol {
  list-style-type: none;
  padding-left: 0;
  display: -webkit-flex;
  display: flex;
  flex-wrap: wrap;
  font-size: 1rem;
}

.c-breadcrumbs a {
  text-decoration: none;
}

.c-breadcrumbs .is-current {
  text-decoration: none;
  color: var(--color-text);
}

#subjects-container > div:nth-child(1) > h2:nth-child(1) {
  margin-top:0;
}

@media (min-width: 45rem) {
  .image-section h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
}

.photo-collections {
  list-style-type: none;
  padding-left: 0;
  display: -webkit-flex;
  display: flex;
  flex-wrap: wrap;
  gap:0.5rem;
}

.pagination {
  display: -webkit-flex;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.pagination a {
  text-decoration: none;
}

.pagination svg {
  vertical-align: text-top;
}

.pagination .disabled {
  color: var(--color-text);
}

nav[aria-label="Pagination"] ul {
  list-style-type: none;
  padding: 0;
  text-align: center;
  display: -webkit-flex;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

nav[aria-label="Pagination"] a {
  text-decoration: none;
}