:root {
  --background-color: #F5F2E9;
  --primary-color: #2C2A29;
  --primary-button-background-color: #B5651D;
  --primary-button-background-hover-color: #D2B48C;
  --primary-button-color: white;
  --secondary-button-background-color: white;
  --secondary-button-background-hover-color: white;
  --card-background-color: white;
  --card-color: #2C2A29;

  --panel-width: 48%;
  --panel-max-width: 360px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #2C2A29;
    --primary-color: white;
    --secondary-button-background-color: white;
    --secondary-button-background-hover-color: white;
  }
}

@media screen and (min-width: 1025px) {
  .panel {
    --panel-width: 32%;
  }
}

@media screen and (min-width: 1321px) {
  .panel {
    --panel-width: 24%;
  }
}

@media screen and (min-width: 1901px) {
  .panel {
    --panel-width: 16%;
  }
}

body {
  background-color: var(--background-color);
  color: var(--primary-color);
  font-size: 1rem;
  font-family: Calibri, "Lucida Grande", Helvetica, Arial, sans-serif;
  padding: 1vw;
}

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

header {
  height: 100%;
  margin-bottom: 10px;
}

header a {
  font-size: 1rem;
}

@media screen and  (min-width: 769px) {
  header a {
    font-size: 1.25rem;
  }
}

header .section {
  align-items: center;
  display: block;
}

@media screen and (min-width: 769px) {
  header .section {
    display: flex;
  }
}

#logo-container {
  width: 300px;
  height: 100px;
  margin: auto;
  background-image: url("/img/logo.png");
  background-repeat: no-repeat;
  background-size: contain;
}

@media (prefers-color-scheme: dark) {
  #logo-container {
    background-image: url("/img/logo-dark.png");
  }
}

#search {
  display: flex;
  flex-grow: 1;
  justify-content: center;
}

#search form {
  display: flex;
  justify-content: center;
  flex-grow: 1;
  align-items: center;
  gap: 5px;
}

#search input {
  flex-grow: 1;
  width: 50%;
  max-width: 300px;
  font-size: 1.25rem;
  margin: 0;
}

#search button {
  width: 30px;
  font-size: 1rem;
  padding: 4px;
}

/*@media (prefers-color-scheme: dark) {
  #search button {
    background-color: none;
  }
}*/

#search img {
  width: 100%;
}

#search,
#navigation {
  min-width: 200px;
}

#navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  color: inherit;
  height: 48px;
}

@media screen and (min-width: 769px) {
  #search {
    justify-content: left
  }

  #navigation {
    justify-content: right;
  }
}

#navigation a {
  display: inline-block;
  padding: 12px calc(8px + 0.5vw);
  box-sizing: border-box;
}

#navigation a:hover {
  color: #C9C5B1;
}

#logout button {
  background-color: transparent;
  padding: 15px calc(8px + 0.5vw) 12px calc(8px + 0.5vw);
}

#logout button:hover {
  color: #C9C5B1;
}

#site {
  display: flex;
  flex-wrap: wrap;
}

#sidebar {
  display: flex;
  justify-content: center;
  width: 100%;
}

#content {
  width: 100%;
  margin: auto;
}

#sidebar iframe {
  width: 300px;
  height: 100px;
}

@media screen and (min-width: 769px) {
  #sidebar {
    width: 200px;
    margin-top: 5vw;
  }

  #content {
    width: calc(100% - 200px);
  }

  #sidebar iframe {
    width: 160px;
    height: 600px;
  }
}

.section {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: center;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.controls a:hover {
  color: #C9C5B1;
}

.pagination {
  font-size: 1.5rem;
  text-align: center;
}

.page {
  display: inline-block;
  padding: 10px;
}

.controls form {
  display: flex;
  max-width: 400px; /* Limits maximum width on big screens */
  width: 100%;      /* Stretches to fit small screens */
}

.controls input {
  flex: 1;          /* Takes up all available space */
  min-width: 0;     /* Keeps input from breaking line on mobile */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px; /* Rounds only left corners */
}

.controls button {
  padding: 8px 15px;
  border: 1px solid #ccc;
  border-left: none; /* Prevents double border in the middle */
  border-radius: 0 4px 4px 0; /* Rounds only right corners */
  background: #007bff;
  color: white;
  cursor: pointer;
}

.form-like {
  padding: 0;
}

.form-like button[type="submit"] {
  background-color: transparent;
  padding: 12px 12px;
  border: 0;
  cursor: pointer;
}

.form-like button[type="submit"] {
  background-color: transparent;
  padding: 12px 12px;
  border: 0;
}

.form-like svg {
  width: 24px;
  height: 24px;
  stroke: black;
  stroke-width: 2;
  fill: white;
  transition: transform 0.2s ease;
}

.form-like svg[data-like="true"] {
  stroke-width: 1;
  fill: red;
}

.panel {
  width: var(--panel-width);
  max-width: var(--panel-max-width);
  display: inline-block;
  font-size: 0;
  padding: 0.2vw;
  transition: transform 0.2s ease;
}

.panel.large {
  width: calc(var(--panel-width) * 2);
  max-width: calc(var(--panel-max-width) * 2);
}

.panel:hover {
  transform: translateY(-10px);
}

.panel.zoom img:hover {
  cursor: -moz-zoom-in;
  cursor: -webkit-zoom-in;
  cursor: zoom-in;
}

.panel.text {
  font-size: 0.9rem;
}

@media screen and (min-width: 769px) {
  .panel.text {
    font-size: 1rem;
  }
}

@media screen and (min-width: 1025px) {
  .panel.text {
    font-size: 1.1rem;
  }
}

.panel img {
  vertical-align: top;
  width: 100%;
  height: auto;
}

.panel.large img {
  width: 50%;
}

.panel-title,
.panel-footer {
  padding: 12px;
}

.panel-footer {
  display: flex;
  justify-content: center;
  border-radius: 0 0 10px 10px;
}

.panel-footer .action {
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 8px;
  border: 0.01vw solid transparent;
  transition: all 0.2s ease;
}

.panel-footer .action:hover {
  background-color: rgba(198, 142, 98, 0.1);
  border-color: #c68e62;
  border-radius: 5px;
}

/* Footer Container Styling */
.site-footer {
  padding: 40px 20px 20px 20px;
  font-size: 1rem;
}

.footer-container {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  gap: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
  }
}
