/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* --- Hero section styles ---*/

section.hero-section-main {
    width: 100%;
    display: flex;
    justify-content: center;
}

section.hero-section-main p {
    margin: 0;
    padding: 0;
}

.hero-section-inner-container {
    display: flex;
    padding: 45px;
    width: 1400px;
    gap: 40px;
    max-height: 730px;
    margin-bottom: 45px;
}

  /* Left Column: Featured Article */
  .hero-section-featured-column {
    flex: 6; /* Approx 60% width */
    display: flex;
    flex-direction: column;
  }

  .hero-section-featured-article-wrapper {
    display: flex;
    flex-direction: column;
  }

  .hero-section-featured-article-content {
    margin-top: 14px;
}

  .hero-section-featured-article-content .hero-section-meta-wrapper {
    display: flex;
    gap: 15px;
    align-items: baseline;
    margin-bottom: 10px;
}

  p.hero-section-category {
    background-color: #00A6DD;
    color: white;
    font-size: 12px;
    padding: 5px 10px !important;
    font-weight: bold;
    line-height: 1;
  }

  p.hero-section-post-date {
    color: #005492;
    font-size: 14px;
    font-weight: bold;
  }

  h2.hero-section-post-title {
    color: #505255;
    font-weight: 700;
    line-height: 1.2;
  }

  h2.hero-section-spotlight-title {
    font-size: 34px;
    margin-bottom: 10px !important;
  }

  p.hero-section-post-author {
    color: #005492;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px !important;
  }
  p.hero-section-post-author::before {
    content: "By ";
    font-weight: normal;
  }

  p.hero-section-post-excerpt {
    color: #505255;
    font-size: 15px;
    line-height: 1.6;
  }

  /* Right Column: Top Stories */
  .hero-section-top-stories-column {
    flex: 4; /* Approx 40% width */
    display: flex; /* Make this a flex container */
    flex-direction: column; /* Stack heading and list vertically */
    /* This is crucial for allowing the .hero-section-story-list to scroll
       when this column's height is constrained by the taller left column. */
    min-height: 0;
  }

  h2.hero-section-top-stories-heading {
    color: #505255;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 4px solid #00A6DD;
    display: inline-block;
    line-height: 1;
    flex-shrink: 0; /* Prevent heading from shrinking if list content is large */
  }

  .hero-section-story-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto; /* Enable vertical scrolling for the list */
    flex-grow: 1; /* Allow the list to take up remaining vertical space */
    /* Add some padding for the scrollbar & use negative margin to compensate visually when no scrollbar */
    padding-right: 15px; /* Space for scrollbar + a bit of content padding */
    margin-right: -15px; /* Pull back to align content if no scrollbar */
  }

  /* Basic Scrollbar Styling */
  .hero-section-story-list::-webkit-scrollbar {
    width: 8px;
  }
  .hero-section-story-list::-webkit-scrollbar-track {
    background: transparent; /* Or #f1f1f1 if you want a visible track */
  }
  .hero-section-story-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
  }
  .hero-section-story-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
  }
  /* For Firefox */
  .hero-section-story-list {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent; /* thumb and track */
  }


  .hero-section-story-item {
    display: flex;
    gap: 15px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    /* Adjust right padding to account for parent's negative margin if scrollbar is not present */
    padding-right: 15px;
  }
  .hero-section-story-item:last-child {
    border-bottom: none;
    padding-bottom: 0; /* Or some minimal padding if desired */
  }

  .hero-section-story-item .hero-section-featured-image.hero-section-story-item-image-container {
    width: 120px;
    height: -webkit-fill-available;
    flex-shrink: 0;
    overflow: hidden;
  }

  .hero-section-story-item-image-actual {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hero-section-story-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Helps prevent text overflow issues in flex items */
  }

  .hero-section-story-item-content .hero-section-meta-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    align-items: baseline;
}

  .hero-section-story-item-content h2.hero-section-post-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 8px;
  }

  .hero-section-story-item-content p.hero-section-post-excerpt {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Responsiveness */
  @media (max-width: 992px) {
    .hero-section-inner-container {
      flex-direction: column;
      gap: 30px;
    }
    .hero-section-featured-column,
    .hero-section-top-stories-column {
      flex: 1 1 100%;
      min-height: auto; /* Reset min-height, let content define height */
    }
    h2.hero-section-spotlight-title {
      font-size: 30px;
    }
    h2.hero-section-top-stories-heading {
      font-size: 30px;
    }
    .hero-section-story-list {
      overflow-y: visible; /* Disable scrolling when columns are stacked */
      flex-grow: 0; /* Let it take natural height */
      padding-right: 0; /* Reset scrollbar padding */
      margin-right: 0; /* Reset scrollbar margin */
    }
    .hero-section-story-item {
        padding-right: 0; /* Reset item padding */
    }
    .hero-section-story-item-content h2.hero-section-post-title {
      font-size: 22px;
    }
  }

  @media (max-width: 768px) {
    .hero-section-inner-container {
      padding: 25px;
      gap: 25px;
      max-height: none;
    }
    .hero-section-featured-article-content .hero-section-meta-wrapper {
        margin-bottom: 8px;
    }
    .hero-section-story-item-content .hero-section-meta-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    }
    article.hero-section-story-item {
    display: flex;
    flex-direction: column;
}
    
    .hero-section-story-item .hero-section-featured-image.hero-section-story-item-image-container {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
  }
    
    h2.hero-section-post-title {
        margin-bottom: 10px;
    }
    p.hero-section-post-author {
        margin-bottom: 10px;
    }

    h2.hero-section-spotlight-title {
      font-size: 26px;
    }
    h2.hero-section-top-stories-heading {
      font-size: 26px;
      margin-bottom: 15px;
      padding-bottom: 8px;
    }
    .hero-section-story-list {
        gap: 40px;
    }
    .hero-section-story-item {
        gap: 10px;
        padding-bottom: 20px;
    }
    .hero-section-story-item-content h2.hero-section-post-title {
      font-size: 22px;
    }
    .hero-section-story-item-content p.hero-section-post-excerpt {
      font-size: 15px;
    }
    p.hero-section-post-excerpt { /* Main excerpt */
      font-size: 15px;
    }
  }

  @media (max-width: 480px) {
    .hero-section-inner-container {
        padding: 25px;
        max-height: none;
    }
    h2.hero-section-spotlight-title {
      font-size: 28px;
    }
    h2.hero-section-top-stories-heading {
      font-size: 28px;
    }
    .hero-section-story-item-content h2.hero-section-post-title {
      font-size: 22px;
    }
    .hero-section-story-item-content p.hero-section-post-excerpt {
      font-size: 15px;
    }
     p.hero-section-post-excerpt { /* Main excerpt */
      font-size: 15px;
    }
    p.hero-section-category {
        font-size: 12px;
        padding: 4px 8px !important;
    }
    p.hero-section-post-date, p.hero-section-post-author {
        font-size: 14px;
    }
  }
  
