/* ==========================================================================
   1. Theme Variables & Brand Palette
   ========================================================================== */
:root {
  --primary-color: #0088cc;
  --primary-hover: #006699;
  --accent-light: #e6f3fa;
  --accent-hover: #d1ebff;
  --text-dark: #333333;
  --border-light: #eeeeee;
}

/* ==========================================================================
   2. Layout & Container Control
   ========================================================================== */
/* Keep the header constrained and centered */
#header .container.grid-lg {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Constrain content to a readable desktop column instead of 90% screen width */
#body-wrapper .container.grid-lg {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ==========================================================================
   3. Header & Navigation Menu
   ========================================================================== */
.navbar {
  align-items: center;
  padding: 0.5rem 0;
}

/* Brand / Logo styling */
.navbar-brand {
  font-weight: 700;
  color: var(--text-dark) !important;
}

/* Nav links styling & hover states */
.navbar-section .navigation a,
.navbar-section ul.navigation li a {
  color: #555555;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

.navbar-section .navigation a:hover,
.navbar-section ul.navigation li a:hover,
.navbar-section .navigation li.active a {
  color: var(--primary-color) !important;
  background-color: var(--accent-light);
  text-decoration: none;
}

/* ==========================================================================
   4. Table Styling & Content Fixes
   ========================================================================== */
/* Scoped to body-wrapper to override Spectre defaults safely */
#body-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 1rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

/* Headers */
#body-wrapper table thead th,
#body-wrapper table th {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 14px 16px;
  border: none;
}

/* Cells */
#body-wrapper table td {
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
  vertical-align: middle;
  /* Prevent long email addresses/links from blowing out column widths */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Row Zebra Striping */
#body-wrapper table tbody tr:nth-child(even) td {
  background-color: #ffffff;
}

#body-wrapper table tbody tr:nth-child(odd) td {
  background-color: var(--accent-light);
}

/* Row Hover */
#body-wrapper table tbody tr:hover td {
  background-color: var(--accent-hover);
}

/* Remove bottom border on final row */
#body-wrapper table tbody tr:last-child td {
  border-bottom: none;
}

/* Table links (e.g. mailto) */
#body-wrapper table a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

#body-wrapper table a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   5. Feature Buttons Layout
   ========================================================================== */
.feature-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px auto;
  max-width: 960px;
}

.feature-button {
  display: flex;
  justify-content: center;
}

.feature-button a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 24px 16px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-button a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.button-icon {
  margin-bottom: 12px;
  color: var(--primary-color);
}

.button-text {
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
}

/* ==========================================================================
   6. Responsive Google Forms Container
   ========================================================================== */
.responsive-form-container {
  position: relative;
  width: 100%;
  max-width: 850px;
  margin: 2rem auto;
  overflow: hidden;
  padding-top: 800px;
}

.responsive-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   7. Media Queries (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 768px) {
  #body-wrapper .container.grid-lg {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #body-wrapper table {
    font-size: 0.9rem;
  }

  #body-wrapper table th,
  #body-wrapper table td {
    padding: 10px 12px;
  }

  .feature-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .feature-buttons {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
}

@media (min-width: 768px) {
  .responsive-form-container {
    padding-top: 900px;
  }
}

@media (min-width: 1200px) {
  .responsive-form-container {
    padding-top: 950px;
  }
}
