/* ==========================================================================
   resource_pages.css
   ATI Technical Assistance Resource Directory pages (screen + print)
   Print styles merged in from page embed code, October 2026
   ========================================================================== */


/* ==========================================================================
   SCREEN STYLES
   ========================================================================== */

/* Container */
.resource-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #181611;
}

/* Title + text */
.resource-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.resource-intro {
  font-size: 1.25rem;
  color: #8a650c;
  margin-bottom: 2rem;
}

.resource-text {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Section headings */
.resource-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Print button (matches the jump-nav link style) */
button.print-btn {
  padding: 6px 16px;
  border: 2px solid #CFB87C;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

button.print-btn:hover,
button.print-btn:focus-visible {
  background: #CFB87C;
  color: #000;
}

/* Checklist */
.checklist {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Material icon styling */
.material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.icon-primary {
  color: #e6a819;
}

/* Standard list */
.resource-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.resource-list li {
  margin-bottom: 0.5rem;
}

/* Pro tip */
.pro-tip {
  background-color: rgba(230, 168, 25, 0.08);
  border-left: 4px solid #e6a819;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
}

.pro-tip-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.pro-tip-title .material-symbols-outlined {
  color: #e6a819;
}

.pro-tip-text {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Small note */
.resource-note {
  font-size: 0.875rem;
  color: #8a650c;
  margin-top: 1.5rem;
}

/* Tables */
.resource-container table,
.resource-container .resource-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.resource-container thead th {
  background: #181611;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 0.875rem 1rem;
  border-bottom: 3px solid #e6a819;
}

.resource-container tbody th {
  background: rgba(230, 168, 25, 0.12);
  color: #181611;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(24, 22, 17, 0.1);
}

.resource-container td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(24, 22, 17, 0.08);
  vertical-align: top;
}

.resource-container tbody tr:last-child td,
.resource-container tbody tr:last-child th {
  border-bottom: none;
}

/* Side-by-side image row */
.aesthetic-images {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 2rem 0;
}

.aesthetic-images .img-row {
  flex: 1 1 0;
  max-width: 100%;
  margin: 0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.aesthetic-images .img-row img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  filter: brightness(0.98) contrast(1.02);
}

/* Same card layout as img-row, but image keeps full/natural height (no crop) */
.aesthetic-images .img-row-full {
  flex: 1 1 0;
  max-width: 100%;
  margin: 0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.aesthetic-images .img-row-full img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  filter: brightness(0.98) contrast(1.02);
}

.aesthetic-images img.single {
  object-fit: contain;
}

/* Center a single figure in body copy (pair with img-row or img-row-full) */
.resource-container .img-center {
  float: none;
  width: 100%;
  max-width: 720px;
  margin: 2rem auto;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.resource-container .img-center img {
  width: 100%;
  display: block;
  border-radius: 14px;
  filter: brightness(0.98) contrast(1.02);
}

.resource-container .img-center.img-row img {
  height: 200px;
  object-fit: cover;
}

.resource-container .img-center.img-row-full img {
  height: auto;
  object-fit: contain;
}

/* Center images inside a row (group or single card) */
.aesthetic-images.aesthetic-images-centered {
  justify-content: center;
}

.aesthetic-images.aesthetic-images-centered .img-row,
.aesthetic-images.aesthetic-images-centered .img-row-full {
  flex: 0 1 auto;
  width: auto;
  max-width: min(100%, 360px);
}

/* Floated single image: use on a figure in body copy, NOT inside .aesthetic-images */
.resource-container .img-float-left {
  float: left;
  width: min(42%, 340px);
  margin: 0.25rem 1.5rem 1rem 0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.resource-container .img-float-left img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  filter: brightness(0.98) contrast(1.02);
}

/* Mobile */
@media (max-width: 640px) {
  .aesthetic-images {
    flex-wrap: wrap;
  }

  .aesthetic-images .img-row {
    flex: 1 1 100%;
  }
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {

  /* ---- Page setup ---- */

  @page {
    margin: 0.5in 0.75in;
  }

  html,
  body {
    height: auto !important;
    overflow: visible !important;
  }

  body {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.4;
    orphans: 3;
    widows: 3;
  }

  ::-webkit-scrollbar {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }


  /* ---- Layout: let content use the full page width ---- */

  .sf_colsIn,
  .container,
  .px-5,
  .t-contentBlock,
  .sf-Long-text,
  .resource-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .resource-container {
    overflow: visible !important;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 10pt;
    color: #000;
  }


  /* ---- Hide web-only elements ---- */

  .jump-nav,
  .print-btn,
  .localHeader {
    display: none !important;
  }


  /* ---- Headings ---- */

  .resource-title {
    margin-top: 0;
    font-size: 20pt;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .resource-section-title {
    margin: 18px 0 12px;
    padding: 4px 0;
    border-bottom: 2px solid #CFB87C;
    background: transparent !important;
    color: #000 !important;
    font-size: 14pt;
  }


  /* ---- Boxes that should not split across pages ---- */

  .pro-tip,
  .checklist li,
  .resource-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }


  /* ---- Images ----
     The CU Denver global print CSS hides every image.
     This brings back the first image in each block, scoped to <main>
     so tracking pixels at the end of <body> stay hidden.
     (Unscoped, a 1x1 pixel prints as a full-width blank box.) */

  main img:nth-of-type(1) {
    display: block !important;
  }

  /* Flatten the screen "card" look: shadows, rounded corners and
     filters print muddy on paper */
  .aesthetic-images .img-row,
  .aesthetic-images .img-row-full,
  .resource-container .img-center,
  .resource-container .img-float-left,
  .resource-container img {
    box-shadow: none !important;
    border-radius: 0 !important;
    filter: none !important;
  }

  .aesthetic-images,
  .resource-container .img-center,
  .resource-container .img-float-left {
    break-inside: avoid;
    page-break-inside: avoid;
  }


  /* ---- Image rows ---- */

  .img-row-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 12pt 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .img-row {
    display: flex !important;
    flex: 1 1 30% !important;
    flex-direction: column !important;
    max-width: 32% !important;
    margin: 0 !important;
  }

  .img-row img {
    display: block !important;
    flex: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: 200px !important;
    object-fit: cover !important;
  }

  .img-row figcaption {
    margin-top: 4pt;
    color: #444;
    font-size: 7.5pt;
    font-style: italic;
    text-align: center;
  }

  /* Full-height images: cap so one photo can't eat a whole page */
  .img-row-full img,
  .resource-container .img-center img {
    max-height: 3.5in !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto;
    object-fit: contain !important;
  }

  .resource-container .img-float-left {
    width: 40% !important;
    margin: 0 12pt 8pt 0;
  }


  /* ---- Tables ---- */

  .resource-container table,
  .resource-container .resource-table {
    margin: 12pt 0;
    overflow: visible !important;
    border: 1px solid #ccc;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 10pt;
  }

  .resource-container thead {
    display: table-header-group;   /* repeat header row on each page */
  }

  .resource-container tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }


  /* ---- Footer: repeats at the bottom of every printed page ---- */

  .localFooter {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 6pt 0 4pt;
    border-top: 1px solid #CFB87C;
    color: #555;
    font-size: 8pt;
    text-align: center;
  }
}