/* --- End of Hero section styles ---*/

/* --- Trending sections styles ---*/


  .homepage-trending-section * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  .homepage-trending-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .homepage-trending-main-title {
    font-size: 36px;
    color: #505255;
    font-weight: 700; /* Bold */
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 4px solid #00A6DD; /* Blue underline */
    display: inline-block; /* Border only under text */
    line-height: 1;
  }

  .homepage-trending-posts-list {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Space between each post item */
  }

  .homepage-trending-post-item {
    display: flex;
    gap: 30px; /* Space between image and content */
    align-items: flex-start; /* Align items to the top */
  }

  .homepage-trending-post-image-wrapper {
    flex: 0 0 300px; /* Fixed width for the image wrapper, adjust as needed */
    /* max-width: 40%; */ /* Alternative: percentage based width */
    height: 200px; /* Fixed height for consistent image display */
    overflow: hidden; /* Ensure image fits within bounds */
  }

  .homepage-trending-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
    display: block;
  }

  .homepage-trending-post-content {
    flex: 1; /* Takes remaining space */
    display: flex;
    flex-direction: column;
  }

  .homepage-trending-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
  }

  p.homepage-trending-post-category {
    background-color: #00A6DD;
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    font-weight: bold;
    line-height: 1;
  }

  p.homepage-trending-post-date {
    color: #005492;
    font-size: 14px;
    font-weight: bold; /* Date often appears bold */
  }

  h3.homepage-trending-post-title {
    color: #505255;
    font-size: 28px;
    font-weight: 700; /* Bold */
    line-height: 1.3;
    margin-bottom: 10px;
  }

  p.homepage-trending-post-author {
    color: #005492;
    font-size: 14px;
    font-weight: bold; /* Author name often bold */
    margin-bottom: 15px;
  }

  p.homepage-trending-post-author::before {
    content: "By ";
    font-weight: normal; /* "By" might not be bold */
  }

  p.homepage-trending-post-excerpt {
    color: #505255;
    font-size: 15px;
    line-height: 1.6;
  }
  
