/*
Theme Name: Music By Norman Child
Theme URI: [Your Site URL Here]
Description: Custom child theme for the Cultural Festival parent theme.
Author: [Your Name Here]
Template: cultural-festival
Version: 1.0.0
*/

/* ----------------------------------------------------------------------------------- */
/* 1. STICKY FOOTER FIXES (Keep these to fix layout) */
/* ----------------------------------------------------------------------------------- */

/* 1. Set HTML and BODY to minimum viewport height and establish the Flex context. */
html, body {
    height: 100%;
}

/* 2. Target the main site wrapper */
#page, .site, .site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Anchor to bottom of viewport */
}

/* 3. Make the entire content area grow to push the footer down. */
#primary, #content, .site-content, main {
    flex: 1 1 auto;
}

/* 4. Account for WP admin bar when logged in (desktop) */
.admin-bar #page,
.admin-bar .site,
.admin-bar .site-wrapper {
    min-height: calc(100vh - 32px); /* Subtract admin bar height */
}

/* 5. Cleanup for Mobile Admin Bar */
@media (max-width: 782px) {
    .admin-bar #page,
    .admin-bar .site,
    .admin-bar .site-wrapper {
        min-height: 100vh; /* Reset on mobile */
    }
}

/* ----------------------------------------------------------------------------------- */
/* 2. CUSTOM LAYOUT/SIDEBAR FIXES (Keep if this is still needed) */
/* ----------------------------------------------------------------------------------- */

.global-layout-no-sidebar #primary {
    width: 100%;
    min-height: 80vh;
}

/* ----------------------------------------------------------------------------------- */
/* 3. IMPORTANT: REMOVE CONFLICTING HEADER CSS */
/* ----------------------------------------------------------------------------------- */

/* All previous styles like .header-image-wrapper and .custom-header-wrapper 
   and complex video styles MUST BE REMOVED to prevent conflict with the 
   inline CSS injected by functions.php (using selectors like .cfc-header). */
   
   /* --- FIX: RESTORE SPACE ABOVE MAIN NAVIGATION --- */

/* 1. Target the site header wrapper. Use this if the menu is inside the header element. */
.site-header, #masthead {
    padding-top: 10px !important; /* Adds vertical space above the entire header section */
}

/* 2. Target the menu bar itself, in case the previous fix doesn't work. */
/* This targets the container holding your HOME, SHOP, FORUMS links. */
.main-navigation-holder, .main-navigation { 
    margin-top: 5px !important;
}

/* 3. FINAL RESCUE: If the main header bar itself is the issue, add margin to the menu list. */
/* This is a common final step */
.main-navigation ul {
    margin-top: 0; 
    padding-top: 0;
}



/* --- FIX: RESTORE SPACE ABOVE MAIN NAVIGATION --- */

/* 1. TARGET THE ABSOLUTE TOP OF THE PAGE */
/* The html element is the highest selector and should force space at the top. */
html {
    padding-top: 15px !important; /* Adjust '15px' for the desired gap */
    /* Ensure no vertical offset is applied */
    top: auto !important; 
}

/* 2. COMPENSATE FOR ADMIN BAR (if you are logged in) */
/* This is often the culprit. It pushes the body content down by the admin bar height. */
.admin-bar .site-header, .admin-bar #masthead {
    /* If the admin bar is present, the space needs to be added *below* the admin bar */
    padding-top: 5px !important; 
}

/* 3. TARGET THE MENU CONTAINER ITSELF (Highest priority check) */
/* This ensures the specific menu wrapper is not set to top:0; */
.site-header, #masthead, .main-navigation-holder {
    margin-top: 0 !important; /* Ensure no negative margin is pulling it up */
    position: relative !important; /* Ensure it respects the normal flow */
}


/* --- FIX: RESTORE SPACE ABOVE MAIN NAVIGATION --- */

/* This targets the <html> tag *when the Admin Bar is active* and adds padding */
/* This is often necessary because the Admin Bar applies a CSS 'top: 0;' rule 
   that overrides padding on the body/header. */
.admin-bar html {
    padding-top: 0 !important; /* Reset any bad padding */
}

/* This targets the main content body when the Admin Bar is active */
.admin-bar body {
    /* Set padding/margin to account for the Admin Bar and add extra space */
    padding-top: 0 !important; 
    margin-top: 32px !important; /* Standard Admin Bar height */
}

/* Now, push the header *below* the admin bar and restore your custom spacing */
.site-header, #masthead, .main-navigation-holder {
    /* Ensure the menu starts right where the Admin Bar ends */
    top: 0 !important; 
    
    /* Add your desired spacing ABOVE the menu bar */
    padding-top: 15px !important; 
    position: relative !important;
}

/* Final Fallback if the Admin Bar is NOT the issue */
html {
    padding-top: 15px !important; 
}


/* Grid */
.bbp-forums-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:22px;
  margin-top:18px;
}

/* Card */
.bbp-card{
  background:#fff;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .15s ease, box-shadow .15s ease;
  border:1px solid rgba(0,0,0,.06);
}
.bbp-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(0,0,0,.12);
}

/* Media */
.bbp-card-media{
  width:100%;
  height:140px;
  background-size:cover;
  background-position:center;
}

/* Body */
.bbp-card-body{ padding:18px; display:flex; flex-direction:column; gap:10px; }
.bbp-card-title{ font-size:1.05rem; margin:0; }
.bbp-card-title a{ text-decoration:none; }
.bbp-card-text{ margin:0; color:#444; line-height:1.45; }

/* Meta */
.bbp-card-meta{
  display:flex; flex-wrap:wrap; gap:12px; font-size:.9rem; color:#666;
}
.bbp-card-meta .bbp-card-freshness a{ text-decoration:none; }

/* Actions */
.bbp-card-actions{ margin-top:auto; display:flex; gap:10px; }
.bbp-btn{
  display:inline-block; padding:10px 14px; border-radius:10px;
  text-decoration:none; border:1px solid transparent;
}
.bbp-btn-primary{ background:#ff007f; color:#fff; }
.bbp-btn-primary:hover{ filter:brightness(.95); }
.bbp-btn-ghost{ background:transparent; border-color:#ff007f; color:#ff007f; }
.bbp-btn-ghost:hover{ background:rgba(255,0,127,.06); }
