/* Import Fonts */
@import url("https://fonts.googleapis.com/css2?family=Almendra+SC&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Monsieur+La+Doulaise&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Italianno&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Smythe&display=swap");

:root {
  --box-height: clamp(260px, 38vh, 520px;);
}

/* Page Styling */

html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: #1a0d02;
  background-image: url("../Images/past_background.png");
  background-repeat: no-repeat;
  background-size: cover;
  color: #a27c3c;
  font-family: "Smythe", system-ui;
  font-size: 1.25rem;
}

/* Header */
.past-header {
  text-align: center;
  margin-top: 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.past-title {
  font-family: "Smythe", system-ui;
  font-size: clamp(2.4rem, 8vw, 7rem);
  margin: 0;
}

/* Spin Gears */
.gear {
  width: 150px;
  height: 150px;
  animation: spin 8s linear infinite;
}

.gear-left {
  animation-direction: reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Year Dropdown */
#year-selector {
  display: block;
  margin: 20px auto;
  padding: 10px 12px;
  font-size: 1.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  color: #a27c3c;
  border: 1px solid #a27c3c;
  border-radius: 8px;
  text-align: center;
  font-family: "Smythe", system-ui;
}

select {
  background-color: #1a0d02;
  color: #a27c3c;
  border: 1px solid #a27c3c;
  padding: 8px 12px;
  font-size: 20px;
  font-family: "Smythe", system-ui;
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* Make dropdown arrow gold */
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="10"><polygon points="0,0 14,0 7,10" fill="%23c9a64d"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

/* Hover effect */
select:hover {
  border-color: #a27c3c;
  box-shadow: 0 0 5px #a27c3c;
}

/* Focus effect */
select:focus {
  outline: none;
  border-color: #a27c3c;
  box-shadow: 0 0 8px #a27c3c;
}

/* Style Dropdown */
option {
  background-color: #1a0d02;
  color: #a27c3c;
}

select::-webkit-scrollbar {
  width: 10px;
}
select::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
select::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #caa552, #a26a2a);
  border-radius: 10px;
  border: 1px solid #6e5320;
}

select {
  scrollbar-width: thin;
  scrollbar-color: #caa552 rgba(255, 255, 255, 0.06);
}




/* Event and Person box */
.content-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.box {
  flex: 1 1 480px;
  min-width: 320px;
  background-color: rgba(0, 0, 0, 0.4); /* semi-transparent overlay */
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #a27c3c;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

#historical-event {
  overflow: auto;
}

/* Themed Scrollbar if necessary */
#historical-event::-webkit-scrollbar {
  width: 10px;
}
#historical-event::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
#historical-event::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #caa552, #a26a2a);
  border-radius: 10px;
  border: 1px solid #6e5320;
}

#historical-event {
  scrollbar-width: thin;
  scrollbar-color: #caa552 rgba(255, 255, 255, 0.06);
}

/* Box Headings */
#historical-event h4,
#historical-figure h3 {
  margin: 0 0 8px 0;
  color: #a27c3c;
}

/* Quote Box */
#historical-quote {
  font-family: "Cedarville Cursive", cursive;
  font-size: 2rem;
  text-align: center;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid #a27c3c;
  border-radius: 10px;
  color: #a27c3c;
  overflow: auto;
}

.box-wide {
  flex: 1 0 100%;
  min-height: auto;
  height: auto;
  height: auto;
  font-family: "Italianno", cursive;
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
}

/* Footer */
.past-navigation-bar {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  padding-bottom: 50px;
}

.past-navigation-bar nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.past-navigation-bar nav a {
  display: inline-block;
  padding: 10px 16px;
  color: #a27c3c;
  text-decoration: none;
  border: 1px solid #a27c3c;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(202, 165, 82, 0.15),
    rgba(162, 106, 42, 0.15)
  );
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.past-navigation-bar nav a:hover {
  background: linear-gradient(
    180deg,
    rgba(202, 165, 82, 0.25),
    rgba(162, 106, 42, 0.25)
  );
  transform: translateY(-1px);
}
.past-navigation-bar nav a:active {
  transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 700px) {
  .gear {
    width: 100px;
    height: 100px;
  }
  .box {
    min-width: 100%;
  }
}
