/* ==============================
   SHI Blog – Conversions + SHI Custom Feed
   Stable Override – Last Known Good Version
   ============================== */

/* ---- design tokens ---- */
:root{
  --shi-red:#c4112f; --shi-red-dark:#9d0f26;
  --shi-ink:#111214; --shi-ink-muted:#61646b;
  --shi-bg:#ffffff; --shi-bg-soft:#f1f2f4; --shi-panel:#eceff1; --shi-border:#e2e5e9;
  --shi-shadow-1:0 2px 10px rgba(0,0,0,.06); --shi-shadow-2:0 6px 22px rgba(0,0,0,.10);
  --shi-green-chip:#3baa2b; --shi-radius-lg:16px; --shi-radius-sm:10px;
}

/* --------------------------------------
   FILTER BAR (chips row)
   -------------------------------------- */
.shi-cf-filter-bar{
  display:flex;flex-wrap:wrap;gap:.5rem .6rem;
  margin:0 0 1rem 0; position:relative;
}

.shi-cf-filter{
  display:inline-flex;align-items:center;
  padding:.44rem .75rem;font-weight:700;font-size:.86rem;
  line-height:1;border-radius:999px;background:var(--shi-green-chip);
  color:#fff;text-decoration:none;box-shadow:var(--shi-shadow-1);
  white-space:nowrap;transition:filter .15s ease,transform .12s ease;
}

.shi-cf-filter:hover{
  filter:brightness(.95);
  transform:translateY(-1px);
}

/* FILTER PANEL TOGGLE BUTTON */
.shi-cf-filter-toggle{
  position:absolute;
  top:0;
  right:0;
  margin-bottom:0.75rem;
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:10px;border:1px solid rgba(0,0,0,.08);
  background:#fff;box-shadow:var(--shi-shadow-1);
  cursor:pointer;z-index:10;
}

/* FILTER PANEL */
.shi-cf-filter-panel{
  position:absolute;z-index:9999;right:12px;
  background:#ff6600;color:#fff;
  border-radius:12px;padding:16px;box-shadow:0 6px 22px rgba(0,0,0,.25);
  width:360px;max-width:calc(100vw - 24px);
}

/* --------------------------------------
   FEED GRID
   -------------------------------------- */
.shi-cf-feed-tiles{
  width:100%;display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr)) !important;
  gap:18px !important;align-items:stretch;
}

.shi-cf-feed-tiles > *{ min-width:0; }

/* --------------------------------------
   TILE
   -------------------------------------- */
