/*
Theme Name: Indivisible Quebec
Theme URI: https://indivisible.quebec/
Author: ChatGPT
Description: Custom theme for Indivisible Québec (IQ) with hero layout, events, news, and bilingual-ready navigation.
Version: 2.4.1
License: GNU General Public License v2 or later
Text Domain: indivisible-quebec
Tags: custom, responsive, two-columns, blog
*/

/* =========================================================
   STICKY FOOTER (works with your actual DOM structure)
   Goal:
   - Short pages: footer sits at bottom of screen (no white gap)
   - Long pages: page scrolls normally, footer after content
   ========================================================= */

/* 1) Reliable viewport height + remove default gaps */
html, body{
  height: 100%;
}
body{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 2) Make the real content area stretch.
      In your pages, <main> is a direct child of <body>. */
body > main{
  flex: 1 0 auto;
  min-height: 0; /* important for flex overflow math */
}

/* 3) Footer sits after main, and on short pages gets pushed down */
body > footer.iq-site-footer,
footer.iq-site-footer{
  margin-top: auto;
  flex: 0 0 auto;
}

/* 4) Your members-login template includes inline min-height calc(...) which fights this.
      We override it safely. */
main.iq-members-login{
  min-height: auto !important;
}

/* Safety net: any <main> with inline calc(100vh...) */
main[style*="min-height:calc(100vh"]{
  min-height: auto !important;
}

/* =========================================================
   HERO (Oklahoma-style)
   ========================================================= */

.iq-hero {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.iq-hero .iq-container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.iq-hero-grid {
  position: relative;
  display: block; /* stack so we can overlay text on the slider */
}

.iq-hero-right {
  position: relative;
}

.iq-hero-inner {
  border-radius: 0 !important;
  overflow: hidden;
  min-height: 520px; /* default fallback */
}

.iq-hero-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2;
  pointer-events: none;
}

