/* ===============================
   RESET & BASE STYLES (Mobile-First)
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #bdd4e9;
}




/* ===============================
     LAYOUT
     =============================== */
.page-container {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid black;
  overflow-x: auto;
}

.page-container-small {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid black;
  overflow-x: auto;
}

.main-only {
  padding: 10px;
  background-color: bisque;
  box-sizing: border-box;
  /* Include padding in the element’s width */
}

.main-side {
  display: flex;
  flex-direction: column;
  /* Mobile-first: stack elements */
}

main {
  flex: 1;
  padding: 20px;
}

aside {
  flex: 1;
  padding: 20px;
  background: #475456;
  text-align: center;
}

/* ===============================
     USER PAGE SPECIFIC STYLES
     =============================== */


.usereditpage .page-container {
  max-width: 900px;
}

.userpage .main-side,
.usereditpage .main-side {
  background-color: bisque;
}

/* ===============================
     BIBLIOGRAPHY STYLES
     =============================== */
.bibliography {
  max-width: 800px;
}

.bib-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-top: 5px;
  text-indent: -30px;
  padding-left: 30px;
}

.bib-entry {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.3;
}

.bib-link {
  width: auto;
  text-align: left;
  padding-left: 4px;
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 5px;
}

.bib-item {
  flex-direction: column;
  /* Stack entry and links */
}


.index .bib-link-members {
  width: 120px;
}

.bib-link-members {
  width: 230px;
  text-align: right;
  padding-left: 10px;
  font-size: 0.8rem;
  line-height: 1.3;
}

.bib-link a {
  color: #0066cc;
}

.bib-link a:hover {
  color: #004499;
  text-decoration: underline;
}

/* ===============================
     HEADER STYLES
     =============================== */
header {
  background: url('/images/texture_paper3.jpg') repeat-x center center;
  background-size: auto 100%;
  max-height: 120px;
  padding: 10px;
  display: block;
  overflow: hidden;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-top img {
  max-height: 60px;
  width: auto;
}

.header-title {
  text-align: center;
  flex-grow: 1;
}

.header-title h1 {
  margin-bottom: 5px;
  font-size: 1.4em;
  color: #212007;
}

.header-title h2 {
  margin-bottom: 5px;
  font-size: 1em;
  color: #511814;
}

.narrow {
  max-height: 80px;
}

/* ===============================
     NAVIGATION STYLES
     =============================== */
nav {
  background: #212121;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

nav li {
  margin: 0 10px;
  font-size: 0.8rem;
}

nav a {
  color: #fff;
  padding: 10px;
  display: block;
}

nav a:hover {
  color: rgb(255, 191, 0);
  text-decoration: underline;
}



/* ===============================
     FOOTER STYLES
     =============================== */
footer {
  background: #272727;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
}

/* ===============================
     TYPOGRAPHY
     =============================== */
h1 {
  font-size: 1rem;
  color: #511814;
  margin-bottom: 15px;
}


p {
  font-size: .8rem;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.3;
}
.small {
  font-size: 0.7rem;
  margin: 0;
}

.label1 {
  font-size: 0.75rem;
  margin-top: 10px;
}

.bold {
  font-weight: bold;
}

.whitespace {
  white-space: pre-wrap;
}

.space-between {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: flex-end;
}

/* ===============================
     COLORS
     =============================== */
.darkred {
  color: rgb(92, 23, 23);
}

.red {
  color: red;
}

.green {
  color: olivedrab;
}

.white {
  color: rgb(249, 246, 238);
}

.yellow {
  color: rgb(255, 191, 0);
}

/* ===============================
     FORM STYLES
     =============================== */
form {
  max-width: 400px;
  margin: 20px auto;
}

label {
  display: block;
  margin-top: 10px;
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 6px;
}

.tall-input {
  width: 100%;
  height: 3cm;
  font-size: 0.8rem;
  padding-left: 10px;
  padding-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  margin-top: 15px;
  padding: 10px 15px;
}

.checkbox-label {
  font-size: 0.8rem;
  color: #01060b;
  cursor: pointer;
}

.radio-container {
  display: flex;
  gap: 15px;
  align-items: center;
}

.error {
  color: red;
  margin: 10px 0;
}

/* ===============================
     LINKS
     =============================== */
a {
  text-decoration: none;
}

.bluelink a:link {
  color: #0066cc;
}

.bluelink a:visited {
  color: #0066cc;
}

.bluelink a:hover {
  color: #de1203;
  text-decoration: underline;
}


.link a {
  text-decoration: none;
  color: aliceblue;
}

.link a:visited {
  color: aliceblue;
}

.link a:hover {
  color: rgb(255, 191, 0);
  text-decoration: underline;
}

.hyper a {
  color: blue;
  text-decoration: underline;
}

.hyper a:hover {
  color: #511814;
}

/* ===============================
     DIALOG BOXES
     =============================== */
dialog {
  position: absolute;
  left: 20px;
  top: 50%;
  border: 2px solid #333;
  padding: 10px;
  cursor: grab;
}

/* ===============================
   MEDIA QUERIES (PROGRESSIVE ENHANCEMENT)
   =============================== */
/* Small screens (up to 600px) */
@media (max-width: 600px) {
  .main-side {
    flex-direction: column;
  }

  .hide {
    display: none;
  }
}

/* Medium screens (600px and up) */
@media (min-width: 600px) {
  .main-side {
    flex-direction: row;
  }

  main {
    flex: 2.5;
    /* Takes 2/3 of the width */
  }

  aside {
    flex: 1;
    /* Takes 1/3 of the width */
  }
}

/* Large screens (800px and up) */
@media (min-width: 800px) {
  .bib-item {
    flex-direction: row;
  }

  .bib-link {
    width: 100px;
    text-align: left;
    padding-left: 0;
    margin-top: 5px;
  }
}

/* Extra large screens (1024px and up) */
@media (min-width: 1024px) {
  .page-container {
    max-width: 1000px;
    min-width: 1000px;
  }

  .page-container-small {
    max-width: 650px;
    min-width: 650px;
  }
}