.homepage-trending-footer {
    margin-top: 45px;
    display: flex;
    justify-content: center;
}
  /* Mobile Responsiveness */
  @media (max-width: 992px) {
    .homepage-trending-main-title {
      font-size: 30px;
    }
    h3.homepage-trending-post-title {
      font-size: 24px;
    }
    .homepage-trending-post-image-wrapper {
      flex-basis: 250px; /* Slightly smaller image on tablets */
      height: 160px;
    }
  }

  @media (max-width: 768px) {
    .homepage-trending-main-title {
      font-size: 28px;
      margin-bottom: 25px;
    }
    .homepage-trending-post-item {
      flex-direction: column; /* Stack image and content */
      gap: 20px; /* Space between stacked image and content */
    }
    .homepage-trending-post-image-wrapper {
      flex-basis: auto; /* Allow it to take full width */
      width: 100%;
      height: 200px; /* Or 'auto' if you prefer natural image height */
    }
    h3.homepage-trending-post-title {
      font-size: 28px;
    }
    p.homepage-trending-post-excerpt {
      font-size: 15px;
    }
    .homepage-trending-posts-list {
      gap: 40px;
    }
  }

  @media (max-width: 480px) {
    .homepage-trending-main-title {
      font-size: 28px;
    }
    h3.homepage-trending-post-title {
      font-size: 22px;
    }
    .homepage-trending-post-image-wrapper {
      height: 180px; /* Adjust height for smaller screens */
    }
    
    p.homepage-trending-post-category {
      font-size: 12px;
    }
    p.homepage-trending-post-date,
    p.homepage-trending-post-author {
      font-size: 14px;
    }
    p.homepage-trending-post-category {
      padding: 4px 8px;
    }
    p.homepage-trending-post-excerpt {
      font-size: 15px;
    }
  }
  
/* --- End of Trending sections styles ---*/

/* --- Category & Tag Archive styles --- */

/* Reset and box model */
.category-archive-section *, .tag-archive-section * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Container */
.category-archive-container, .tag-archive-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Title */
.category-archive-main-title,
.tag-archive-main-title {
  font-size: 36px;
  color: #505255;
  font-weight: 700;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 4px solid #00A6DD;
  display: inline-block;
  line-height: 1;
}