.iq-hero-left {
  position: absolute;
  z-index: 5;
  left: clamp(20px, 5vw, 70px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 560px;
  padding: 0;
  color: #fff;
}

.iq-hero-title {
  margin: 0 0 12px 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(34px, 4vw, 60px);
  color: #fff;
}

.iq-hero-subtitle {
  margin: 0 0 18px 0;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.45;
  opacity: 0.95;
  color: #fff;
}

.iq-hero-cta {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  background: #d4544a; /* matches your donate button vibe */
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.iq-hero-cta:hover {
  filter: brightness(1.05);
}

@media (max-width: 900px) {
  .iq-hero-inner { min-height: 440px; }
  .iq-hero-left { max-width: 90%; }
}

/* =========================================================
   Smart Slider arrows (VISIBLE, no red debug blocks)
   ========================================================= */

.iq-hero-right,
.iq-hero-inner,
.iq-hero-right * {
  overflow: visible !important;
}

.n2-ss-slider,
.n2-ss-slide {
  overflow: visible !important;
}

.n2-ss-arrow {
  z-index: 9999 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body .iq-hero .n2-ss-slider .n2-ss-slider-wrapper-inside .n2-ss-slider-controls{
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
  pointer-events: auto !important;
}

body .iq-hero .n2-ss-arrow{
  z-index: 9999 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* =========================================================
   Members header button
   ========================================================= */

.iq-btn-members {
  background-color: #0B141C;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.25);
}

.iq-btn-members:hover {
  background-color: #0f1f2a;
  color: #ffffff;
}

header .iq-lang a.iq-btn-members{
  background:#0B141C !important;
  color:#ffffff !important;
  padding:10px 14px !important;
  border-radius:10px !important;
  font-weight:700 !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  line-height:1 !important;
  border:1px solid rgba(255,255,255,0.25) !important;
}

header .iq-lang a.iq-btn-members:hover{
  background:#0f1f2a !important;
  color:#ffffff !important;
}

.iq-lang a.iq-btn-members{
  background:#0B141C !important;
  color:#fff !important;
  padding:10px 14px !important;
  border-radius:10px !important;
  font-weight:700 !important;
  text-decoration:none !important;
  display:inline-flex !important;
  align-items:center !important;
  line-height:1 !important;
  border:1px solid rgba(255,255,255,0.25) !important;
}
.iq-lang a.iq-btn-members:hover{
  background:#0f1f2a !important;
  color:#fff !important;
}

/* =========================================================
   Footer social icons + spacing trims (your current look)
   ========================================================= */

.iq-footer-actions{
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:6px;
  flex-wrap:wrap;
}

.iq-footer-social{
  display:flex;
  align-items:center;
  gap:10px;
}

.iq-site-footer a.iq-social-icon{
  width:34px !important;
  height:34px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  color:#fff !important;
  text-decoration:none !important;
  line-height:1 !important;
  padding:0 !important;
}

.iq-site-footer a.iq-social-icon svg{
  width:18px !important;
  height:18px !important;
  fill:#fff !important;
  display:block !important;
}

/* Footer spacing (shaved version) */
.iq-site-footer{
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.iq-site-footer .iq-footer-grid{
  gap: 14px !important;
  row-gap: 12px !important;
}

.iq-site-footer .iq-footer-actions{
  margin-top: 6px !important;
}

.iq-site-footer .iq-container{
  padding-top: 7px !important;
  padding-bottom: 6px !important;
}

.iq-site-footer .iq-signup{
  margin-top: 4px !important;
}

/* =========================================================
   DROPDOWN MENU FIX (IQ header menu)
   ========================================================= */

/* Make sure nothing clips the dropdown */
.iq-nav-wrap,
.iq-nav-wrap *{
  overflow: visible !important;
}

/* Ensure parent item can anchor the dropdown */
ul.iq-nav li.menu-item-has-children{
  position: relative;
}

/* Base dropdown positioning (no animation, no gaps) */
ul.iq-nav li.menu-item-has-children > ul.sub-menu{
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;

  z-index: 99999 !important;

  /* Kill fade/slide timing bugs */
  transition: none !important;
  transform: none !important;

  pointer-events: auto !important;
}

/* FORCE open (supports hoverIntent class + hover + keyboard) */
ul.iq-nav li.menu-item-has-children:hover > ul.sub-menu,
ul.iq-nav li.menu-item-has-children.sfHover > ul.sub-menu,
ul.iq-nav li.menu-item-has-children:focus-within > ul.sub-menu{
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Invisible hover “bridge” under the parent (prevents flicker) */
ul.iq-nav li.menu-item-has-children::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-16px;
  height:16px;
}

/* =========================================================
   HOME PAGE: remove the two red “gaps” WITHOUT breaking Smart Slider
   - NO boxed image
   - Keep full-width slider + arrows + overlay text
   - Fit hero between header and footer
   ========================================================= */

/* These are ONLY used for the home page height math */
:root{
  --iq-header-h: 64px;  /* good header */
  --iq-footer-h: 150px; /* good footer */
}

/* Mobile */
@media (max-width: 900px){
  :root{
    --iq-header-h: 92px;
    --iq-footer-h: 210px;
  }
}

/* 1) Kill any default top/bottom spacing around the hero on HOME only */
body.home main,
body.home body > main{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}

/* 2) Kill any “first element margin” pushing down the hero */
body.home main > *:first-child{
  margin-top: 0 !important;
}

/* 3) Make the hero take exactly the available space between header and footer */
body.home .iq-hero{
  margin: 0 !important;
  padding: 0 !important;
}

/* If your home template wraps the hero in a section/container, keep it flush */
body.home .iq-hero .iq-container{
  margin: 0 !important;
}

/* The element that actually contains the slider (your working one) */
body.home .iq-hero-inner{
  height: calc(100vh - var(--iq-header-h) - var(--iq-footer-h)) !important;
  min-height: 420px !important;
}

/* Make Smart Slider fill the hero-inner height */
body.home .iq-hero-inner .n2-ss-slider,
body.home .iq-hero-inner .n2-ss-slider-wrapper,
body.home .iq-hero-inner .n2-ss-slider-wrapper-inside{
  height: 100% !important;
}

/* 4) Remove the “gap above footer” by ensuring whatever comes after hero has no extra spacing */
body.home .iq-site-footer{
  margin-top: 0 !important;
}

/* Optional safety: if your home template has a white strip, this removes it */
body.home .iq-hero + *{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* === FIX: prevent homepage content from sitting under the hero/slider === */
.iq-hero {
  display: block;
  clear: both;
  margin-bottom: 40px; /* space between hero and page content */
}

.iq-hero-right,
.iq-hero-inner,
.iq-hero-grid {
  position: relative;
}

.iq-hero-inner {
  display: block;
}

/* Smart Slider sometimes uses absolute positioning internally;
   this makes sure the hero still “owns” the height on the page. */
.iq-hero-right {
  min-height: 520px; /* match your intended hero height */
}

.iq-home-content {
  position: relative;
  z-index: 1;
  clear: both;
  padding-top: 10px;
}

