/*
 Theme Name:   Astra MFSA Child Clean
 Description:  Astra Child Theme for MFSA
 Version:      4.3.0 (Hero Banner Aspect Ratio Fix)
 Author:       Syed Kazmi
 Template:     astra
 Version:      1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================================
   1. GLOBAL VARIABLES
   ========================================================= */
:root {
  /* Brand Colors */
  --mfsa-brand-teal: #187A71; 
  --mfsa-border:     #e5e7eb;
  --mfsa-cat-text: #ffffff;
  
  /* INDUSTRY COLORS */
  --securities:             #514689; /* Purple */
  --real-estate:            #C04427; /* Terracotta */
  --firb:                   #669944; /* Green */
  --financial-institutions: #669944; /* Green */
  
  /* ALERTS & REPORTS */
  --scam-alert:             #D32F2F; /* Red */
  --reports:                #C04427; /* Terracotta/Orange */
  --news-release:           #00685e; /* Teal */
  --report_annualreports:   #808d8d; /* Teal */
  
  /* FALLBACK */
  --default-pill:           #187A71; 
}

body, h1, h2, h3, .mfsa-switcher-template, .mfsa-filter-btn {
    font-family: 'Poppins', sans-serif !important;
}

html, body { max-width: 100%; overflow-x: hidden; }

/* =========================================================
   2. GLOBAL LAYOUT
   ========================================================= */
