/* T4 Custom CSS Document */

/* =====================================================================
   GENERAL OVERRIDES — fix conflicts with main CSS
   ===================================================================== */

.footer__logo .phone a {
  color: #fff;
}

.event-list .section.no-tp {
  padding-top: 0;
  padding-bottom: 0;
}

:where(th) {
  background-color: #fff;
}

.header__row.border {
  border: none !important;
  border-bottom: 1px solid #cc4628 !important;
}

@media (min-width: 47.5rem) {
  .nav--main .nav__item--home {
    padding-top: 1rem !important;
  }
}

svg[fill="#b32573"] {
  fill: #cc4628 !important;
}
svg[fill="#b32573"] path {
  fill: #cc4628 !important;
}

.header__utilities__item:hover {
  color: #ffffff;
}

.footer__links__link:hover {
  color: #ffffff;
}


/* =====================================================================
   CARD / IMAGE HELPERS
   ===================================================================== */

/* Featured card image: force 16:9 */
.card-img-t4 {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-img-t4 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =====================================================================
   ALTERNATING BLOCKS — intro paragraph override
   ===================================================================== */

.alternating-blocks__body {
  max-width: 100% !important;
}


/* =====================================================================
   HOMEPAGE LATEST NEWS — full width
   ===================================================================== */

.section-842 .latest-news {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}


/* =====================================================================
   Turnley Horizontal Tab System
   ===================================================================== */

.t4-tab-container { margin: 0 auto; max-width: 1200px; }
.t4-tab-nav { display: flex; flex-wrap: wrap; list-style: none; border-bottom: 2px solid #ddd; padding: 0; margin: 0; }
.t4-tab-link { background: #75757D; padding: 0.75rem 1.25rem; cursor: pointer; font-weight: 600; color: #ffffff; border: 1px solid #ffffff; margin-bottom: 0; transition: all 0.2s ease; }
.t4-tab-link:hover { color: #ffffff; background-color: #cc4628; }
.t4-tab-link.is-active { color: #ffffff; background-color: #21314d; }
.t4-tab-content-wrapper { border: 1px solid #ddd; border-top: none; padding: 1.5rem; background: #fff; }
.t4-tab-pane { display: none; }
.t4-tab-pane.is-active { display: block; animation: t4FadeIn 0.3s ease; }
@keyframes t4FadeIn { from { opacity: 0; } to { opacity: 1; } }


/* =====================================================================
   Turnley Rankings Content Type
   ===================================================================== */

/* Light grey background block for the entire section strip */
.rankings-section-bg {
  background-color: rgba(174, 179, 184, 0.2);
  padding: 2rem 0;

  /* Break out of parent grid container to span true 100% viewport width */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;

  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}

/* Constrain the outer content alignment layout boundary */
.rankings-container {
  width: 100%;
  max-width: 1500px; /* Matches your master grid spacing flawlessly */
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Fluid Row Setup using automatic centering flex distribution */
.rankings-flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center; /* Centers items perfectly if there are 3, 4, or 5 cards */
  align-items: flex-start;  /* Keeps titles baseline aligned across the row alignment */
  margin: 0 -20px;
}

/* Auto-sizing columns based on content pool counts */
.ranking-card {
  flex: 1 1 250px; /* Fluid item box sizing: stretches out but won't squeeze past 250px */
  max-width: 320px; /* Prevents text elements from stretching too long in low item counts */
  margin: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Section Header Wrapper */
.rankings-header {
  width: 100%;
  text-align: left;
  margin-bottom: 2rem; /* Creates nice separation above the cards row */
}

/* Section Title */
.rankings-header h2 {
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #21314d;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  text-align: left;
}

/* Section Description */
.rankings-header p {
  color: #000000;
  line-height: 1.5;
  margin: 0;
  max-width: 900px; /* Prevents long paragraph lines from stretching too wide across big screens */
  text-align: left;
}

/* Icon Resizing Boundaries */
.ranking-icon-wrap {
  width: 100%; /* Prevents the container from collapsing to 0px width */
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.ranking-icon-img {
  max-height: 100%;
  width: auto;
  display: block;
}

/* Text Element Styling */
.ranking-title {
  color: #cc4628;
  font-size: 1.25rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin: 0 0 10px 0;
  min-height: 2.6em; /* Keeps titles baseline aligned even if one spans 2 lines */
}

.ranking-description {
  color: #000000;
  font-size: 0.938rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 500;
}

/*================ /Turnley Rankings Content Type ================*/


/* =====================================================================
   Turnley Three Column Image or Icon Cards
   ===================================================================== */

.three-col-cards {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  text-align: left;
}

.three-col-cards .btn-outline-red {
  width: 100%;
}

.three-col-cards-content h2.subheaders {
  font-size: 2rem;
  color: var(--color-mines-blue);
  padding: 0 0 1.25rem 0;
  margin: 1rem 0;
  text-align: left;
}

.three-column-buttons h3 {
  color: var(--color-mines-blue);
  padding: 0;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.three-column-buttons {
  padding: 0 0 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
}

/* Flexbox inside cards keeps buttons aligned at the bottom if content length varies */
.three-column-buttons > div {
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensures all cards in the row match height */
}

.three-column-buttons > div p {
  flex-grow: 1; /* Pushes the button to the bottom */
}

/* Push the button to the absolute bottom of the card */
.three-column-buttons > div .btn-outline-red {
  margin-top: auto; /* Pushes button to bottom regardless of text length above it */
}

/* Lock image height across all cards so titles align horizontally */
.three-column-buttons img {
  max-width: 100%;
  width: auto;
  object-fit: contain;
  object-position: left center; /* Keeps logo aligned left and vertically centered in its slot */
  display: block;
  margin-bottom: 2rem;
}

.three-column-buttons .btn-outline-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  text-align: center;
  text-decoration: none !important;
  border: 2px solid var(--color-colorado-red);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  background-color: transparent;
  color: var(--color-mines-blue);

  /* Add these two properties for uniform height: */
  min-height: 4rem; /* Forces all buttons to a fixed minimum height (fits up to 2 lines cleanly) */
  box-sizing: border-box;
}

.three-column-buttons .btn-outline-red:hover,
.three-column-buttons .btn-outline-red:focus-visible {
  background-color: var(--color-colorado-red);
  color: #fff;
}

/* Responsive breakpoint */
@media (max-width: 1024px) {
  .three-column-buttons {
    display: block;
  }

  .three-column-buttons .btn-outline-red {
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .three-column-buttons {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/*================ /Turnley Three Column Image or Icon Cards ================*/


/* =====================================================================
   Media Layouts
   ===================================================================== */

/* image/fullwidth-corner-brackets */
.media-row-brackets {
  position: relative;
  padding: 1rem;
  background:
    linear-gradient(to right, var(--color-colorado-red) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--color-colorado-red) 2px, transparent 2px) 0 0,
    linear-gradient(to left, var(--color-colorado-red) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--color-colorado-red) 2px, transparent 2px) 100% 0,
    linear-gradient(to right, var(--color-colorado-red) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--color-colorado-red) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--color-colorado-red) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--color-colorado-red) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 1.875rem 1.875rem;
}

/* NOTE: see DUPLICATE / CONFLICT NOTES at top of file (#4) — same
   three properties as `.media-brackets .corner-brackets` below */
.media-row-brackets .corner-brackets {
  display: block;
  max-width: 100%;
  height: auto;
}

/* image/corner-brackets */
.media-brackets {
  position: relative;
  padding: 1rem;
  /* Force the wrapper to shrink-wrap to the image width */
  display: inline-block;
  max-width: 100%;

  background:
    linear-gradient(to right, var(--color-colorado-red) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--color-colorado-red) 2px, transparent 2px) 0 0,
    linear-gradient(to left, var(--color-colorado-red) 2px, transparent 2px) 100% 0,
    linear-gradient(to bottom, var(--color-colorado-red) 2px, transparent 2px) 100% 0,
    linear-gradient(to right, var(--color-colorado-red) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--color-colorado-red) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--color-colorado-red) 2px, transparent 2px) 100% 100%,
    linear-gradient(to top, var(--color-colorado-red) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 1.875rem 1.875rem;
}

/* NOTE: see DUPLICATE / CONFLICT NOTES at top of file (#4) */
.media-brackets .corner-brackets {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Alignment Utility Classes --- */

/* =========================================
   TEXT WRAPPING ENABLED (Default)
   ========================================= */

/* Align Left WITH Text Wrap */
.media-brackets.media-align-left.media-wrap-true,
.media-brackets.media-align-left.media-wrap-yes {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
  margin-left: 0;
  margin-top: 0;
}

/* Align Right WITH Text Wrap */
.media-brackets.media-align-right.media-wrap-true,
.media-brackets.media-align-right.media-wrap-yes {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  margin-right: 0;
  margin-top: 0;
}

/* =========================================
   TEXT WRAPPING DISABLED
   ========================================= */

/* Align Left WITHOUT Text Wrap (Sits on its own line) */
.media-brackets.media-align-left.media-wrap-false,
.media-brackets.media-align-left.media-wrap-no {
  display: block;
  float: none;
  margin-right: auto;
  margin-bottom: 1.5rem;
  clear: both;
}

/* Align Right WITHOUT Text Wrap (Sits on its own line) */
.media-brackets.media-align-right.media-wrap-false,
.media-brackets.media-align-right.media-wrap-no {
  display: block;
  float: none;
  margin-left: auto;
  margin-bottom: 1.5rem;
  clear: both;
}

/* =========================================
   CENTER ALIGNMENT
   ========================================= */

.media-brackets.media-align-center {
  display: block;
  float: none;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  clear: both;
  width: fit-content; /* Keeps brackets tight while centering block */
}

/* =========================================
   Media caption
   ========================================= */
/* responsive media layouts */
@media (max-width: 1024px) {
  .media-row-brackets {
    padding: 0;
    background: none;
    background-repeat: no-repeat;
  }
}

/* ========== Image Left or Right ========= */

/* NOTE: see DUPLICATE / CONFLICT NOTES at top of file (#3) — conflicts
   with `figure.img-right` below for margin-left / margin-bottom */
.img-left {
  float: left;
  margin-right: 20px;
  margin-bottom: 15px;
  max-width: 50%;
  height: auto;
}

.img-right {
  float: right;
  margin-left: 20px;
  margin-bottom: 15px;
  max-width: 50%;
  height: auto;
}

.img-right .figcaption {
  color: #333;
  padding: .5rem 0;
  font-family: Open Sans, sans-serif;
  font-size: .875rem;
  line-height: 1.5;
}

/*================ /Media Layouts ================*/


/* =====================================================================
   Three Column (HTML Editors) Content
   ===================================================================== */

/* Container & Header Setup */
.three-col-content-row {
  width: 100%;
  margin: 0 3.5rem 2.5rem 3.5rem;
}

.three-col-row-intro {
  margin-bottom: 1.5rem;
}

/* 3-Column Grid Container */
.three-col-content-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile default */
  gap: 2rem; /* Spacing between columns */
  margin-top: 1.5rem;
}

/* Responsive Breakpoints */
@media (max-width: 1070px) {
  .three-col-content-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 Columns on Tablets */
  }

  .one-col-body {
    /* Force long text strings and URLs to wrap within the container */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  /* Ensure headings scale down smoothly on small screens */
  .three-col-content-row h2,
  .one-col-heading h3 {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

@media (min-width: 1071px) {
  .three-col-content-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Columns on Desktop */
  }
}

/* Individual Column Content */
.one-col-content {
  /* display: flex; this will keep buttons aligned */
  display: block;
  flex-direction: column;
  height: 100%;
}

.one-col-body {
  /*flex-grow: 1;  Pushes button to bottom for equal card heights */
  margin-bottom: 0.75rem;
}

/* CTA Button Styling */
.one-col-cta {
  margin-top: 0.5rem;
}

.btn-outline-red {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  color: var(--color-mines-blue);
  border: 2px solid var(--color-colorado-red);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.btn-outline-red:hover {
  background-color: var(--color-colorado-red);
  color: #ffffff;
}

/*================ /Three Column (HTML Editors) Content ================*/

