@font-face {
  font-family: 'FuturaCondensedWeb';
  src: url('fonts/FuturaCondensedMedium.woff2') format('woff2'),
       url('fonts/FuturaCondensedMedium.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-wrap: wrap;       /* This allows containers to move to a new row */
  justify-content: center; /* Centers the whole grid on the page */
  gap: 20px;             /* Adds space between containers horizontally and vertically */
  background: #b9b9b9;
  color: #2b2b2b;
  font-family: 'FuturaCondensedWeb', 'Futura', sans-serif;
  padding: 40px;         /* Padding so they don't touch the very edge of the window */
  height: auto;
  min-height: 100vh;
  margin: 0;
}

/* Text */
p {
  margin: 0 10px 12px;
  color: #3a3a3a;
  line-height: 1.5;
}

/* Links */
a:link,
a:visited {
  color: #7a4f66;
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  color: #a86b87;
}

/* Layout */
#container {
  width: 520px;          /* Each box keeps its size */
  length: 220px;
  background: #e7e7e7;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  flex-shrink: 0;        /* Prevents the boxes from getting squished */
}

/* Header */
#header {
  /* It uses the colors from the HTML, or defaults to pink if you forget them */
  background: linear-gradient(180deg, var(--top, #c89aa9) 0%, var(--bottom, #9c5f77) 100%);
  border-bottom: 4px solid var(--border, #7a4f66);
  padding: 10px;
}

#header h1 {
  font-size: 3.5rem;
  letter-spacing: 0.05em;
  margin: 0;
  font-weight: 700;
  color: #fff3f7;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Content */
#wrapper {
  padding: 20px;
}

#content {
  float: left;
  width: 500px;
}

#content p strong {
  color: #7a4f66;
}

/* Image Grid */
#row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 4px;
}

#column {
  flex: 100%;
}

#column img {
  width: 200px;
  border-radius: 10px;
  background: #dcdcdc;
  padding: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#column img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

/* Navigation */
#navigation {
  background: #7a4f66;
  border-radius: 10px;
  color: #fff3f7;
  float: right;
  width: 160px;
  padding: 12px 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

#navigation ul {
  list-style-type: none;
  padding: 0;
}

#navigation li {
  margin: 6px 0;
  margin-left: -10px;
  color: #fff3f7;
  font-size: 1.2rem;
}

#navigation a {
  color: #fff3f7;
}

#navigation a:hover {
  color: #ffd6e3;
}

/* Special layout for the Index page */
.index-body {
  flex-direction: column;
  justify-content: space-between; /* Pushes content to top and bottom */
  height: 100vh;
  padding: 60px 20px;
  box-sizing: border-box;
}

.intro-text {
  text-align: center;
}

.intro-text h1 {
  font-size: 4rem;
  color: #7a4f66;
  margin-bottom: 10px;
}

/* Bottom Button Row */
.bottom-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.nav-button {
  /* Gradient background: light purple to dark purple */
  background: linear-gradient(180deg, #c89aa9 0%, #9c5f77 100%);
  
  /* Adding a border to match the card header style */
  border: 2px solid #7a4f66;
  
  color: #fff3f7 !important;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1.5rem;
  text-decoration: none;
  text-align: center;
  min-width: 150px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  display: inline-block;
}

.nav-button:hover {
  /* Brighter gradient on hover */
  background: linear-gradient(180deg, #d4abb8 0%, #a86b87 100%);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* This forces the button area to take up 100% width so cards can't sit next to it */
.top-controls {
  width: 100%;
  display: flex;
  justify-content: center; /* Centers the button */
  margin-bottom: 50px;    /* This is the GAP you requested */
  padding-top: 20px;
}

/* Optional: If you want the button to look consistent with your index page */
.top-controls .nav-button {
  background: linear-gradient(180deg, #c89aa9 0%, #9c5f77 100%);
  border: 2px solid #7a4f66;
  color: #fff3f7 !important;
  padding: 10px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Container for the rule and its hidden text */
.rule-item {
    margin-bottom: 12px;
    cursor: help; /* Changes cursor to a question mark to signal there is more info */
}

/* The explanation text - hidden by default */
.explanation {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.9rem;
    color: #7a4f66; /* Matching your theme color */
    padding-left: 20px;
    font-style: italic;
    transition: all 0.3s ease-in-out; /* Smooth slide-down effect */
}

/* When hovering over the rule-item, show the explanation */
.rule-item:hover .explanation {
    max-height: 100px; /* Adjust if your explanation is very long */
    opacity: 1;
    margin-top: 5px;
}

/* Optional: Make the rule itself turn bold or change color on hover */
.rule-item:hover .rule-text {
    color: #7a4f66;
    font-weight: bold;
}