#content .ast-container {
    max-width: 1240px; margin: 0 auto; padding: 20px 20px !important; width: 100%; box-sizing: border-box;
}
#main { margin-bottom: 90px; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 30px 0; }
.entry-content th { background-color: var(--mfsa-brand-teal) !important; color: #ffffff !important; font-weight: 600; text-align: left; padding: 15px; font-size: 14px; text-transform: uppercase;}
.entry-content tr:nth-child(even) { background-color: #f2f7f6 !important; }
.entry-content td { padding: 12px 15px; border: 1px solid var(--mfsa-border); }

/* =========================================================
   3. HEADER & NAVIGATION
   ========================================================= */
.ast-primary-header-bar, .site-primary-header-wrap, #ast-desktop-header, #ast-mobile-header, .ast-header-break-point .site-header {
    background-color: #ffffff !important; z-index: 999999 !important; position: relative !important;
}

.site-header .ast-container, 
.ast-main-header-bar-alignment {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important; 
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* HOMEPAGE vs INNER PAGES */
body.home .site-header .ast-container, 
body.home .ast-main-header-bar-alignment {
    max-width: 100% !important; padding-left: 50px !important; padding-right: 50px !important; margin: 0 !important;
}

body:not(.home) .site-header .ast-container, 
body:not(.home) .ast-main-header-bar-alignment {
    max-width: 1240px !important; margin: 0 auto !important; padding-left: 20px !important; padding-right: 20px !important;
}

.ast-builder-grid-row {
    width: 100% !important; display: flex !important; justify-content: space-between !important; align-items: center !important;
}

.site-header-section-left { margin-right: auto !important; margin-left: 0 !important; }
.site-header-section-right { margin-left: auto !important; margin-right: 0 !important; }

#ast-hf-menu-1 .menu-item > a:before, #ast-hf-menu-1 .menu-item > a:after { display: none !important; content: none !important; }
.ast-header-navigation-arrow svg, .dropdown-menu-toggle svg { fill: currentColor !important; width: 0.6em !important; }

/* 2-LINE LOGO */
.site-branding { display: flex !important; align-items: center !important; text-align: left !important; padding: 12px 0; }
.site-branding .site-title a {
    font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 20px !important; 
    line-height: 1.1 !important; color: #00685e !important; text-decoration: none !important; text-transform: none !important;
    display: inline-block !important; max-width: 210px !important; white-space: normal !important; vertical-align: middle !important; margin-left: 15px; 
}

/* DESKTOP MENU */
@media (min-width: 922px) {
    #ast-desktop-header { display: block !important; } 
    #ast-mobile-header { display: none !important; }
    
    #ast-hf-menu-1 .menu-item > a { color: #00685e !important; font-weight: 700 !important; padding: 0 18px !important; text-decoration: none !important; font-size: 18px !important; }
    #ast-hf-menu-1 .menu-item:hover > a, #ast-hf-menu-1 .current-menu-item > a { color: #004d44 !important; }
    
    .ast-builder-menu-1 .main-header-menu > .menu-item > .sub-menu { left: auto !important; right: 0 !important; margin-top: 0 !important; top: 100% !important; padding: 0 !important; z-index: 999999 !important; position: absolute !important; }
    .ast-builder-menu-1 .main-header-menu .sub-menu .menu-item .sub-menu { left: 100% !important; right: auto !important; top: 0 !important; }
    .ast-builder-menu-1 .main-header-menu > .menu-item:nth-last-child(-n+3) .sub-menu .menu-item > .sub-menu { left: auto !important; right: 100% !important; }
    
    #ast-hf-menu-1 .sub-menu { background-color: #ffffff !important; border-top: 4px solid #00685e !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; min-width: 250px !important; padding: 10px 0 !important; }
    #ast-hf-menu-1 .sub-menu .menu-item a { padding: 14px 25px !important; text-align: left !important; color: #333 !important; font-weight: 500 !important; font-size: 16px !important; border-bottom: 1px solid #f4f4f4; display: flex !important; justify-content: space-between !important; align-items: center !important; }
    #ast-hf-menu-1 .sub-menu .menu-item:hover { background-color: #f9fafb !important; }
    #ast-hf-menu-1 .sub-menu .menu-item:hover > a { color: #00685e !important; padding-left: 30px !important; }
}

/* MOBILE MENU */
@media (max-width: 921px) {
    #ast-desktop-header { display: none !important; } 
    #ast-mobile-header { display: block !important; visibility: visible !important; }
    
    .site-branding .site-title a { position: relative !important; display: block !important; width: 60px !important; overflow: hidden !important; text-indent: -9999px !important; white-space: nowrap !important; max-width: none !important; margin-left: 0 !important; }
    .site-branding .site-title a:after { content: "MFSA"; position: absolute !important; left: 0 !important; top: 0 !important; text-indent: 0 !important; font-size: 20px !important; font-weight: 700 !important; color: #00685e !important; visibility: visible !important; display: block !important; }
    
    .ast-mobile-menu-trigger-minimal, .ast-button-wrap .menu-toggle { display: flex !important; visibility: visible !important; color: #00685e !important; background: transparent !important; border: none !important; }
    .ast-builder-menu-mobile .main-navigation .main-header-menu .sub-menu { display: none; background-color: #f9fbfc !important; border-top: 2px solid #00685e !important; padding: 10px 0 !important; }
    .ast-builder-menu-mobile .main-navigation .menu-item.ast-menu-toggle-active > .sub-menu { display: block !important; }
    .ast-builder-menu-mobile .main-navigation .menu-item a { color: #003366 !important; font-weight: 600 !important; padding: 15px 20px !important; }
    body.home .site-header .ast-container { padding-left: 20px !important; padding-right: 20px !important; }
}

/* =========================================================
   4. HYDRO-STYLE BANNER
   ========================================================= */
.mfsa-general-banner { position: relative; background-color: var(--mfsa-brand-teal); color: #ffffff; overflow: hidden; margin-bottom: 40px; }
.mfsa-general-banner .mfsa-banner-inner { display: flex; max-width: 1240px !important; margin: 0 auto !important; padding: 0; min-height: 250px; box-sizing: border-box !important; }
.mfsa-general-banner .mfsa-banner-content { flex: 1; padding: 60px 40px 60px 20px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.mfsa-general-banner .breadcrumbs, .mfsa-general-banner .breadcrumbs a, .mfsa-general-banner .breadcrumbs span { color: rgba(255,255,255,0.95) !important; font-size: 16px !important; font-weight: 500 !important; text-decoration: none; text-transform: capitalize; letter-spacing: 0.5px; }
.mfsa-general-banner .mfsa-banner-crumbs { margin-bottom: 25px; }
.mfsa-general-banner .mfsa-banner-title { color: #ffffff; font-size: 48px; font-weight: 800; line-height: 1.1; margin: 0 0 20px 0; }
.mfsa-general-banner .mfsa-banner-desc { color: rgba(255,255,255,0.95); font-size: 18px; line-height: 1.6; max-width: 650px; }
.mfsa-general-banner .mfsa-banner-visual { flex: 0 0 45%; position: relative; display: none; }
.mfsa-general-banner.has-image .mfsa-banner-visual { display: block; }
.mfsa-general-banner .mfsa-banner-img-bg { width: 100%; height: 100%; background-size: cover; background-position: center; }
.mfsa-general-banner .mfsa-banner-curve { position: absolute; top: 0; bottom: 0; left: -1px; width: 100px; height: 100%; z-index: 3; }
.mfsa-general-banner .mfsa-banner-curve svg { height: 100%; width: 100%; display: block; }

@media (max-width: 921px) {
    .mfsa-general-banner .mfsa-banner-inner { flex-direction: column; }
    .mfsa-general-banner .mfsa-banner-visual { height: 200px; width: 100%; flex: none; }
    .mfsa-general-banner .mfsa-banner-curve { display: none; }
    .mfsa-general-banner .mfsa-banner-title { font-size: 32px; }
}

/* =========================================================
   5. INDUSTRY BUTTONS
   ========================================================= */
.mfsa-nav-container { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px 0; margin-bottom: 40px; }
.mfsa-filter-btn { padding: 12px 26px; border-radius: 5px; border: 1px solid var(--mfsa-brand-teal); color: var(--mfsa-brand-teal); background: #ffffff; font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; display: inline-block; }
.mfsa-filter-btn:hover, .mfsa-filter-btn.active, .mfsa-filter-btn.is-active { background-color: var(--mfsa-brand-teal); color: #ffffff !important; }

/* Industry Overrides (Using Global Variables) */
.theme-securities .mfsa-filter-btn { color: var(--securities) !important; border-color: var(--securities) !important; }
.theme-securities .mfsa-filter-btn:hover, .theme-securities .mfsa-filter-btn.active { background-color: var(--securities) !important; color: #ffffff !important; }

.theme-real-estate .mfsa-filter-btn { color: var(--real-estate) !important; border-color: var(--real-estate) !important; }
.theme-real-estate .mfsa-filter-btn:hover, .theme-real-estate .mfsa-filter-btn.active { background-color: var(--real-estate) !important; color: #ffffff !important; }

.theme-firb .mfsa-filter-btn { color: var(--firb) !important; border-color: var(--firb) !important; }
.theme-firb .mfsa-filter-btn:hover, .theme-firb .mfsa-filter-btn.active { background-color: var(--firb) !important; color: #ffffff !important; }

/* =========================================================
   6. SIDEBAR & ACCORDION
   ========================================================= */
.mfsa-sidebar-item { display: block; padding: 12px 15px; text-decoration: none; color: #333; font-size: 16px; border-left: 4px solid transparent; transition: all 0.2s ease; }
.mfsa-sidebar-item:hover { color: #000; text-decoration: underline; }
.mfsa-sidebar-item.is-current { background-color: transparent !important; border: none !important; padding-left: 15px !important; font-weight: 700 !important; }

.mfsa-switcher-template .wp-block-accordion { border: none !important; gap: 25px; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.mfsa-switcher-template .wp-block-accordion-item { background-color: #ffffff; border: 1px solid #e5e7eb; border-left-width: 6px !important; border-left-style: solid !important; border-left-color: var(--mfsa-brand-teal) !important; border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.04); margin-bottom: 20px !important; width: 100% !important; box-sizing: border-box !important; display: block !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle { background: transparent !important; padding: 25px 30px !important; width: 100% !important; box-sizing: border-box !important; cursor: pointer; text-decoration: none !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle-title { font-size: 20px !important; font-weight: 700 !important; color: #1e293b !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle-icon { order: 2 !important; font-size: 24px !important; font-weight: 400; flex-shrink: 0; color: var(--mfsa-brand-teal) !important; }
.mfsa-switcher-template .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon { transform: rotate(45deg) !important; }
.mfsa-switcher-template .wp-block-accordion-panel { padding: 20px 30px 30px 30px !important; border-top: 1px solid #f1f5f9; color: #555; font-size: 16px; width: 100% !important; box-sizing: border-box !important; }
.mfsa-switcher-template .wp-block-accordion-panel a { font-weight: 500; text-decoration: underline; color: var(--mfsa-brand-teal); }

.theme-securities .wp-block-accordion-item { border-left-color: var(--securities) !important; }
.theme-securities .wp-block-accordion-heading__toggle-icon { color: var(--securities) !important; }
.theme-securities .wp-block-accordion-panel a { color: var(--securities); }

.theme-real-estate .wp-block-accordion-item { border-left-color: var(--real-estate) !important; }
.theme-real-estate .wp-block-accordion-heading__toggle-icon { color: var(--real-estate) !important; }
.theme-real-estate .wp-block-accordion-panel a { color: var(--real-estate); }

.theme-firb .wp-block-accordion-item { border-left-color: var(--firb) !important; }
.theme-firb .wp-block-accordion-heading__toggle-icon { color: var(--firb) !important; }
.theme-firb .wp-block-accordion-panel a { color: var(--firb); }

/* =========================================================
   7. LAYOUT & RESPONSIVE
   ========================================================= */
.mfsa-switcher-container { display: flex; gap: 60px; margin-top: 20px; }
.mfsa-sidebar-col { flex: 0 0 260px; background: #f8f9fa; border-radius: 8px; border: 1px solid #eee; height: fit-content; padding: 25px; }
.mfsa-content-col { flex: 1; min-width: 0; }
.mfsa-switcher-template .mfsa-content-col .entry-content > * { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box !important; }

@media (max-width: 921px) {
    .mfsa-switcher-container { flex-direction: column; gap: 30px; }
    .mfsa-sidebar-col { flex: 0 0 100%; width: 100%; border-right: none; }
    .mfsa-nav-container { justify-content: center; }
}

.mfsa-parent-title { margin: 0 0 20px; font-size: 2em; color: #222; font-weight: 700; }
.mfsa-child-title { margin: 0 0 35px; font-size: 1.5em; color: #1e293b; font-weight: 700; }

/* =========================================================
   8. MEDIA CENTER
   ========================================================= */
.mfsa-mc-wrapper { width: 100% !important; max-width: 1200px; margin: 0 auto; font-family: 'Poppins', sans-serif; padding: 20px 0; }
.mfsa-mc-filters { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; align-items: center; }
.mfsa-select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; background: #fff; min-width: 200px; font-size: 15px; color: #333; }
.mfsa-mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; width: 100%; }
.mfsa-mc-card { background: #fff; border: 1px solid #e1e4e8; border-radius: 8px; padding: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); display: flex; flex-direction: column; text-decoration: none; }
.mfsa-mc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.08); }
.mfsa-mc-date { font-size: 13px; color: #64748b; margin-bottom: 10px; display: block; font-weight: 500; }
.mfsa-mc-title { font-size: 18px; font-weight: 700; color: #00685e; text-decoration: none; line-height: 1.4; margin-bottom: 12px; display: block; }
.mfsa-mc-excerpt { font-size: 15px; color: #475569; line-height: 1.6; }

/* =========================================================
   9. HEARINGS TABLES
   ========================================================= */
.mfsa-hearings-all { margin: 18px 0 40px; }
.mfsa-hearings-tabs { display:flex; align-items:center; gap:12px; font-size: 18px; font-weight: 600; margin: 6px 0 18px; }
.mfsa-hearings-tab { background: transparent; border: 0; padding: 0; cursor: pointer; color: #00685e; font: inherit; text-decoration: none; }
.mfsa-hearings-tab.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.mfsa-hearings-sep { color:#94a3b8; }
.mfsa-hearings-pane { display:none; }
.mfsa-hearings-pane.is-active { display:block; }
.mfsa-hearings-table-wrap { overflow-x:auto; border:1px solid #e2e8f0; border-radius: 8px; background:#fff; }
.mfsa-hearings-table { width:100%; border-collapse: collapse; min-width: 760px; }
.mfsa-hearings-table thead th { background: #0b6b5f; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; padding: 16px 16px; text-align: left; cursor: pointer; }
.mfsa-hearings-table tbody td { padding: 18px 16px; border-top: 1px solid #eef2f7; vertical-align: top; font-size: 16px; color: #0f172a; }
.mfsa-matter-link { color:#00685e; text-decoration: underline; text-underline-offset: 3px; }
.mfsa-acts-ul { margin:0; padding-left: 18px; }

/* =========================================================
   10. UNIFIED SEARCH & ARCHIVE GRID Styling
   ========================================================= */
/* =========================================================
   10. UNIFIED SEARCH & ARCHIVE GRID Styling (Media Center Match)
   ========================================================= */

/* 1. GRID LAYOUT (Search + Archive) */
body.search .ast-row, 
body.archive .ast-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; 
    gap: 30px !important;
    margin: 40px 0 60px 0 !important;
    flex-wrap: wrap !important; 
    justify-content: center !important;
}

/* 2. FIX COLUMNS */
body.search .ast-row > *, 
body.archive .ast-row > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. CARD DESIGN */
body.search article,
body.archive article {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px; /* Matched to Media Center */
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%; 
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

body.search article:hover,
body.archive article:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    border-color: var(--mfsa-brand-teal);
}

/* 4. REORDER ELEMENTS (Pills -> Date -> Title) */
body.search article .entry-header, 
body.archive article .entry-header {
    display: flex !important;
    flex-direction: column !important;
}
body.search article .ast-taxonomy-container, 
body.archive article .ast-taxonomy-container {
    order: 1 !important;
    margin-bottom: 12px !important;
}
body.search article .entry-meta, 
body.archive article .entry-meta {
    order: 2 !important;
    margin-bottom: 8px !important;
}
body.search article .entry-title, 
body.archive article .entry-title {
    order: 3 !important;
    margin-bottom: 10px !important;
}

/* 5. SMART COLORED PILLS & COMMA REMOVAL */
/* Hide the commas between terms output by Astra */
body.search .ast-blog-single-element.ast-taxonomy-container,
body.archive .ast-blog-single-element.ast-taxonomy-container {
    color: transparent !important; 
    font-size: 0 !important; 
    display: block !important;
}

/* Base Pill Style */
body.search .ast-taxonomy-container a,
body.archive .ast-taxonomy-container a {
    display: inline-block !important; 
    padding: 4px 8px !important;      
    line-height: 1.2 !important;      
    font-size: 11px !important;                  
    font-weight: 700 !important;                 
    border-radius: 4px !important;    
    text-transform: uppercase !important;
    text-decoration: none !important; 
    text-align: center !important;
    box-sizing: border-box !important;
    margin: 0 6px 0 0 !important;
    height: auto !important;          
    transition: opacity 0.2s ease !important;
    background-color: var(--pill-color, #00685e) !important;
    color: #ffffff !important;
    border: none !important;
    vertical-align: top !important;
    letter-spacing: 0 !important;
}

body.search .ast-taxonomy-container a:hover,
body.archive .ast-taxonomy-container a:hover {
    opacity: 0.85 !important;
}

/* Mappings for Pill Colors */
article { --pill-color: var(--default-pill); }
article.category-securities, article.type-securities, article.securities { --pill-color: var(--securities); }
article.category-real-estate, article.type-real-estate, article.real-estate { --pill-color: var(--real-estate); }
article.category-firb, article.type-firb, article.firb { --pill-color: var(--firb); }
article.category-financial-institutions, article.financial-institutions { --pill-color: var(--financial-institutions); }
article.category-scam-alert, article.scam-alert, article.category-alerts { --pill-color: var(--scam-alert); }
article.category-reports, article.reports { --pill-color: var(--reports); }
article.category-news, article.news-release { --pill-color: var(--news-release); }

/* Dynamic CSS replacement for S/F/R Boxes */
body.search .ast-taxonomy-container a[href*="/securities/"],
body.archive .ast-taxonomy-container a[href*="/securities/"],
body.search .ast-taxonomy-container a[href*="/financial-institutions/"],
body.archive .ast-taxonomy-container a[href*="/financial-institutions/"],
body.search .ast-taxonomy-container a[href*="/real-estate/"],
body.archive .ast-taxonomy-container a[href*="/real-estate/"] {
    width: 24px !important;           
    padding: 4px 0 !important; 
    font-size: 0 !important; /* hide original text */
    color: transparent !important;
}

body.search .ast-taxonomy-container a[href*="/securities/"]::after,
body.archive .ast-taxonomy-container a[href*="/securities/"]::after {
    content: "S"; font-size: 13px !important; color: #ffffff !important;
}
body.search .ast-taxonomy-container a[href*="/financial-institutions/"]::after,
body.archive .ast-taxonomy-container a[href*="/financial-institutions/"]::after {
    content: "F"; font-size: 13px !important; color: #ffffff !important;
}
body.search .ast-taxonomy-container a[href*="/real-estate/"]::after,
body.archive .ast-taxonomy-container a[href*="/real-estate/"]::after {
    content: "R"; font-size: 13px !important; color: #ffffff !important;
}

/* 6. TYPOGRAPHY & META CLEANUP */
body.search .entry-title a, body.archive .entry-title a {
    color: #111827; font-family: 'Poppins', sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.35; text-decoration: none;
}
body.search .entry-title a:hover, body.archive .entry-title a:hover { color: var(--mfsa-brand-teal); }
body.search .entry-content p, body.archive .entry-content p { color: #475569; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px;}

/* HIDE META ICONS */
body.search .entry-meta .ast-icon, body.archive .entry-meta .ast-icon { display: none; }

/* META: Hide Author, Keep Date */
body.search .entry-meta, body.archive .entry-meta {
    font-size: 0 !important; 
}
body.search .entry-meta .posted-by, body.archive .entry-meta .posted-by {
    display: none !important; 
}
body.search .entry-meta .posted-on, body.archive .entry-meta .posted-on {
    font-size: 0.85rem !important; 
    color: #64748b !important;
    display: inline-block;
    font-weight: 500;
}
body.search .entry-meta .posted-on a, body.archive .entry-meta .posted-on a {
    text-decoration: none !important;
    box-shadow: none !important; 
    border: none !important;
    color: inherit !important; 
    pointer-events: none; 
}

/* =========================================================
   11. PAGINATION STYLING
   ========================================================= */
.ast-pagination .page-numbers {
    border-radius: 5px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    min-width: 44px;
    padding: 0 10px;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
    margin: 0 4px;
    text-decoration: none;
    line-height: 1;
}

.ast-pagination .page-numbers.current,
.ast-pagination .page-numbers:hover,
.ast-pagination .page-numbers:focus {
    background-color: var(--mfsa-brand-teal);
    color: #ffffff;
    border-color: var(--mfsa-brand-teal);
}

.ast-pagination .next.page-numbers,
.ast-pagination .prev.page-numbers {
    font-weight: 700;
    font-size: 18px;
}

/* =========================================================
   13. SINGLE POST CLEANUP (The "Nuclear" Fix)
   ========================================================= */

/* 1. HIDE DUPLICATE BREADCRUMBS (Blue Links) */
.single-post #primary .ast-breadcrumbs-wrapper,
.single-post #primary .breadcrumbs,
.single-post .entry-header .ast-breadcrumbs-wrapper,
.single-post .ast-single-post-order > .ast-breadcrumbs-wrapper {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. HIDE REDUNDANT META */
.single-post .entry-header .entry-meta,
.single-post .entry-content .entry-meta,
.single-post .read-more-wrap,
.single-post .byline,
.single-post .posted-on {
    display: none !important;
}

/* 3. NAVIGATION BUTTONS (Next / Prev - No Article Names) */
.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 30px;
    background-color: var(--mfsa-brand-teal);
    color: #ffffff !important;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    
    /* NUCLEAR OPTION: Hide actual text (Titles) */
    font-size: 0 !important; 
}

/* Hide all children elements (titles, theme arrows, etc.) */
.post-navigation .nav-links a > * {
    display: none !important;
}

.post-navigation .nav-links a:hover {
    background-color: #005a50; 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* RE-INSERT TEXT & ARROWS via CSS */
.post-navigation .nav-previous a::before {
    content: "← PREVIOUS";
    font-size: 14px;
    letter-spacing: 1px;
}

.post-navigation .nav-next a::after {
    content: "NEXT →";
    font-size: 14px;
    letter-spacing: 1px;
}

/* =========================================================
   14. HEADER SEARCH ICON (Mobile Always-On Fix)
   ========================================================= */

/* --- ALIGNMENT --- */
.ast-builder-menu-1 .main-header-menu,
.main-navigation .menu-box {
    align-items: center !important;
}

.mfsa-search-item {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    margin-left: 20px !important;
}

/* --- THE NUCLEAR KILL SWITCH (Hides EN/FR) --- */
/* 1. Hide EVERYTHING in the dropdown by default (including text nodes) */
.mfsa-search-dropdown {
    visibility: hidden; /* Makes everything invisible */
    font-size: 0;       /* Shrinks text to 0 size */
    color: transparent; /* Makes text transparent */
}

/* 2. BUT... Make the search form VISIBLE again */
.mfsa-manual-search-form {
    visibility: visible !important;
    font-size: 14px !important; /* Restore normal font size */
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 0 !important;
}

/* --- DESKTOP BEHAVIOR --- */
/* Dropdown hidden (display:none) until clicked */
@media (min-width: 922px) {
    .mfsa-search-dropdown {
        display: none; 
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        min-width: 300px !important;
        background: #ffffff !important;
        padding: 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        border-top: 4px solid #187A71 !important;
        border-radius: 0 0 5px 5px !important;
        z-index: 999999 !important;
        margin-top: 15px !important;
    }
    
    .mfsa-search-dropdown.is-open {
        display: block !important;
        animation: mfsaFadeIn 0.2s ease-out;
    }

    .mfsa-search-trigger {
        color: #187A71 !important;
        font-size: 20px !important;
        padding: 8px !important;
        cursor: pointer !important;
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* --- MOBILE BEHAVIOR (Always Visible) --- */
@media (max-width: 921px) {
    .mfsa-search-item {
        display: block !important;
        margin: 0 !important;
        width: 100% !important;
        border-top: 1px solid #eee;
        padding: 0 !important;
        height: auto !important;
    }

    /* HIDE THE TOGGLE ICON ON MOBILE */
    .mfsa-search-trigger {
        display: none !important;
    }

    /* SHOW THE DROPDOWN ALWAYS */
    .mfsa-search-dropdown {
        display: block !important; /* Always show box */
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 15px 20px !important;
        background: #f9f9f9 !important;
        margin-top: 0 !important;
    }
}

/* --- FORM STYLING --- */
.mfsa-search-input {
    flex: 1 !important;
    padding: 0 15px !important;
    border: 1px solid #ddd !important;
    border-right: none !important;
    border-radius: 4px 0 0 4px !important;
    font-size: 14px !important;
    height: 40px !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    color: #333 !important;
}

.mfsa-search-btn {
    background-color: #187A71 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 15px !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important;
}

/* =========================================================
   15. HOMEPAGE FOOTER GAP FIX (NUCLEAR VERSION)
   ========================================================= */

/* 1. Override the specific Astra padding seen in your screenshot */
.home #content .ast-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
}

/* 2. Target the Site Content Wrapper */
.home .site-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 3. Target the Primary Content Area */
.home #primary,
.home #main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 4. Remove margin from the last item inside the content */
.home .entry-content,
.home .entry-content > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 5. Force the footer to touch the content above */
.home .site-footer {
    margin-top: 0 !important;
}

/* =========================================================
   16. HERO BANNER ASPECT RATIO FIX (RESPONSIVE HEIGHT)
   ========================================================= */
.chb-hero-container {
    /* 1. Anchor image to TOP so heads aren't cut off */
    background-position: center top !important;

    /* 2. Standard Cover behavior */
    background-size: cover !important;
    background-repeat: no-repeat !important;

    /* 3. RESPONSIVE HEIGHT (The Magic Fix) 
       Instead of a fixed pixel height (e.g., 600px), we use 'vw' (viewport width).
       This forces the height to always be ~45% of the screen width. 
       As the screen gets wider, the banner gets taller, revealing the full image. */
    min-height: 45vw !important; 
    
    /* 4. Layout centering */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding-top: 80px !important; 
    padding-bottom: 80px !important;
}

/* Cap height on ultra-wide screens */
@media (min-width: 1600px) {
    .chb-hero-container {
        min-height: 750px !important;
        background-position: center 25% !important; /* Slight tweak for huge screens */
    }
}

/* Mobile Fallback: Don't let it get too short */
@media (max-width: 768px) {
    .chb-hero-container {
        min-height: 500px !important;
        background-position: center center !important;
    }
}

/* =========================================================
   17. DETAILS BLOCK STYLING (Universal Content Fix)
   ========================================================= */

/* 1. The Main Container */
.wp-block-details {
    background-color: #ffffff;
    border-left: 6px solid #187A71; /* Brand Teal */
    border-top: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    padding: 0 !important; /* Reset container padding */
}

.wp-block-details:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

/* 2. The Header (Summary) */
.wp-block-details summary {
    display: flex; 
    justify-content: space-between; /* Text Left | Arrow Right */
    align-items: center;
    padding: 25px 30px !important; /* Fixed Header Padding */
    font-weight: 700;
    font-size: 20px; 
    color: #1e293b;
    cursor: pointer;
    outline: none;
    list-style: none; /* Remove default triangle */
    margin-bottom: 0 !important;
}

.wp-block-details summary:hover {
    background-color: #f8fafc;
}

/* Hide default markers */
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::marker { display: none; }

/* 3. The Custom Arrow (Right Side) */
.wp-block-details summary::after {
    font-family: 'Dashicons';
    content: '\f347'; /* Down Arrow */
    color: #187A71;
    font-size: 24px;
    font-weight: 400;
    transition: transform 0.3s ease;
    margin-left: 15px; 
}

/* Rotate arrow when open */
.wp-block-details[open] summary::after {
    transform: rotate(180deg);
}

/* 4. The Separator Line */
.wp-block-details[open] summary {
    border-bottom: 1px solid #f1f5f9;
}

/* 5. THE CONTENT FIX (Target everything that isn't the summary) */
/* This ensures padding works even if there is no wrapper div */
.wp-block-details > *:not(summary) {
    margin-left: 30px !important;  /* Left Padding */
    margin-right: 30px !important; /* Right Padding */
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
    max-width: calc(100% - 60px); /* Ensure it fits */
}

/* Add vertical spacing to the first and last content items */
.wp-block-details > *:not(summary):first-of-type {
    margin-top: 20px !important;
}

.wp-block-details > *:not(summary):last-child {
    margin-bottom: 30px !important;
}
/* =========================================================
   SIDEBAR HIERARCHY & NESTING
   ========================================================= */

/* Ensure the container supports absolute positioning for the dashes */
.mfsa-sidebar-col .mfsa-sidebar-item {
    position: relative;
    transition: all 0.2s ease;
}

/* Level 1 (Root Items) */
.mfsa-nested-group.depth-0 > .mfsa-sidebar-item {
    padding-left: 15px !important;
    font-weight: 600;
    color: #333;
}

/* Level 2 (Sub-items) */
.mfsa-nested-group.depth-1 > .mfsa-sidebar-item {
    padding-left: 35px !important;
    font-size: 15px;
    color: #475569; /* Slightly lighter text */
}

/* Level 3 (Sub-sub-items) */
.mfsa-nested-group.depth-2 > .mfsa-sidebar-item {
    padding-left: 55px !important;
    font-size: 14px;
    color: #64748b; 
}

/* Level 4 and beyond */
.mfsa-nested-group.depth-3 > .mfsa-sidebar-item,
.mfsa-nested-group.depth-4 > .mfsa-sidebar-item {
    padding-left: 75px !important;
    font-size: 14px;
    color: #94a3b8;
}

/* --- Visual Connecting Dashes --- */
/* Level 2 Dash */
.mfsa-nested-group.depth-1 > .mfsa-sidebar-item::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background-color: #cbd5e1;
}

/* Level 3 Dash */
.mfsa-nested-group.depth-2 > .mfsa-sidebar-item::before {
    content: "";
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background-color: #cbd5e1;
}

/* Level 4+ Dash */
.mfsa-nested-group.depth-3 > .mfsa-sidebar-item::before,
.mfsa-nested-group.depth-4 > .mfsa-sidebar-item::before {
    content: "";
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background-color: #cbd5e1;
}

/* Ensure the active color overrides the faded text of nested items */
.mfsa-sidebar-col .mfsa-sidebar-item.is-current {
    color: #000 !important;
}

/******************************/
/* =========================================================
   4. HYDRO-STYLE BANNER (Corrected Edge & Gradient)
   ========================================================= */
/* =========================================================
   4. HYDRO-STYLE BANNER (Right Edge, Cyan Arc, Reduced Size)
   ========================================================= */
.mfsa-general-banner { 
    position: relative;
    background-color: var(--mfsa-brand-teal); 
	/*background: linear-gradient(135deg, #00C6BA 0%, #00685E 50%);*/
	background: linear-gradient(180deg, var(--mfsa-brand-teal) 0%, #13534d 100%);
	
    color: #ffffff; 
    overflow: hidden; 
    margin-bottom: 40px; 
    display: flex;
    align-items: center;
    min-height: 280px; /* Reduced overall header height */
}


/* Container for Text - Keeps text aligned with your site width */
.mfsa-general-banner .mfsa-banner-inner { 
    width: 100%;
    max-width: 1240px !important; 
    margin: 0 auto !important; 
    padding: 0 20px; 
    box-sizing: border-box !important; 
    position: static !important; /* <-- THIS IS THE FIX: Lets the image escape to the screen edge */
    display: flex;
    align-items: center;
    min-height: 280px;
}

/* Left Side: Text Content */
.mfsa-general-banner .mfsa-banner-content { 
    flex: 0 0 55%; 
    padding: 40px 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.mfsa-general-banner .breadcrumbs, 
.mfsa-general-banner .breadcrumbs a, 
.mfsa-general-banner .breadcrumbs span { 
    color: rgba(255,255,255,0.95) !important; 
    font-size: 14px !important; 
    font-weight: 500 !important; 
    text-decoration: none; 
}

.mfsa-general-banner .mfsa-banner-crumbs { 
    margin-bottom: 15px; 
}

.mfsa-general-banner .mfsa-banner-title { 
    color: #ffffff; 
    font-size: 3rem; /* Scaled down to match sleeker header */
    font-weight: 800; 
    line-height: 1.1; 
    margin: 0 0 15px 0; 
}

.mfsa-general-banner .mfsa-banner-desc { 
    color: rgba(255,255,255,0.95); 
    font-size: 16px; 
    line-height: 1.5; 
    max-width: 600px; 
}

/* --- RIGHT SIDE: VISUAL PINNED TO FAR RIGHT EDGE --- */
.mfsa-general-banner .mfsa-banner-visual { 
    position: absolute;
    top: 0;
    right: 0; 
    bottom: 0;
    width: 38vw; /* Reduced image width */
    max-width: 750px;
    display: none; 
    z-index: 1; 
}

.mfsa-general-banner.has-image .mfsa-banner-visual { 
    display: block; 
}

/* 1. The Image */
.mfsa-general-banner .mfsa-banner-img-bg { 
    position: absolute;
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
    background-size: cover; 
    background-position: center; 
    /* A shallow curve that doesn't pinch at the top/bottom */
    /*clip-path: ellipse(100% 140% at 100% 50%);*/
	clip-path: ellipse(90% 140% at 90% 50%);
    z-index: 2;
	filter: saturate(0%);
	opacity: .9;
}

/* 2. The Cyan Arc Behind Image */
.mfsa-general-banner .mfsa-banner-visual::before {
    content: '';
    position: absolute;
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;
    /*background-color: #00A9A3; /* Bright cyan/teal contrasting color */	
	background-color: #808d8d;/*#134745;*/
	 clip-path: ellipse(100% 140% at 100% 50%);
    z-index: 1;
    /* Pushes left to reveal the arc under the image */
    transform: translateX(-5px); 
}

/* Hide Old SVG Elements */
.mfsa-general-banner .mfsa-banner-curve { display: none !important; }

/* Mobile View Adjustments */
@media (max-width: 921px) {
    .mfsa-general-banner { display: block; min-height: auto; }
	.mfsa-general-banner .mfsa-banner-inner { flex-direction: column; }
    .mfsa-general-banner .mfsa-banner-content { flex: none; width: 100%; padding: 30px 0; }
    .mfsa-general-banner .mfsa-banner-title { font-size: 2.2rem; }
    
    /* Drops image under text as a block */
    .mfsa-general-banner .mfsa-banner-visual { 
        position: relative; 
        width: 100%; 
        height: 200px;		
        max-width: none; 
    }
    
    /* Removes curve and arc on mobile so image fills the screen */
    .mfsa-general-banner .mfsa-banner-img-bg { clip-path: none; }
    .mfsa-general-banner .mfsa-banner-visual::before { display: none; }
}
/* =========================================================
   MOBILE OVERRIDES: Top Buttons & Symmetrical Sidebar
   ========================================================= */
@media (max-width: 921px) {
    
    /* 1. TOP BUTTONS: Equal size and properly stacked */
    .mfsa-nav-container {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Forces a single, equal-width column stack */
        gap: 12px !important;
        width: 100%;
        padding: 15px 0 !important;
    }
    
    .mfsa-filter-btn {
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* 2. SIDEBAR / SUB-ITEMS: Centered and symmetrical */
    .mfsa-sidebar-col {
        text-align: center !important;
        padding: 20px 15px !important;
    }

    .mfsa-sidebar-col .mfsa-sidebar-item {
        text-align: center !important;
        /* Override the nested left-padding (depth-1, depth-2, etc.) */
        padding: 12px 15px !important; 
        border-left: none !important; /* Remove left border for symmetry */
        border-bottom: 1px solid #eaeaea; /* Adds a clean separator between links */
        width: 100%;
        box-sizing: border-box;
        display: block !important;
    }

    /* Remove the nested hierarchy lines (dashes) on mobile */
    .mfsa-nested-group .mfsa-sidebar-item::before {
        display: none !important;
    }

    /* Symmetrical active state formatting for mobile */
    .mfsa-sidebar-col .mfsa-sidebar-item.is-current {
        background-color: var(--mfsa-brand-teal) !important;
        color: #ffffff !important;
        border-radius: 6px;
        border-bottom: none !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    /* Remove the bottom border from the very last sub-item to keep it clean */
    .mfsa-nested-group .mfsa-sidebar-item:last-child {
        border-bottom: none !important;
    }
}