* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --card-header-size: 60px;
  --card-body-size: 500px;
}

html,
body {
  height: 100%;
  background-color: #1f1f1f;
  color: #fff;
  display: flex;
  font-family: "Arvo", serif;
  font-weight: 400;
  scroll-behavior: smooth;
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
  font-size: 1rem;
}

button:hover {
  opacity: 0.7;
}

/* <<side bar styling>> */

nav {
  /* width: 17rem; */
  height: 100%;
  background-color: #292929;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;

  position: fixed;
  left: 0;
  width: var(--card-header-size);
  height: 100%;
  z-index: 10;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

nav ul li {
  width: 100%;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: opacity 0.2s ease;
}

nav ul li:hover {
  opacity: 0.7;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  font-size: 1.1rem;
}

nav ul li svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

#intro {
  /* width: var(--card-body-size); */
  height: 100%;
  /* display: block; */
  /* flex-direction: column; */
  /* align-items: left; */
  /* justify-content: center; */
  padding: 2rem;
  left: var(--card-header-size);
  position: relative;
}

/* Ensure the intro section is a flex container */
#intro {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  overflow-x: hidden;
  /* justify-content: flex-start; */
}

/* Style the main intro content */
#intro-content {
  flex: 1 1 auto;
  /* min-width: 0; */
}

#intro h1 {
  text-align: left;
  font-size: 3rem;
  margin-bottom: 0.1rem;
  font-weight: 400;
  font-family: "Rampart One", sans-serif;
  font-style: normal;
  text-transform: uppercase;
}

#intro h2 {
  text-align: left;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

#intro p {
  text-align: left;
  font-size: 1rem;
  margin: 0 auto;
  color: #ccc;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 0.8fr 0.5fr 0.1fr;
  width: 400px;
  height: auto;
  border: 2px solid #292929;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  border-radius: 5px;
  padding: 2rem;
  margin: 2rem auto;
  gap: 0.2rem;
}

.calculator-grid button {
  width: 100%;
  height: 2rem;
  background-color: #beb8b8;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.calculator-grid button:hover {
  background-color: transparent;
  border: 2px solid #beb8b8;
}

#intro::-webkit-scrollbar {
  width: 10px;
  background: transparent;
}

#intro::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.9s ease-in-out;
}

#intro::-webkit-scrollbar-thumb:hover {
  background: #888;
}

footer {
  /* position: fixed; */
  left: var(--card-header-size + 60px);
  align-items: left;
  width: auto;
  justify-content: left;
  padding-top: 1rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #ccc;
}

footer p strong {
  color: #fff;
}

footer a {
  color: #ccc;
  text-decoration: underline;
  margin: 0 0.5rem;
}

.RH-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 320px;
  min-width: 220px;
  margin-left: 2rem;
}

.main-ref_index {
  width: 100%;
}

/* Style for the .main-ref_index ul and li inside .RH-side */
.RH-side .main-ref_index ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: #999;
  /* background: rgba(255, 255, 255, 0.06); */
}

.RH-side .main-ref_index li:hover,
.RH-side .main-ref_index li:focus-within {
  /* background: #ff4500; */
  color: #fff;
}

.RH-side .main-ref_index li a {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  transition: color 0.2s;
}

.ad-placeholder {
  width: auto;
  height: 160px;
  background: #999;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  font-size: 0.9rem;
  text-align: center;
}

.cards {
  display: flex;
  flex-direction: row;
  height: 100%;
  position: relative;
  left: var(--card-header-size);
}

.cards section {
  height: 100%;
  display: flex;
  flex-direction: row;
}

.card-header {
  width: 60px;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  gap: 1rem;
  box-shadow: 4px 0 4px rgba(0, 0, 0, 0.5);
}

.card-header svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin: 1rem;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 400;
}

.card-header span {
  font-size: 1.2rem;
  font-weight: 400;
  color: #fff;
}

.card_body {
  max-width: 0px;
  overflow: hidden;
  transition: max-width 0.3s ease;

  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card_body h3 {
  text-transform: uppercase;
}

.card_body table caption {
  text-decoration: underline;
}

.card_body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.card_body caption {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card_body th,
.card_body td {
  text-align: center;
  border: 1px solid #fff;
  padding: 0.2rem;
}