.shi-cf-tile{
  background:#fff;border:1px solid var(--shi-border);

  box-shadow:var(--shi-shadow-1);
  overflow:hidden;display:grid;grid-template-rows:auto 1fr;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

.shi-cf-tile:hover{
  transform:translateY(-3px);
  border-color:rgba(0,0,0,.06);
  box-shadow:var(--shi-shadow-2);
}

.shi-cf-tile > a{
  display:block;text-decoration:none;color:inherit;min-width:0;
}

/* uniform 16:9 tile images */
.shi-cf-tile img.wp-post-image{
  width:100%;aspect-ratio:16/9;object-fit:cover;
  display:block;background:var(--shi-panel);
}

/* title */
.shi-cf-tile h3{
  margin:0;padding:14px 18px 0 18px;
  font-weight:900;font-size:1.08rem;line-height:1.25;color:#b11ca0;
}

/* excerpt */
.shi-cf-tile-excerpt{
  margin:8px 18px 0 18px;color:var(--shi-ink);opacity:.92;font-size:.98rem;
}

/* categories */
.shi-cf-tile-categories{
  margin:10px 18px 18px 18px;font-size:.9rem;color:var(--shi-ink-muted);
}

/* date */
.shi-cf-tile-date{
  margin:8px 18px 18px 18px;color:var(--shi-ink-muted);font-size:.9rem;
}

/* --------------------------------------
   FEATURED CAROUSEL (stable version)
   -------------------------------------- */
.shi-cf-carousel{
  position:relative;
  margin:40px auto 32px;
  max-width:1200px;
  padding:0 64px;
}

.shi-cf-carousel-viewport{
  overflow:hidden;
  height:420px;
  border-radius:24px;
  position:relative;
}

/* Track */
.shi-cf-carousel-track{
  display:flex;flex-wrap:nowrap;height:100%;
  transition:transform .45s ease;
}

/* Slide */
.shi-cf-carousel-slide{
  flex:0 0 100%;
  height:100%;
  position:relative;
}

.shi-cf-carousel-slide a{
  display:block;width:100%;height:100%;position:relative;
  text-decoration:none;color:inherit;
}

/* Image Wrapper */
.shi-cf-carousel-media{
  position:absolute;inset:0;overflow:hidden;
}

/* Diagonal clipped image */
.shi-cf-carousel-image{
  position:absolute;inset:0;
  background-size:cover;background-position:center;
  -webkit-clip-path:polygon(0 0, 100% 0, 45% 100%, 0% 100%);
  clip-path:polygon(0 0, 100% 0, 45% 100%, 0% 100%);
  filter:drop-shadow(10px 0 22px rgba(0,0,0,.35));
}

/* Purple card */
.shi-cf-carousel-content{
  position:absolute;
  right:6%; top:50%;
  transform:translateY(-50%);
  max-width:480px;
  background:linear-gradient(90deg,#4b0082 0%,#b11ca0 50%,#c4112f 100%);
  padding:24px 32px;border-radius: 0px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  color:#fff;overflow:hidden;
}

.shi-cf-carousel-title{
  margin:0 0 10px;font-weight:800;font-size:1.8rem;line-height:1.2;color:#fff;
}

.shi-cf-carousel-excerpt{
  margin:0 0 14px;font-size:1rem;line-height:1.4;opacity:.96;
}

/* Arrows */
.shi-cf-carousel-arrow{
  position:absolute;top:50%;
  transform:translateY(-50%);
  width:42px;height:42px;border-radius:999px;border:none;
  background:#fff;color:#333;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}

.shi-cf-carousel-arrow--prev{ left:16px; }
.shi-cf-carousel-arrow--next{ right:16px; }

/* Dots */
.shi-cf-carousel-dots{
  margin-top:18px;display:flex;justify-content:center;gap:8px;
}

.shi-cf-carousel-dot{
  width:8px;height:8px;border-radius:999px;
  background:#666 !important;
  border:none;cursor:pointer;
  transition:transform .15s ease;
}

.shi-cf-carousel-dot.is-active{
  transform:scale(1.6);
}

/* Responsive tweaks */
@media (max-width:1024px){
  .shi-cf-carousel-viewport{ height:360px; }
  .shi-cf-carousel-content{ max-width:420px;padding:20px 24px; }
  .shi-cf-carousel-title{ font-size:1.55rem; }
}

@media (max-width:768px){
  .shi-cf-carousel{ padding:0 24px; }
  .shi-cf-carousel-viewport{ height:320px; }
  .shi-cf-carousel-content{
    max-width:92%;right:4%;
    padding:16px 18px;border-radius:10px;
  }
  .shi-cf-carousel-title{ font-size:1.25rem; }
  .shi-cf-carousel-arrow{
    width:34px;height:34px;font-size:1.3rem;
  }
}
/* ======================================
   NAVIGATION – gradients, dropdowns, wrap effect
   ====================================== */

/* Home only gradient behind navbar */
body.home .navbar,
body.home .site-header,
body.home header.site-header{
  background:linear-gradient(90deg,#4b0082 0%,#b11ca0 35%,#c4112f 70%,#ff6600 100%);
  color:#fff;
}

/* Interior pages gradient */
body:not(.home) .navbar,
body:not(.home) .site-header,
body:not(.home) header.site-header{
  background: linear-gradient(90deg, #007b83 0%, #008ea7 45%, #005b94 100%);
  color:#fff;
}

/* Main nav links */
.navbar-nav > li > a,
.main-navigation a{
  color:#fff;
  font-weight:700;
  font-size:.95rem;
  letter-spacing:.01em;
  text-transform:none;
  transition:color .2s ease;
  padding:.75rem 1rem;
}

.navbar-nav > li > a:hover,
.main-navigation a:hover,
.navbar-nav > li.current-menu-item > a{
  color:#ffe27a;
}

/* Orange dropdown base */
.navbar .dropdown-menu,
.main-navigation .sub-menu{
  background:#ff6600;
  border:none;
  border-radius:6px;
  box-shadow:0 4px 18px rgba(0,0,0,.25);
  padding:.5rem 0;
  margin-top:.4rem;
  min-width:200px;
}

.navbar .dropdown-menu a,
.main-navigation .sub-menu a{
  color:#fff !important;
  font-weight:600;
  padding:.5rem 1rem;
  display:block;
  white-space:nowrap;
  text-decoration:none;
  transition:background .15s ease,color .15s ease;
}

.navbar .dropdown-menu a:hover,
.main-navigation .sub-menu a:hover{
  background:rgba(255,255,255,.15);
  color:#fff !important;
}

.navbar .dropdown-menu li + li a{
  border-top:1px solid rgba(255,255,255,.15);
}

/* Hover-open on desktop */
@media (hover:hover){
  .navbar .dropdown:hover > .dropdown-menu{
    display:block;
    visibility:visible;
    opacity:1;
  }
}

/* Branding/logo sizing */
.navbar-brand img{
  max-height:38px;
  width:auto;
}

/* Ensure all Conversions theme nav colors stay white */
#wrapper-navbar nav.navbar-light a.nav-link,
#wrapper-navbar nav div.navbar-light a.nav-link{
  color:#fff !important;
}

#wrapper-navbar nav.navbar-light a.nav-link:hover,
#wrapper-navbar nav div.navbar-light a.nav-link:hover{
  color:#ffe27a;
}

/* ---------- Hover “wrap” effect ---------- */
.navbar-nav > li.dropdown{
  position:relative;
  z-index:50;
}

/* Parent link becomes orange when hovering */
.navbar-nav > li.dropdown:hover > a,
.navbar-nav > li.dropdown:focus-within > a{
  background:#ff6600;
  color:#fff !important;
  border-radius:6px 6px 0 0;
  z-index:60;
}

/* Pull dropdown up so it visually merges with parent link */
.navbar .dropdown-menu{
  margin-top:-0.25rem;
  border-radius:0 0 6px 6px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  overflow:hidden;
  transition:all .15s ease;
}

/* Keep unified orange panel on hover */
.navbar-nav > li.dropdown:hover > .dropdown-menu{
  background:#ff6600;
  border-top-left-radius:0;
  border-top-right-radius:0;
}

/* Subtle inner highlight line on hovered parent */
.navbar-nav > li.dropdown:hover > a{
  box-shadow:0 2px 0 rgba(255,255,255,.2) inset;
}

/* Optional: caret arrow color */
.navbar-nav > li.menu-item-has-children > a::after{
  border-top-color:#fff;
}
.shi-cf-filter-row-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin: 0 0 1rem 0;
}
.shi-cf-filter-bar{ flex: 1 1 auto; }
.shi-cf-filter-toggle{ flex: 0 0 auto; margin-left:auto; }

/* =========================================
   SHI CF – HARD OVERRIDES (fix toggle placement + panel visibility)
   Add to very bottom of override CSS
   ========================================= */

/* Ensure normal document flow wins (undo any old absolute positioning) */
.shi-cf-filter-toggle{
  position: static !important;
  float: none !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 0 1rem auto !important; /* right-align within flex row */
  z-index: 20 !important;
}

/* If you previously used this selector, it will force the icon ABOVE the carousel.
   Neutralize it completely. */
.wpb_wrapper > .shi-cf-filter-toggle{
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
}

/* Make the filter row a stable anchor */
.shi-cf-filter-row{
  position: relative !important;
  z-index: 10 !important;
}

/* Chips + toggle on one line */
.shi-cf-filter-row-inner{
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

.shi-cf-filter-bar{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Panel positioning + reliable show/hide */
.shi-cf-filter-panel{
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  z-index: 9999 !important;
  display: block !important; /* base */
}

/* Respect the hidden attribute (JS flips this) */
.shi-cf-filter-panel[hidden]{
  display: none !important;
}

/* Sometimes a theme overlay blocks clicks; this keeps the toggle clickable */
.shi-cf-filter-toggle,
.shi-cf-filter-toggle *{
  pointer-events: auto !important;
}
/* Remove rounded corners on the featured carousel image */
.shi-cf-carousel-image{
  border-radius: 0 !important;
}

/* If the rounding is coming from the container clipping the image */
.shi-cf-carousel-media,
.shi-cf-carousel-hero,
.shi-cf-carousel-viewport{
  border-radius: 0 !important;

}