/* Posts List */
.category-archive-posts-list,
.tag-archive-posts-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* Post Item */
.category-archive-post-item,
.tag-archive-post-item {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Image Wrapper */
.category-archive-post-image-wrapper,
.tag-archive-post-image-wrapper {
  flex: 0 0 300px;
  height: 200px;
  overflow: hidden;
}

/* Image */
.category-archive-post-image,
.tag-archive-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content */
.category-archive-post-content,
.tag-archive-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Meta */
.category-archive-post-meta,
.tag-archive-post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

/* Category/Tag Badge */
p.category-archive-post-category,
p.tag-archive-post-category {
  background-color: #00A6DD;
  color: white;
  font-size: 14px;
  padding: 5px 10px;
  font-weight: bold;
  line-height: 1;
}

/* Date */
p.category-archive-post-date,
p.tag-archive-post-date {
  color: #005492;
  font-size: 14px;
  font-weight: bold;
}

/* Title */
h3.category-archive-post-title,
h3.tag-archive-post-title {
  color: #505255;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* Author */
p.category-archive-post-author,
p.tag-archive-post-author {
  color: #005492;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 15px;
}
p.category-archive-post-author::before,
p.tag-archive-post-author::before {
  content: "By ";
  font-weight: normal;
}

/* Excerpt */
p.category-archive-post-excerpt,
p.tag-archive-post-excerpt {
  color: #505255;
  font-size: 15px;
  line-height: 1.6;
}

/* Pagination Wrapper */
.category-archive-pagination,
.tag-archive-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 40px 0;
  padding: 0;
}

/* Page Numbers */
.category-archive-pagination .page-numbers,
.tag-archive-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  text-decoration: none;
  font-size: 14px;
  color: #005492;
  border: 1px solid #00A6DD;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.category-archive-pagination .page-numbers:hover,
.tag-archive-pagination .page-numbers:hover {
  background-color: #00A6DD;
  color: #ffffff;
}
.category-archive-pagination .current,
.tag-archive-pagination .current {
  background-color: #00A6DD;
  color: #ffffff;
  cursor: default;
  border-color: #00A6DD;
}
.category-archive-pagination .dots,
.tag-archive-pagination .dots {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: #505255;
  pointer-events: none;
  border: none;
  background: transparent;
}

/* Load More Button */
.category-archive-load-more,
.tag-archive-load-more {
  margin-top: 30px;
}
a.read-more-stories-button {
  background-color: #04a5dc;
  padding: 15px;
  color: white;
  text-decoration: none;
  display: inline-block;
}

.category-archive-footer,
.tag-archive-footer {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 20px;
  margin-top: 30px;
}

.category-archive-pagination-footer, .tag-archive-pagination-footer, .tag-archive-load-more, .category-archive-load-more {
    margin: 45px 0px;
    display: flex;
    justify-content: center;
    gap: 45px;
}

.category-archive-prev,
.category-archive-next,
.tag-archive-prev,
.tag-archive-next {
  background-color: #04a5dc;
  padding: 15px;
  color: white;
  text-decoration: none;
  display: inline-block;
  width: 130px;
  text-align: center;
}

.category-archive-prev:hover,
.category-archive-next:hover,
.tag-archive-prev:hover,
.tag-archive-next:hover {
  opacity: 1;
}

.read-more-stories-button {
  background-color: #04a5dc;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .category-archive-main-title,
  .tag-archive-main-title {
    font-size: 30px;
  }
  h3.category-archive-post-title,
  h3.tag-archive-post-title {
    font-size: 24px;
  }
  .category-archive-post-image-wrapper,
  .tag-archive-post-image-wrapper {
    flex-basis: 250px;
    height: 160px;
  }
}

@media (max-width: 768px) {
  .category-archive-main-title,
  .tag-archive-main-title {
    font-size: 28px;
    margin-bottom: 25px;
  }
  .category-archive-post-item,
  .tag-archive-post-item {
    flex-direction: column;
    gap: 20px;
  }
  .category-archive-post-image-wrapper,
  .tag-archive-post-image-wrapper {
    flex-basis: auto;
    width: 100%;
    height: 200px;
  }
  h3.category-archive-post-title,
  h3.tag-archive-post-title {
    font-size: 28px;
  }
  p.category-archive-post-excerpt,
  p.tag-archive-post-excerpt {
    font-size: 15px;
  }
  .category-archive-posts-list,
  .tag-archive-posts-list {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .category-archive-main-title,
  .tag-archive-main-title {
    font-size: 28px;
  }
  h3.category-archive-post-title,
  h3.tag-archive-post-title {
    font-size: 22px;
  }
  .category-archive-post-image-wrapper,
  .tag-archive-post-image-wrapper {
    height: 180px;
  }
  p.category-archive-post-category,
  p.tag-archive-post-category,
  p.category-archive-post-date,
  p.tag-archive-post-date,
  p.category-archive-post-author,
  p.tag-archive-post-author {
    font-size: 14px;
  }
  p.category-archive-post-category,
  p.tag-archive-post-category {
    padding: 4px 8px;
  }
  p.category-archive-post-excerpt,
  p.tag-archive-post-excerpt {
    font-size: 15px;
  }
}

/* Additional Small-Screen Tweaks */
@media (max-width: 720px) {
  .category-archive-pagination .page-numbers,
  .tag-archive-pagination .page-numbers,
  .category-archive-pagination .dots,
  .tag-archive-pagination .dots {
    padding: 6px 10px;
    font-size: 12px;
  }
  .category-archive-load-more,
  .tag-archive-load-more {
    margin: 50px 0;
  }
  div#brxe-ysrlxr img, div#brxe-5eb725 img {
    display: none !important;
  }
}

/* --- End of Category & Tag Archive styles --- */


/* Sidebar Ad element styles */
.sidebar-ad-wrapper {
  position: relative;
  overflow: hidden;
}

/* Make the link wrap the image and overlay */
.sidebar-ad-link {
  display: block;
  position: relative;
}

.sidebar-ad-image {
  display: block;
  width: 100%;
  height: auto;
}

/* initial overlay always visible */
.sidebar-ad-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  transition: background 0.3s ease;
}

