/* ============================================
   ACCESSIBILITY & READABILITY OVERHAUL
   Target: 60+ users, visually impaired
   ============================================ */

/* --- CONTENT WIDTH CONSTRAINT --- */
/* Rows inside body sections */
#main-content .et_pb_row,
.et-l--body .et_pb_row,
.page .et_pb_section:not(.et_pb_fullwidth_section) > .et_pb_row {
  max-width: 800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Direct content inside sections (no row wrapper) */
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h1,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h3,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h4,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h5,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > h6,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ul,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ol,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > blockquote,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > table,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > p,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h1,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h2,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h3,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h4,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h5,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > h6,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > ul,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > ol,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > blockquote,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > table,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h1,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h3,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h4,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h5,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h6,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > ul,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > ol,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > blockquote,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > table {
  max-width: 800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* --- TYPOGRAPHY --- */
/* Body text */
.et_pb_text_inner,
.et_pb_text_inner p,
.et_pb_text_inner li,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > li,
.et-l--body .et_pb_section:not(.et_pb_fullwidth_section) > p,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) > p {
  font-size: 20px !important;
  line-height: 1.8 !important;
  color: #1a1a1a !important;
  letter-spacing: 0.01em !important;
}

/* Headings */
h1, .et_pb_text_inner h1,
#main-content .et_pb_section > h1 {
  font-size: 38px !important;
  line-height: 1.3 !important;
  color: #111111 !important;
  margin-bottom: 20px !important;
  font-weight: 700 !important;
}

h2, .et_pb_text_inner h2,
#main-content .et_pb_section > h2 {
  font-size: 32px !important;
  line-height: 1.35 !important;
  color: #111111 !important;
  margin-bottom: 18px !important;
  margin-top: 40px !important;
  font-weight: 700 !important;
}

h3, .et_pb_text_inner h3,
#main-content .et_pb_section > h3 {
  font-size: 26px !important;
  line-height: 1.4 !important;
  color: #1a1a1a !important;
  margin-bottom: 14px !important;
  margin-top: 32px !important;
  font-weight: 600 !important;
}

h4, .et_pb_text_inner h4,
#main-content .et_pb_section > h4 {
  font-size: 22px !important;
  line-height: 1.45 !important;
  color: #1a1a1a !important;
  margin-bottom: 12px !important;
  margin-top: 28px !important;
  font-weight: 600 !important;
}

/* --- LINKS --- */
.et_pb_text_inner a,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) a,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) a {
  color: #0056b3 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 2px !important;
  font-weight: 600 !important;
}

.et_pb_text_inner a:hover,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) a:hover,
.entry-content .et_pb_section:not(.et_pb_fullwidth_section) a:hover {
  color: #003d80 !important;
  text-decoration-thickness: 3px !important;
}

.et_pb_text_inner a:focus,
#main-content a:focus,
.entry-content a:focus {
  outline: 3px solid #f0c040 !important;
  outline-offset: 2px !important;
}

/* --- SECTIONS SPACING --- */
.et_pb_section:not(.et_pb_fullwidth_section) {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

/* --- TABLES --- */
.et_pb_text_inner table,
#main-content .et_pb_section table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 20px 0 !important;
  font-size: 18px !important;
}

.et_pb_text_inner table th,
.et_pb_text_inner table td,
#main-content .et_pb_section table th,
#main-content .et_pb_section table td {
  padding: 14px 16px !important;
  border: 1px solid #ccc !important;
  text-align: left !important;
}

.et_pb_text_inner table th,
#main-content .et_pb_section table th {
  background: #f5f5f5 !important;
  font-weight: 700 !important;
  color: #111 !important;
}

.et_pb_text_inner table tr:nth-child(even),
#main-content .et_pb_section table tr:nth-child(even) {
  background: #fafafa !important;
}

/* --- LISTS --- */
.et_pb_text_inner ul,
.et_pb_text_inner ol,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ul,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ol {
  padding-left: 28px !important;
  margin-bottom: 20px !important;
}

.et_pb_text_inner li,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ul > li,
#main-content .et_pb_section:not(.et_pb_fullwidth_section) > ol > li {
  margin-bottom: 10px !important;
  font-size: 20px !important;
  line-height: 1.8 !important;
}

/* --- BUTTONS --- */
.et_pb_button,
.et_pb_fullwidth_header .et_pb_button {
  font-size: 20px !important;
  padding: 16px 32px !important;
  min-height: 54px !important;
  border-radius: 6px !important;
}

/* --- FOCUS VISIBILITY --- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
.et_pb_button:focus {
  outline: 3px solid #f0c040 !important;
  outline-offset: 2px !important;
}

/* --- SKIP TO CONTENT (screen reader) --- */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99999;
  padding: 16px 24px;
  background: #0056b3;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.skip-to-content:focus {
  left: 0;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- MOBILE RESPONSIVE (tablet) --- */
@media (max-width: 980px) {
  #main-content .et_pb_row,
  .et-l--body .et_pb_row,
  .page .et_pb_section:not(.et_pb_fullwidth_section) > .et_pb_row,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h1,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h3,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h4,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > ul,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > ol,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > table,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h3 {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .et_pb_text_inner,
  .et_pb_text_inner p,
  .et_pb_text_inner li,
  #main-content .et_pb_section > p {
    font-size: 18px !important;
    line-height: 1.7 !important;
  }

  h1, .et_pb_text_inner h1 {
    font-size: 32px !important;
  }
  h2, .et_pb_text_inner h2 {
    font-size: 28px !important;
  }
  h3, .et_pb_text_inner h3 {
    font-size: 24px !important;
  }
}

/* --- MOBILE RESPONSIVE (phone) --- */
@media (max-width: 767px) {
  #main-content .et_pb_row,
  .et-l--body .et_pb_row,
  .page .et_pb_section:not(.et_pb_fullwidth_section) > .et_pb_row,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > h3,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > ul,
  #main-content .et_pb_section:not(.et_pb_fullwidth_section) > ol,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > p,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h2,
  .entry-content .et_pb_section:not(.et_pb_fullwidth_section) > h3 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .et_pb_text_inner,
  .et_pb_text_inner p,
  .et_pb_text_inner li,
  #main-content .et_pb_section > p {
    font-size: 18px !important;
    line-height: 1.7 !important;
  }

  h1, .et_pb_text_inner h1 {
    font-size: 28px !important;
  }
  h2, .et_pb_text_inner h2 {
    font-size: 24px !important;
  }
  h3, .et_pb_text_inner h3 {
    font-size: 22px !important;
  }

  .et_pb_text_inner table,
  #main-content .et_pb_section table {
    font-size: 16px !important;
  }
  .et_pb_text_inner table th,
  .et_pb_text_inner table td,
  #main-content .et_pb_section table th,
  #main-content .et_pb_section table td {
    padding: 10px 12px !important;
  }

  .et_pb_button,
  .et_pb_fullwidth_header .et_pb_button {
    font-size: 18px !important;
    padding: 14px 24px !important;
    width: 100% !important;
    text-align: center !important;
  }
}