/* NICK ADDITIONS BELOW */

/* Overrides default red to UH's red. This is for user ease when someone just selects red from the GUI editor. */

[style*="color: red;"],
[style*="color: #ff0000;"],
[style*="background-color: red;"],
[style*="background-color: #ff0000;"]{
    color: #c8102e !important;
}

@media (max-width: 830px) {
section.bg-blue,
section.bg-indigo,
section.bg-purple,
section.bg-pink,
section.bg-red,
section.bg-orange,
section.bg-yellow,
section.bg-green,
section.bg-teal,
section.bg-cyan,
section.bg-black,
section.bg-gray,
section.bg-gray-dark,
section.bg-gray-100,
section.bg-gray-200,
section.bg-gray-300,
section.bg-gray-400,
section.bg-gray-500,
section.bg-gray-600,
section.bg-gray-700,
section.bg-gray-800,
section.bg-gray-900,
section.bg-primary,
section.bg-secondary,
section.bg-success,
section.bg-info,
section.bg-warning,
section.bg-danger,
section.bg-light,
section.bg-dark,
section.bg-slate-gray,
section.bg-image {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem !important;
    padding-bottom: 1.5rem !important;
    }
}

/* Fixes Figure things */

.text-white .figure-caption {
    --bs-text-opacity: 1;
    color:rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important
}

.d-flex.flex-column.align-items-center > figure > figcaption.figure-caption {
  width: min(100%, 720px);
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.d-flex.flex-column.align-items-center > figure > img.figure-img {
  display: block;
  margin-inline: auto;
  height: auto;
  max-width: 100%;
}

/* Smaller h2 font size to accomodate MR staff's preference — they won't otherwise use the proper header class */

#article-content h2 {
    font-size: 48px;
}

.page-section .section-heading {
    display: block;
}

/* Addition of well class for "key takeaways" or summary sections */

.well {
    max-width: 1082px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
}

/* Custom bulleted list stylization to match Cascade's newsroom design */

#article-content ul:not(#article-footer ul):not(.owl-carousel):not(.owl-carousel *):not(.stats-list):not(.section-grid-stats) {
    list-style: none;
    padding-left: 0px;
}

#article-content ul:not(#article-footer ul):not(.owl-carousel):not(.owl-carousel *):not(.stats-list):not(.section-grid-stats) li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
}

#article-content ul:not(#article-footer ul):not(.owl-carousel):not(.owl-carousel *):not(.stats-list):not(.section-grid-stats) li::before {
    content: "▸";
    color: #c8102e;
    margin-right: 8px;
    font-size: 1.2em;
    position: absolute;
    left: 0;
}

/* Button Snippet Fix */

#article-content .btn-snippet:not(.button-container-row .btn-snippet) {
  display: inline-block;
  max-width: 1000px;
  margin-left: max(0px, calc((min(100%, 1300px) - 1000px) / 2));
  margin-right: auto;
}

.btn-link {
    padding-left:0;
}

.button-container-row {
    display: flex;
    gap: 1rem;
    max-width: 1000px;
    width: 100%;
    margin-inline: auto;

}

@media (max-width: 600px) {
  .button-container-row {
      flex-direction: column;
      gap: 0rem;
  }
}

/* Restores legacy red-btn styling for older stories */

 .red-btn {
	border-radius: 50px;
	padding: 12px;
	font-size: 18px;
	position: relative;
	border: none;
	padding-left: 24px;
}
 .red-btn span:after {
	 content: "";
	 background-size: contain;
	 display: inline-block;
	 height: 18px;
	 width: 22px;
	 margin-left: 8px;
	 margin-right: 5px;
	 margin-bottom: -3px;
	 transition: all 300ms ease;
}
 .red-btn.btn-primary span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid.svg) center center no-repeat;
}
 .red-btn.btn-success span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid.svg) center center no-repeat;
}
 .red-btn.btn-danger span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid.svg) center center no-repeat;
}
 .red-btn.btn-default span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid-black.svg) center center no-repeat;
}
 .red-btn.btn-warning span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid-black.svg) center center no-repeat;
}
 .red-btn.btn-info span:after {
	 background: url(https://www.uh.edu/news-events/_images/arrow-right-solid-chocolate.svg) center center no-repeat;
}
 .red-btn:hover span:after {
	 margin-left: 13px;
	 margin-right: 0;
}

 .red-btn.btn-download span:after {
     transform: rotate(90deg);
}

 .red-btn.btn-download:hover span:after {
	 margin-top: 8px;
	 margin-bottom: -8px;
     margin-left: 8px;
	 margin-right: 5px;
}

/* Border radius rounding for various elements */

#article-content iframe,
#article-content .page-section,
#article-content video,
#article-content section {
     border-radius:8px;
 }

/* CTA - People Newsroom Fix */

#article-content .snippet-pplCard {
    margin: auto;
    max-width: 1000px;
}

#article-content .snippet-pplCard p {
    margin: 0;
}

/* Cover Photo */

.cover-photo .caption {
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.cover-photo .caption > p:last-child {
    margin-bottom: 0;
}

.cover-photo .caption-wrapper {
    background: none;
}

@media screen and (max-width: 768px) {
div > .container {
    padding:0;
}

.container > .caption {
    padding:0px;
}
 .cover-photo .caption {
    background-color: none;
    border: none;
    backdrop-filter: none;
    line-height: 24px;
    font-size: 16px;
} 
    
}

/* Stats Section Feature */

.container.landing-template {
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}
@media (min-width: 992px) {
#article-content ul.stats-list {
    max-width: 350px;
    }
}

.stats-image {
    max-width: 100%;
}

.stats-list-left-align {
    right: 150px !important;
    left: auto;
}

.stats-list-right-align {
    left: 150px !important;
    right: auto;
}

.stats-list {
	margin-left: 0px !important;
	margin-right: 0px !important;
}

.stats-list li:not(:last-child)::after {
    margin-top: 2rem !important;
    margin-bottom: 0rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 992px) {

    .stats-list {
        background-color: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px);
    }
    
    .stats-list li {
        background-color: rgba(255, 255, 255, 0) !important;
        }
}

/* Full-width iframe videos */

#article-content p:has(> iframe) {
  max-width: 1300px;
  margin-inline: auto; /* keep it centered if your container allows */
}

#article-content p > iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Carousel */

.owl-item > .col-sm-4,
.owl-item > .col-sm-12, 
.owl-item > .col-xs-12,
.owl-item > .col-sm-3{
    padding-left: 0 !important;
}