/* stronger overlay on wrapper hover */
.sidebar-ad-wrapper:hover .sidebar-ad-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* button always visible */
.sidebar-ad-button {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #04a5dc;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  width: 80%;
  margin-bottom: 20px;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* invert button colors when hovering anywhere on the ad */
.sidebar-ad-wrapper:hover .sidebar-ad-button {
  background-color: #fff;
  color: #000;
}

/* endof Sidebar Ad element styles */

body.no-scroll {
        overflow: hidden !important;
        height: 100vh;
      }

h1, h2, h3, h4, h5, h6 {
    color: black !important;
    font-weight: normal !important;
}

.bricks-menu-item > a {
    font-size: 16px !important;
}

.bricks-search-inner > h4::before {
    content: "";
    display: block;
    background-image: url('https://underthehardhat.org/wp-content/uploads/2024/04/uthh-full-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 60px;
    width: 200px;
    margin-bottom: 10px;
}


.bricks-search-inner > h4 {
    color: white !important;
    font-size: 0px;
}

.bricks-search-overlay .close {
    color: white !important;
}

@media (max-width: 720px) {
    div#brxe-kzchvk, div#brxe-vacxwf {
        text-align: center;
    }
    div#brxe-qybomm {
        width: 80%;
    }
}



/* initially hide both modal and close button */
    #brxe-svpixt,
    #brxe-pgalmb {
        display: none;
    }

  
  #brxe-jqknxb {
    background: linear-gradient(180deg, #00A6DD 0%, #005492 87.97%) !important;
}

#brxe-ubrpyz > div > button {
    color: black !important;
    font-size: 33px !important;
    height: 33px !important;
    width: 33px !important;
}


#brxe-xiayxo > div:nth-child(2) > ul {
    display: flex !important;
    gap: 21px !important;
}

#brxe-xiayxo > div:nth-child(3) > ul > li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    background-color: #d0d0d0 !important;
    padding: 10px !important;
}

#brxe-xiayxo > div:nth-child(2) {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
}

#brxe-xiayxo > div:nth-child(3) > ul > li > label {
    margin-top: -2px !important;
    font-style: italic !important;
}

#brxe-xiayxo > div:nth-child(1) > ul > li {
    display: flex !important;
    gap: 6px !important;
    font-family: 'Bebas Neue' !important;
}

div#brxe-cnffna {
    background-color: white;
    padding: 25px;
}