:root {
  --navy: #0f2a3a;
  --blue: #1b5ea8;
  --blue-dark: #0f3560;
  --blue-mid: #154680;
  --gold: #c9a24a;
  --sand: #fbfaf7;
  --white: #ffffff;
  --border-soft: #e3ded6;
  --text-main: #444444;
  --text-heading: #173a52;
  --danger: #c90000;
}

/* =========================================================
   Base Layout
========================================================= */

body {
  margin-top: 0 !important;
  padding-top: 0;
  background: var(--sand);
}

#main.wrapper {
  padding-top: 0 !important;
  background: var(--sand);
}

#main .inner {
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================================
   Headings
========================================================= */

header.major h2 {
  margin-bottom: 1.5rem;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.custom-h3 {
  font-size: 1.17em;
  font-weight: 700;
}

.custom-h4 {
  font-size: 1em;
  font-weight: 700;
}

.custom-h5 {
  font-size: 0.83em;
  font-weight: 700;
}

/* =========================================================
   Clerk Subpage Hero
========================================================= */

.clerk-sub-hero {
  width: fit-content;
  margin: 0 auto 3rem;
  padding: 0 2rem 0.5rem;
  background: transparent;
  color: var(--text-main);
  text-align: center;
}

.clerk-sub-inner {
  max-width: 900px;
  margin: 0 auto;
}

.clerk-sub-hero h1 {
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 2rem;
}

.clerk-sub-hero p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.clerk-sub-hero strong {
  margin-bottom: 0;
  color: #000;
  font-weight: 700;
}

/* =========================================================
   Clerk Profile Layout
========================================================= */

.clerk-profile {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.clerk-profile-img,
.clerk-profile-float {
  text-align: center;
}

.clerk-profile-img img {
  width: 100%;
  max-width: 240px;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
}

.clerk-profile-content h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.clerk-profile-wrap {
  position: relative;
}

.clerk-profile-wrap::after {
  content: "";
  display: block;
  clear: both;
}

.clerk-profile-float {
  float: left;
  width: 260px;
  margin: 0 2rem 1rem 0;
}

.clerk-profile-float img {
  width: 100%;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
}

.clerk-profile-float h2,
.clerk-profile-float h3 {
  color: var(--text-heading);
}

.clerk-profile-float h2 {
  font-size: 1.1rem;
}

.clerk-profile-float h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

/* =========================================================
   Lists and Text Helpers
========================================================= */

li {
  margin-bottom: 5px;
}

.clerk-list,
.clerk-bullet-list {
  margin: 1rem 0 1.5rem 1.25rem;
}

.clerk-list {
  list-style-type: none;
}

.clerk-list li,
.clerk-bullet-list li {
  margin-bottom: 0.4rem;
}

.p-fixed-margin {
  margin-bottom: 10px;
}

.extra-space-li {
  margin-bottom: 20px;
}

.ul-fixed-bottom-margin {
  margin-bottom: 5px;
}

.red {
  color: red;
}

/* =========================================================
   Alerts
========================================================= */

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 56, 56, 0.05);
  border-left: 4px solid #ff3838;
}

.alert-primary {
  background-color: rgba(64, 131, 190, 0.08);
  border-left-color: #4083be;
}

.alert-content {
  padding-left: 10px;
  color: #555;
  font-size: 14px;
}

/* =========================================================
   Buttons and CTAs
========================================================= */

.blue-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 3rem;
  background: linear-gradient(to top, var(--blue-dark), var(--blue-mid) 33%, var(--blue));
  color: var(--white) !important;
  text-decoration: none;
  font-size: .9rem;
}

.blue-button:hover {
  background: var(--blue);
  color: var(--white) !important;
  transform: translateY(-3px);
}

.button-container,
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.blue-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 1rem auto;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(to top, var(--blue-dark), var(--blue-mid) 33%, var(--blue));
  color: var(--white);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.blue-box:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.blue-box-link {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  line-height: 1.35;
}

/* =========================================================
   Expandable Boxes / FAQ
========================================================= */

.clerk-sub-content .box.expandable {
  display: block !important;
  margin-bottom: 0.75rem;
}

.clerk-sub-content .box.expandable .box-content {
  display: block !important;
}

.faq {
  margin: 3rem auto 2rem;
}

.faq h3 {
  margin-bottom: 1rem;
}

.faq details {
  margin-bottom: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
}

.faq summary {
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  font-size: 1.2rem;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p,
.faq details ul {
  padding: 0 1rem 1rem;
}

/* =========================================================
   Video Block
========================================================= */

.clerk-sub-content iframe {
  display: block;
  width: 75%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 1.5rem auto 2.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   Title + Button Row
========================================================= */

.title-and-button-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* =========================================================
   Book Card Examples
========================================================= */

.book-card-examples-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.book-card-img-text {
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.book-card-img-text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.5rem;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
}

/* =========================================================
   Marriage Quick Action Grid
========================================================= */

.marriage-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 160px;
  padding: 1.4rem 1.25rem;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--white);
  color: var(--text-main);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.quick-card:hover {
  border-color: #cfd9e4;
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  font-size: 1.35rem;
}

.quick-card h4 {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.quick-go {
  padding: 0.25rem 0.5rem;
  border: 0.5px solid var(--blue);
  border-radius: 0.5rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
}

.quick-card:hover .quick-go {
  background-color: var(--blue-dark);
  color: var(--white);
}

.quick-spanish h4 {
  color: var(--danger);
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {
  .clerk-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .clerk-profile-content {
    text-align: left;
  }

  .clerk-profile-float {
    float: none;
    width: 100%;
    max-width: 260px;
    margin: 0 auto 1.5rem;
  }
}

@media (max-width: 767px) {
  .title-and-button-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .button-container,
  .grid-container {
    grid-template-columns: 1fr;
  }

  .blue-box {
    width: 100%;
    padding: 1rem;
  }

  .blue-box-link {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .marriage-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .book-card-examples-container {
    gap: 1.25rem;
  }

  .book-card-img-text {
    font-size: 0.85rem;
  }
}