/* Newsguru Theme - Main Stylesheet
 *
 * This file contains the main CSS styles for the Newsguru Theme.
 * It includes global styles, layout adjustments, and component styling.
 *
 * @package Newsguru_Theme
 * @subpackage Styles
 * @since 1.0.0
    */

/* ------------------------------------------------------------------------------------
 * GLOBAL STYLES
 * These styles apply to the entire site and set the foundation for the theme's design.
 * ---------------------------------------------------------------------------------- */

/* 
 * Site Wrapper styles - Ensure the site wrapper takes up the full viewport height.
 * This allows the footer to be pushed to the bottom of the page when there is little content.
 */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Ensure the main content area takes up remaining space */
#brx-content {
  flex: 1;
  position: relative;
  width: 100%;
}

/* Adjust the minimum height of the site wrapper when the admin bar is present */
.admin-bar .site-wrapper {
  min-height: calc(100vh - 32px);
}

/* =========================================================
   ICON STYLES
   Sizing and display rules for inline SVG icons rendered
   via the wpf_icon() helper function.
   ========================================================= */
.wpf-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Weather Rotator Styles */
#weather-rotator {
  color: var(--clr-dark);
  font-size: 1.2rem;
  font-family: "Poppins", sans-serif;
}

#enable-location-btn {
  padding: 0.6rem 1.4rem;
  background: var(--clr-primary);
  color: var(--clr-light);
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-size: 1.2rem;
}

#enable-location-btn:hover {
  background: #0066d6;
}

/* Slider styles */
.splide {
  visibility: hidden;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.splide.is-initialized {
  visibility: visible;
  opacity: 1;
  height: auto;
  overflow: visible;
}

.splide {
  height: 0;
  transition:
    height 0.4s ease,
    opacity 0.3s ease;
}
.splide.is-initialized {
  height: auto;
}

/* Sliding Header Menu */
#sliding-header-menu {
  position: fixed;
  top: -10rem;
  left: 0;
  right: 0;
  transition: top 0.4s ease;
  z-index: 1000;
  width: 100%;
  align-items: center;
  margin: 0 auto;
}

/* News Image Hover Effect */
.wpf-slider__img,
.card-primary__img,
.wpf-newslist__img {
  overflow: hidden;
}

.wpf-slider__img img,
.card-primary__img img,
.wpf-newslist__img img {
  transition: transform 0.5s ease;
}

.wpf-slider__img:hover img,
.card-primary__img:hover img,
.wpf-newslist__img:hover img {
  transform: scale(1.08);
}

.post-content {
  .wp-block-image {
    position: relative;
    width: fit-content;
    margin: 0 auto;
  }

  .wp-block-table thead,
  table th {
    border-bottom: none !important;
    background: var(--clr-primary);
  }

  .wp-block-table {
    scrollbar-width: thin;
    padding-bottom: 1rem;
  }

  .wp-block-table td,
  .wp-block-table th {
    border-color: var(--clr-border) !important;
  }

  .wp-block-table .has-fixed-layout th {
    white-space: nowrap;
    min-width: 10rem;
    color: var(--clr-light);
  }

  .wp-block-table .has-fixed-layout {
    table-layout: unset !important;
    overflow: hidden;
  }

  table tbody tr:nth-child(even) {
    background-color: #fbfafa;
  }

  table tbody tr:hover {
    background-color: var(--clr-light-l-1);
  }

  img {
    aspect-ratio: 16/9;
    object-fit: cover;
  }

  figcaption {
    position: absolute;
    bottom: 0;
    color: var(--clr-light);
    background: linear-gradient(0deg, #000000de, #0000) !important;
    margin: 0;
    padding: 1rem;
    font-size: 1.3rem;
  }

  blockquote {
    padding-left: 1.5rem;
    text-align: left;
    border-left-color: var(--clr-primary);
    background-color: var(--clr-light-l-1);
    padding-block: 1rem;
    & p,
    & cite {
      font-size: 1.6rem;
      font-family: "Poppins";
      font-style: italic;
    }
  }

  .wp-block-pullquote {
    padding-block: 2rem;
  }

  .wp-block-gallery figcaption {
    padding: 0.8rem;
  }

  .wp-block-media-text__content {
    padding: 1rem;
    padding-inline: 1.4rem;
    margin: 0;
  }
}

.error404 .newstciker-sec {
  display: none;
}

/* ------------------------------------------------------------------------------------
 * RESPONSIVE LAYOUT ADJUSTMENTS
 * These styles ensure the theme looks great on all devices by adjusting the layout for
 * different screen sizes.
 * ---------------------------------------------------------------------------------- */

@media (max-width: 782px) {
  .admin-bar .site-wrapper {
    min-height: calc(100vh - 46px);
  }
}

@media (max-width: 910px) {
  .wpf-opinion .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  #wpadminbar {
    z-index: 999;
  }
}
