/* =============================================================================
   BOISE STATE CANVAS CATALOG CUSTOMIZATION - FRESH CSS
   Clean implementation with banner under header and custom tiles
   ============================================================================= */

/* =============================================================================
   BANNER STYLES (Under Header) - FIXED Z-INDEX ISSUES
   ============================================================================= */
/* ===== Banner under header (fixed height, no responsiveness) ===== */
.feature-region {
  /* kill any previously-set gradients in the theme */
  background: none !important;

  /* your banner image, repeat horizontally, fixed 90px tall */
  background-image: url("https://imagizer.imageshack.com/v2/727x56q70/923/jM1XIS.png") !important;
  background-repeat: no-repeat !important;
  background-position: center top !important; /* center horizontally, top aligned */
  background-size: auto 90px !important;      /* keep image height, no vertical stretch */

  height: 90px !important;    /* fixed strip height that matches the image */
  min-height: 90px !important;/* neutralize any theme min-height (e.g., 15px) */
  line-height: 0 !important;  /* avoid extra vertical space from line boxes */
}

#search-form.callout-region {
background-color : #0033a0 !important;
}

#bsu-custom-banner {
    position: relative !important;
    width: 100% !important;
    height: 80px !important;
    background-color: #d64309 !important;
    overflow: hidden !important;
    z-index: 10 !important; /* REDUCED from 999 to avoid menu conflicts */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.bsu-banner-container {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.bsu-banner-image {
    height: 90px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Banner responsive adjustments */
@media (max-width: 728px) {
    #bsu-custom-banner {
        height: 90px !important;
    }
    
    .bsu-banner-image {
        height: 70px !important;
    }
}

@media (max-width: 480px) {
    #bsu-custom-banner {
        height: 60px !important;
    }
    
    .bsu-banner-image {
        height: 60px !important;
    }
}

/* =============================================================================
   CUSTOM TILES SECTION
   ============================================================================= */

#bsu-custom-tiles {
    background-color: #f8f9fa !important;
    padding: 60px 0 !important;
    margin: 0 !important;
    width: 100% !important;
    clear: both !important;
    position: relative !important;
    z-index: 1 !important; /* ADDED: Lower z-index for tiles */
}
#home-page #bsu-custom-tiles {
display:block !important;
}
#bsu-custom-tiles {
display:none;
}

.bsu-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

.bsu-tiles-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Individual Tile Styles */
.bsu-tile {
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    height: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important; /* ADDED: Ensure tiles don't interfere with menus */
}

.bsu-tile:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 3 !important; /* ADDED: Slightly higher on hover but still below menus */
}

.bsu-tile-link {
    display: block !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bsu-tile-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* Tile Image */
.bsu-tile-image {
    height: 200px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bsu-tile-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(8, 153, 211, 0.7) 0%, rgba(8, 153, 211, 0.3) 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.bsu-tile:hover .bsu-tile-overlay {
    opacity: 1 !important;
}

.bsu-tile-icon {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0899D3 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: bold !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
}

.bsu-tile:hover .bsu-tile-icon {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* Tile Content */
.bsu-tile-content {
    height: 100px !important;
    padding: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0033a0 !important;
    margin: 0 !important;
}

.bsu-tile-title {
    font-size: 2em !important;
    font-weight: 600 !important;
    color: #f6f7f9 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    transition: color 0.3s ease !important;
}

.bsu-tile:hover .bsu-tile-title {
    color: #F6F7F9 !important;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 992px) {
    .bsu-tiles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 25px !important;
    }
    
    .bsu-tile {
        height: 280px !important;
    }
    
    .bsu-tile-image {
        height: 180px !important;
    }
}

@media (max-width: 768px) {
    #bsu-custom-tiles {
        padding: 40px 0 !important;
    }
    
    .bsu-container {
        padding: 0 15px !important;
    }
    
    .bsu-tiles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 20px !important;
    }
    
    .bsu-tile {
        height: 260px !important;
    }
    
    .bsu-tile-image {
        height: 160px !important;
    }
    
    .bsu-tile-content {
        height: 100px !important;
        padding: 15px !important;
    }
    
    .bsu-tile-title {
        font-size: 1.1em !important;
    }
}

@media (max-width: 480px) {
    .bsu-tiles-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .bsu-tile {
        height: 240px !important;
    }
    
    .bsu-tile-image {
        height: 140px !important;
    }
    
    .bsu-tile-content {
        height: 100px !important;
        padding: 15px 10px !important;
    }
    
    .bsu-tile-title {
        font-size: 1em !important;
    }
    
    .bsu-tile-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
        top: 10px !important;
        right: 10px !important;
    }
}

/* =============================================================================
   ACCESSIBILITY & FOCUS STATES
   ============================================================================= */

.bsu-tile-link:focus {
    outline: 3px solid #0899D3 !important;
    outline-offset: 2px !important;
}

.bsu-tile-link:focus .bsu-tile-title {
    color: #067ba3 !important;
}

/* =============================================================================
   CANVAS INTEGRATION - FIXED MENU CONFLICTS
   ============================================================================= */

/* Ensure Canvas header and admin menus stay above custom elements */
#app-header {
    position: relative !important;
    z-index: 1000 !important; /* HIGH z-index for header */
}

/* ADDED: Ensure Canvas admin menus appear above custom content */
.canvas-admin-menu,
[class*="menu"],
[class*="dropdown"],
.ui-menu,
.ui-widget-overlay,
.ui-front {
    z-index: 9999 !important; /* VERY HIGH z-index for all menu elements */
}

/* ADDED: Specific targeting for Canvas admin interface elements */
.ic-app-header__menu-list,
.ic-app-header__menu-list-item,
.ic-app-header__menu-list-link {
    z-index: 9999 !important;
}

/* Ensure proper spacing with Canvas elements */
#bsu-custom-banner + * {
    margin-top: 0 !important;
}

#bsu-custom-tiles + * {
    margin-top: 0 !important;
}

/* Override any conflicting Canvas styles */
#bsu-custom-banner *,
#bsu-custom-tiles * {
    box-sizing: border-box !important;
}

/* Clear any floats that might interfere */
#bsu-custom-banner::after,
#bsu-custom-tiles::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* =============================================================================
   ADDITIONAL MENU FIX - CATCH-ALL FOR CANVAS MENUS
   ============================================================================= */

/* ADDED: Broad selector to catch any Canvas menu elements */
[role="menu"],
[role="menubar"],
[role="menuitem"],
.menu,
.dropdown-menu,
.popover,
.tooltip {
    z-index: 9999 !important;
    position: relative !important;
}

/* ADDED: Ensure no custom elements interfere with Canvas UI */
body.canvas-admin #bsu-custom-banner,
body.canvas-admin #bsu-custom-tiles {
    z-index: 1 !important;
}
