/* --------- Design tokens (easy to tweak) --------- */
:root {
  --crimson: #a51c30;
  --crimson-dk: #7f1626;
  --primary: #2b6ec5;
  --primary-border: #0d6efd;
  --gray-100: #f8f9fa;
  --gray-200: #d3d4d5;
  --gray-600: #666;
  --body: #0a0a0a;
  --submit: #198754;
  --submit-border: #146c43;
}

/* --------- Base typography --------- */
body {
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
  color: var(--body);
}

h1, .h1, h2, .h2, h5, .h5 {
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
  margin-bottom: 0.6em;
}

h3, .h3, h4, .h4, h6, .h6 {
  font-family: "Open Sans", sans-serif;
}

h1, .h1 { font-size: 28px; }

.container { max-width: 1140px; }

header { background-color: #fff; }

.highlight { font-weight: 700; font-size: 1rem; }

/* --------- Tables (Certain markup) --------- */
table {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 0;
}

#page-table td {
  word-wrap: break-word;
}

/* --------- Form controls (Certain markup) --------- */
[type='text'], [type='password'], [type='date'], [type='datetime'], [type='datetime-local'],
[type='month'], [type='week'], [type='email'], [type='number'], [type='search'],
[type='tel'], [type='time'], [type='url'], [type='color'], textarea {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 2.4375rem;
  padding: 0.5rem;
  border: 1px solid #cacaca;
  margin: 0 0 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--body);
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(10,10,10,0.1);
  border-radius: 0;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
}

[type='text']:focus, [type='password']:focus, [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus,
[type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, [type='search']:focus,
[type='tel']:focus, [type='time']:focus, [type='url']:focus, [type='color']:focus, textarea:focus {
  border-color: #8a8a8a;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.2);
}

/* Buttons rendered as inputs in Certain */
input#submitForm {
  width: auto;
  color: #fff;
  border: 1px solid var(--primary-border);
  background-color: var(--primary);
  border-radius: .375rem;
  padding: .375rem .75rem;
  font-size: 1rem;
  margin: .25rem;
}

input#submitForm:hover {
  color: #fff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

input#createNewReg {
  width: auto;
  color: #fff;
  background-color: #5c636a;
  border: 1px solid #565e64;
  border-radius: .375rem;
  padding: .375rem .75rem;
  font-size: 1rem;
  margin: .25rem;
}

input#submitForm.c_btn_finish_and_payno_additional_guests_to_add {
  width: auto;
  color: #fff;
  border: 1px solid var(--submit-border);
  background-color: var(--submit);
  border-radius: .375rem;
  padding: .375rem .75rem;
  font-size: 1rem;
  margin: .25rem;
}

input#submitForm.c_btn_finish_and_payno_additional_guests_to_add:hover {
  color: #fff;
  background-color: #157347;
  border-color: #146c43;
}

#formProfileForm input#createNewReg.c_btn_add_guest {
  width: auto;
  color: #fff;
  background-color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: .375rem;
  padding: .375rem .75rem;
  font-size: 1rem;
  margin: .25rem;
}

/* “Edit” style button */
input.btnSE.c_btn_edit {
  color: #000;
  width: auto;
  background-color: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: .375rem;
  padding: .375rem .75rem;
  font-size: .75rem !important;
  margin: .25rem;
}

/* --------- Navbar brand --------- */
.navbar-brand {
  text-decoration: none;
  white-space: nowrap;
}

#navbar-top .navbar-brand {
  padding: 15px 0;
  flex: 0 0 200px;
  z-index: 12;
  background-color: #fff;
}

@media (max-width: 767.98px) {
  #certain-display-nav {
    display: none;
  }
  table {
    max-width: 100%;
  table-layout: fixed;
  }
}

/* --------- Hero / page header --------- */
.page-header {
  position: relative;
  color: #fff;
  background-color: #000;
  background-blend-mode: overlay;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  animation: animatedBackground 3.5s ease-in-out;
}

.page-header .container { position: relative; animation: pop-in 2.5s ease-out; }

.page-header .backdrop-gradient {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.page-header h1, .page-header .h1 { margin-bottom: 0; }
.page-header .content { margin-top: 6px; }

.lead { font-size: 1.25rem; font-weight: 300; }

.certainContent { background-color: #fff; }

/* --------- Footer --------- */
footer.footer {
  padding: 70px 0 40px;
  background: #464646;
  color: #f4f4f2;
  font-size: 14px;
}

footer.footer a {
  color: #ccc;
  text-transform: uppercase;
  font-size: 12px;
  display: block;
  padding-bottom: 10px;
  border-right: 1px solid #666;
  margin-bottom: 10px;
}

footer.footer .nav .nav-item:last-child a { border: 0; }
footer.footer a:hover { color: #fff; }

footer.footer .copyright {
  margin: 80px 0 0;
  text-align: center;
  color: #ccc;
}

/* --------- Certain tab-nav table rendered as flex --------- */
#certain-display-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  border-collapse: collapse;
  margin: 1rem auto;
}

#certain-display-nav tr {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#certain-display-nav td {
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  border: none;
}

#certain-display-nav td[width="3"] {
  color: var(--gray-600);
  font-weight: 700;
  justify-content: center;
  min-width: 1rem;
}

#certain-display-nav .highlight {
  font-weight: 700;
  border-bottom: 2px solid #900;
}

/* Certain’s legacy <font> tags */
font.text { font-size: 1rem; line-height: 1.5rem; }

/* --------- Harvard-styled accordion --------- */
.accordion-header {
  background-color: var(--crimson);
  color: #fff;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.accordion-button {
  background-color: var(--crimson);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.accordion-button::after { filter: invert(1) brightness(2); }

.accordion-button:not(.collapsed) {
  background-color: var(--crimson-dk);
  color: #fff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(165,28,48,0.4);
}

.accordion-body {
  background-color: #fff;
  color: #212529;
  border-left: 4px solid var(--crimson);
  border-radius: 0 0.25rem 0.25rem 0;
}

/* --------- Responsive tweaks --------- */
@media (min-width: 768px) {
  h1, .h1 { font-size: 32px; }

  #navbar-top .navbar-brand {
    padding: 30px 0;
    flex: 0 0 300px;
  }

  .page-header { background-size: cover; } /* keep full bleed on desktop */

  .page-header .container {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .page-header .backdrop-gradient {
    background: linear-gradient(
      90deg,
      #272727 0%,
      #272727 13%,
      rgba(0,0,0,.25) 30%,
      rgba(0,0,0,.25) 70%,
      #272727 87%,
      #272727 100%
    );
  }
}

/* --------- Motion preference (accessibility) --------- */
@media (prefers-reduced-motion: reduce) {
  .page-header { animation: none; }
  .page-header .container { animation: none; }
}
