/*
 Theme Name:   Vox Populi Child
 Theme URI:    http://vox-populi.bold-themes.com
 Description:  Vox Populi child theme
 Author:       BoldThemes
 Author URI:   http://bold-themes.com
 Template:     vox-populi
 Version:      1.0.0
 Tags:         one-column, right-sidebar, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready
 Text Domain:  vox-populi-child
*/


/* Theme customization starts here
-------------------------------------------------------------- */
/* ==========================================================================
   1. GLOBAL HEADER & STICKY POSITIONING
   ========================================================================== */

header.mainHeader .btLogoArea,
header.mainHeader .btLogoAreaCell,
header.mainHeader .port {
	padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Sticky header gets no extra vertical padding */
body.btStickyHeaderActive .btLogoArea,
body.btStickyHeaderActive .btLogoAreaCell,
body.btStickyHeaderOpened .btLogoArea,
body.btStickyHeaderOpened .btLogoAreaCell {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

header.mainHeader {
  background-color: #ffffff !important;
  z-index: 1000;
  width: 100%;
}

/* Strip default theme container padding and force single-line flex row */
header.mainHeader,
header.mainHeader .btLogoArea,
header.mainHeader .btLogoAreaCell {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Force inner container to align logo and menu to the same vertical center */
@media (min-width: 1200px) {
  header.mainHeader .port {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }
}

body:not(.btTransparentHeader) .btContentHolder,
body:not(.btTransparentHeader) .btContent {
  margin-top: 0 !important;
}

body.btStickyHeaderActive header.mainHeader,
body.btStickyHeaderOpened header.mainHeader,
.btStickyHeaderActive .mainHeader,
.btStickyHeaderOpened .mainHeader {
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   2. SITE LOGO: DRIVES HEADER HEIGHT & FLEXIBLE WHITESPACE CONTROL
   ========================================================================== */

.logo img,
img.btMainLogo {
  margin-top: 0px !important; 
  box-sizing: content-box !important; /* Ensures padding expands outside the image height */
  
  /* --- YOUR HEIGHT & WHITESPACE CONTROLS --- */
  max-height: 80px !important;        /* 1. Sets logo artwork height */
  padding-top: 10px !important;      /* 2. Top whitespace slider */
  padding-bottom: 10px !important;   /* 3. Bottom whitespace slider */
  /* ---------------------------------------- */

  height: auto !important;
  width: auto !important;
  transform: none !important;
  max-width: 300px !important;
  display: block !important;
}

/* ==========================================================================
   LOGO FIX
   ========================================================================== */

img.btAltLogo {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
}

/* ==========================================================================
   3. MAIN MENU: RIGHT-JUSTIFIED & VERTICALLY CENTERED
   ========================================================================== */

/* Desktop navigation only */
@media (min-width: 1200px) {

  /* Push menu right */
  .mainHeader .menuPort {
    display: flex !important;
    align-self: center !important;
    margin-left: auto !important;
  }

  /* Only target the top-level desktop menu */
  .mainHeader .menuPort nav > ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Force individual li containers and links to stay centered */
  .mainHeader .menuPort nav > ul > li {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
  }

  .mainHeader .menuPort ul li:not(.menu-donate-button) a {
    line-height: normal !important;
    display: flex !important;
    align-items: center !important;
  }

  .mainHeader .menuPort ul li a {
      font-size: 18px !important;
      font-weight: bold !important;
  }
}

/* ==========================================================================
   4. DONATE BUTTON MENU ITEM
   ========================================================================== */

.mainHeader .menuPort ul li.menu-donate-button {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

.mainHeader .menuPort ul li.menu-donate-button a {
  background-color: #398bc0 !important;
  color: #ffffff !important;            
  padding: 10px 22px !important;        
  border-radius: 5px !important;         
  font-weight: bold !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: background-color 0.3s ease !important;
  margin-left: 15px !important;          
}

.mainHeader .menuPort ul li.menu-donate-button:hover > a,
.mainHeader .menuPort ul li.menu-donate-button a:hover {
  background-color: #003d80 !important;
  color: #ffffff !important;
}

/* Disable Vox Populi default red hover line/bar */
.mainHeader .menuPort nav > ul > li > a:after,
.mainHeader .menuPort nav > ul > li:hover > a:after {
  display: none !important;
  content: none !important;
}

/* Hover effect: Soft background highlight (Excludes Donate Button) */
.mainHeader .menuPort nav > ul > li:not(.menu-donate-button) > a {
  padding: 8px 14px !important;
  border-radius: 4px !important;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}

.mainHeader .menuPort nav > ul > li:not(.menu-donate-button):hover > a,
.mainHeader .menuPort nav > ul > li:not(.menu-donate-button).current-menu-item > a {
  background-color: #f0f4f8 !important; /* Soft light gray/blue tint */
  color: #398bc0 !important;
}

/* ==========================================================================
   5. SUB-MENU (DROPDOWN) HOVER STYLING
   ========================================================================== */

/* Remove default theme red background/borders on sub-menu items */
.mainHeader .menuPort ul.sub-menu li a:after,
.mainHeader .menuPort ul.sub-menu li:hover > a:after {
  display: none !important;
  content: none !important;
}

/* Base styling for sub-menu links */
.mainHeader .menuPort ul.sub-menu li a {
  transition: color 0.2s ease, background-color 0.2s ease !important;
}

/* Hover state: Blue text and soft blue background highlight */
.mainHeader .menuPort ul.sub-menu li:hover > a,
.mainHeader .menuPort ul.sub-menu li.current-menu-item > a {
  color: #398bc0 !important;             /* Brand blue text */
  background-color: #f0f4f8 !important; /* Soft tint background on hover */
}

/* ==========================================================================
   AUTOMATIC HERO SLIDER HEIGHT & IMAGE CROPPING
   ========================================================================== */

/* 1. Sets the maximum height of the slider container */
.bt_bb_section .bt_bb_content_slider,
.bt_bb_section .bt_bb_slider,
.bt_bb_section .slick-list {
  max-height: 350px !important; /* <--- Set your desired row height here */
}

/* 2. Automatically scales and centers ALL slider images without distorting */
.bt_bb_section .bt_bb_content_slider_item img,
.bt_bb_section .bt_bb_slider_item img,
.bt_bb_section .slick-slide img {
  height: 200px !important;     /* Matches container height */
  width: 100% !important;
  object-fit: cover !important;  /* Automatically crops excess top/bottom equally */
  object-position: center !important; /* Keeps the middle of the photo focused */
}

/* ==========================================================================
   BOLD BUILDER: CUSTOM STAR BADGE (VOX POPULI COMPATIBLE)
   ========================================================================== */

/* 1. Kill theme pseudo-elements that cause background/tip bleeding */
.bt-star-badge::before,
.bt-star-badge::after,
.bt-star-badge a::before,
.bt-star-badge a::after {
  display: none !important;
  content: none !important;
}

/* 2. Clear inner background leakage */
.bt-star-badge *,
.bt-star-badge a,
.bt-star-badge .bt_bb_link {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* 3. Main Star Container & Clip-Path (Dark Blue Default) */
.bt-star-badge {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 170px !important;
  height: 170px !important;
  background-color: #003d80 !important; /* Rich Dark Blue */
  color: #ffffff !important;
  text-decoration: none !important;
  text-align: center !important;
  font-weight: bold !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  
  /* Cuts the box into a 5-point star */
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%, 
    79% 91%, 50% 70%, 21% 91%, 32% 57%, 
    2% 35%, 39% 35%
  ) !important;
  
  transition: background-color 0.2s ease, transform 0.2s ease !important;
}

/* Hover state: Shifts to light blue on hover with a soft zoom */
.bt-star-badge:hover,
.bt-star-badge:hover * {
  background-color: #398bc0 !important; /* Lighter Blue on Hover */
  transform: scale(1.05) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   FORCE FIX: DONATE BUTTON FIXED SIZE HOVER
   ========================================================================== */

/* 1. Change ONLY the background and text color on hover; keep sizing locked */
.mainHeader .menuPort ul li.menu-donate-button a:hover,
.mainHeader .menuPort ul li.menu-donate-button:hover a,
body.btStickyHeaderActive .mainHeader .menuPort ul li.menu-donate-button:hover a {
  background-color: #003d80 !important;
  background: #003d80 !important;
  color: #ffffff !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  transform: none !important;
  /* Intentionally omitted padding override so it doesn't trigger a size recalculation */
}

/* 2. Kill any theme pseudo-elements that alter dimensions */
.mainHeader .menuPort ul li.menu-donate-button a::before,
.mainHeader .menuPort ul li.menu-donate-button a::after,
.mainHeader .menuPort ul li.menu-donate-button:hover a::before,
.mainHeader .menuPort ul li.menu-donate-button:hover a::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  width: 0 !important;
  height: 0 !important;
}

/* 3. Ensure inner elements don't trigger shifts */
.mainHeader .menuPort ul li.menu-donate-button a *,
.mainHeader .menuPort ul li.menu-donate-button:hover a * {
  background-color: transparent !important;
  background: transparent !important;
  color: #ffffff !important;
}

/* ==========================================================================
   STICKY HEADER LOGO HEIGHT FIX
   ========================================================================== */

body.btStickyHeaderActive .logo,
.btStickyHeaderActive .logo {
    height: 70px !important;
    max-height: 70px !important;
}

/* === Keep Wellstone image appropriately sized === */
.bt_bb_column_content_inner .bt_bb_image img.attachment-full.size-full {
    width: 100% !important;
    max-width: 580px !important;
    height: auto !important;
}

/* ==========================================================================
   TIMES SQUARE LED TICKER BOARD
   ========================================================================== */

/* 1. Import a digital dot-matrix font */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

/* 2. Outer Display Frame */
.ticker-board {
  width: 100%;
  overflow: hidden;
  background-color: #050505; /* Pitch black display frame */
  border: 4px solid #1a1a1a;
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9), 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 12px 0;
  white-space: nowrap;
  box-sizing: border-box;
  position: relative;
}

/* Optional grid overlay to simulate individual LED pixels */
.ticker-board::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%), 
              linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
}

/* 3. Scrolling Text Element */
.ticker-content {
  display: inline-block;
  font-family: 'VT323', monospace; /* Dot-matrix style font */
  font-size: 28px;
  line-height: 1;
  letter-spacing: 3px;
  color: #398bc0;
  text-shadow: 0 0 6px rgba(65, 105, 225, 0.8), 0 0 12px rgba(65, 105, 225, 0.4); /* Royal Blue Glow */
  padding-left: 100%;
  animation: ticker-scroll 25s linear infinite;
}

/* Pause animation on hover so visitors can read/click */
.ticker-board:hover .ticker-content {
  animation-play-state: paused;
}

/* 4. Smooth Continuous Animation */
@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Remove border around ticker text box */
.ticker-board,
.ticker-board,
.bt_bb_text:has(.ticker-board),
.bt_bb_raw_html:has(.ticker-board),
.bt_bb_column_content:has(.ticker-board) {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}