/*
Theme Name: CFIU Training Theme
Theme URI: https://www.cfiu.org/
Author: CFI University
Description: Lightweight responsive member-training theme for training.cfiu.org. Matches the CFIU public site's clean white, black and gold branding while preserving Namaste LMS and CFIU member plugins.
Version: 1.0.21
Text Domain: cfiu-training
*/
:root{--gold:#d4ac57;--gold-dark:#b5883d;--black:#101010;--ink:#292929;--muted:#686868;--line:#e5e5e5;--paper:#fff;--soft:#f6f6f6;--max:1280px}
*{box-sizing:border-box}html{font-size:16px;-webkit-text-size-adjust:100%}body{margin:0;background:var(--soft);color:var(--ink);font-family:Arial,Helvetica,sans-serif;line-height:1.5}img{max-width:100%;height:auto}a{color:var(--gold-dark);text-decoration:none}a:hover,a:focus{color:#7d5a1f;text-decoration:underline}.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Public-site-style white CFIU header. */
.cfiu-site-header{background:#fff;border-bottom:1px solid #ededed;position:relative;z-index:100}
.cfiu-header-inner{max-width:1480px;min-height:96px;margin:0 auto;padding:10px 30px;display:flex;align-items:center;gap:34px}
.cfiu-brand{flex:0 0 270px;width:270px;display:flex;align-items:center;justify-content:flex-start}
.cfiu-logo-link{display:flex;width:270px;height:72px;align-items:center;justify-content:flex-start;overflow:hidden}
.cfiu-brand img,.cfiu-brand .custom-logo{display:block;width:auto;max-width:270px;max-height:72px;object-fit:contain}
.cfiu-primary-nav{margin-left:auto;min-width:0;flex:1 1 auto}
.cfiu-primary-nav ul{display:flex;align-items:center;justify-content:flex-end;gap:16px;list-style:none;margin:0;padding:0}
.cfiu-primary-nav li{margin:0;white-space:nowrap}
.cfiu-primary-nav a{display:block;padding:12px 4px;color:#202020;font-size:13px;font-weight:700;border-bottom:2px solid transparent}
.cfiu-primary-nav a:hover,.cfiu-primary-nav a:focus,.cfiu-primary-nav .current-menu-item>a,.cfiu-primary-nav .current_page_item>a{color:var(--gold-dark);border-bottom-color:var(--gold);text-decoration:none}
.cfiu-nav-toggle{display:none;margin-left:auto;width:46px;height:42px;border:1px solid #d0d0d0;background:#fff;border-radius:3px;padding:9px 10px;cursor:pointer}
.cfiu-nav-toggle span{display:block;height:3px;background:#202020;border-radius:3px;margin:4px 0}
/* Hide common theme/plugin duplicate mobile-header shells when this theme is active. */
#mobile-header,.mobile-header,.mobile-menu-bar,.responsive-menu-pro-button,.responsive-menu-button{display:none!important}
/* Main content */
.cfiu-main{max-width:var(--max);margin:30px auto;padding:0 24px}.cfiu-content-card{background:#fff;border:1px solid var(--line);padding:34px 38px;min-height:420px}.entry-title{margin:0 0 24px;color:#222;font-size:32px;line-height:1.15}.entry-content>*:first-child{margin-top:0}.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4{color:#333}.entry-content table{width:100%;border-collapse:collapse}.entry-content th,.entry-content td{padding:11px 9px;border-bottom:1px solid #ddd;text-align:left;vertical-align:top}.entry-content th{font-weight:700;color:#555}.entry-content input[type=text],.entry-content input[type=email],.entry-content input[type=password],.entry-content input[type=tel],.entry-content input[type=url],.entry-content input[type=number],.entry-content select,.entry-content textarea{max-width:100%;border:1px solid #cfcfcf;border-radius:3px;padding:10px 12px;font:inherit;background:#fff}.entry-content input[type=text],.entry-content input[type=email],.entry-content input[type=password],.entry-content input[type=tel],.entry-content input[type=url],.entry-content select{min-height:42px}.entry-content button,.entry-content input[type=submit],.entry-content input[type=button],.entry-content .button,.entry-content a.button{display:inline-block;border:0;border-radius:3px;background:#111;color:#fff!important;padding:11px 18px;font-weight:700;cursor:pointer;text-decoration:none}.entry-content button:hover,.entry-content input[type=submit]:hover,.entry-content input[type=button]:hover,.entry-content .button:hover,.entry-content a.button:hover{background:var(--gold-dark);color:#fff!important;text-decoration:none}
/* Namaste and member plugin compatibility */
.namaste-course,.namaste-course-wrapper,.namaste-student-lessons{max-width:100%}.namaste-course table,.namaste-student-lessons table{width:100%}.namaste-course a,.namaste-student-lessons a{color:#a56d00;font-weight:700}.namaste-course progress{max-width:100%}.cfiu-profile-wrap,.cfiu-profile-card,.cfiu-team-meetings,.cfiu-dashboard-wrap{max-width:100%!important}.cfiu-profile-card{box-shadow:none!important}.wp-editor-wrap{max-width:100%}.wp-editor-container{border-color:#d6d6d6!important}
.cfiu-site-footer{margin-top:40px;background:#151515;color:#d9d9d9;border-top:3px solid var(--gold)}.cfiu-footer-inner{max-width:var(--max);margin:0 auto;padding:24px;display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:14px}.cfiu-site-footer a{color:var(--gold)}
/* Mobile navigation */
@media(max-width:1100px){.cfiu-header-inner{min-height:82px;padding:8px 20px}.cfiu-brand{flex-basis:230px;width:230px}.cfiu-logo-link{width:230px;height:62px}.cfiu-brand img,.cfiu-brand .custom-logo{max-width:230px;max-height:62px}.cfiu-nav-toggle{display:block}.cfiu-primary-nav{display:none;position:absolute;left:0;right:0;top:100%;margin:0;background:#fff;border-top:1px solid #eee;box-shadow:0 7px 14px rgba(0,0,0,.12)}.cfiu-primary-nav.is-open{display:block}.cfiu-primary-nav ul{display:block;padding:8px 20px 14px}.cfiu-primary-nav li{white-space:normal}.cfiu-primary-nav a{padding:11px 8px;border-bottom:1px solid #eee;font-size:15px;color:#202020}.cfiu-primary-nav a:hover,.cfiu-primary-nav .current-menu-item>a{background:#fafafa;color:var(--gold-dark);border-bottom-color:#eee}.cfiu-main{margin:22px auto;padding:0 14px}.cfiu-content-card{padding:26px 22px}.entry-content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}}
@media(max-width:700px){.cfiu-header-inner{min-height:72px;padding:6px 14px}.cfiu-brand{flex-basis:195px;width:195px}.cfiu-logo-link{width:195px;height:56px}.cfiu-brand img,.cfiu-brand .custom-logo{max-width:195px;max-height:56px}.cfiu-main{margin:16px auto;padding:0 10px}.cfiu-content-card{padding:20px 15px;border-radius:0}.entry-title{font-size:27px}.cfiu-footer-inner{display:block;text-align:center}.entry-content input[type=text],.entry-content input[type=email],.entry-content input[type=password],.entry-content input[type=tel],.entry-content input[type=url],.entry-content input[type=number],.entry-content select,.entry-content textarea{width:100%}}
@media(max-width:430px){.cfiu-brand{flex-basis:165px;width:165px}.cfiu-logo-link{width:165px}.cfiu-brand img,.cfiu-brand .custom-logo{max-width:165px}.cfiu-nav-toggle{width:44px}.cfiu-content-card{padding:17px 11px}.entry-title{font-size:24px}.entry-content th,.entry-content td{padding:9px 6px}.namaste-course table,.namaste-student-lessons table{font-size:14px}}
/* v1.0.5: suppress the legacy/injected training-site masthead above the CFIU theme header. */
body > #masthead,
body > .site-header:not(.cfiu-site-header),
body > header.site-header:not(.cfiu-site-header),
body > #header:not(.cfiu-site-header),
body > .header:not(.cfiu-site-header),
body > .main-header:not(.cfiu-site-header),
body > .header-style2:not(.cfiu-site-header),
body > .header-style1:not(.cfiu-site-header){display:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;overflow:hidden!important}

/* v1.0.6: any legacy masthead injected by wp_body_open is removed by header.php before the CFIU header renders. */

/* v1.0.8: match cfiu.org typography for the Certified Flooring Inspectors University title. */
.site-title,
.site-title a,
.site-description,
.site-branding,
.site-branding a,
.cfiu-site-title,
.cfiu-site-title a,
header h1,
header .site-name {
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  letter-spacing: normal !important;
}

/* v1.0.16: force the legacy training-site title/masthead text to a clean standard sans-serif. */
body > *:not(.cfiu-site-header):not(.cfiu-main):not(.cfiu-site-footer):not(#wpadminbar),
body > *:not(.cfiu-site-header):not(.cfiu-main):not(.cfiu-site-footer):not(#wpadminbar) * {
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-stretch: normal !important;
  letter-spacing: normal !important;
}


/* v1.0.16 — desktop navigation fit + subtle dashboard card refinement */
@media (min-width: 1000px) {
  .site-header .menu,
  .site-header .nav-menu,
  .cfiu-primary-nav ul {
    gap: 0.95rem !important;
  }
  .site-header .menu a,
  .site-header .nav-menu a,
  .cfiu-primary-nav a {
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    font-size: 0.93rem !important;
    white-space: nowrap !important;
  }
}

/* Main dashboard/content card */
.site-main > article,
.site-main .page,
main.site-main article,
.cfiu-content-card,
.entry-content {
  border-radius: 8px;
}

/* Apply the visible card treatment to the main page/article container without
   changing Namaste's internal tables or progress bars. */
.site-main > article,
main.site-main > article,
.content-area > article,
.content-area .site-main > article {
  border: 1px solid #cfcfcf !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07) !important;
  background: #fff;
  overflow: hidden;
}


/* v1.0.16 — fit complete desktop navigation without clipping Contact Us */
@media (min-width: 1100px) {
  .site-header .header-inner,
  .cfiu-header-inner,
  .site-header .container {
    max-width: 100% !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .site-branding,
  .cfiu-branding {
    flex: 0 0 auto !important;
    margin-right: 1.35rem !important;
  }

  .site-branding img,
  .custom-logo,
  .cfiu-logo img {
    max-width: 220px !important;
    height: auto !important;
  }

  .site-header .menu,
  .site-header .nav-menu,
  .cfiu-primary-nav ul {
    gap: 0.55rem !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  .site-header .menu a,
  .site-header .nav-menu a,
  .cfiu-primary-nav a {
    padding-left: 0.12rem !important;
    padding-right: 0.12rem !important;
    font-size: 0.91rem !important;
    white-space: nowrap !important;
  }
}

/* Switch to the compact/mobile navigation before desktop links can clip. */
@media (max-width: 1099px) {
  .cfiu-menu-toggle,
  .menu-toggle {
    display: inline-flex !important;
  }
}


/* v1.0.16 — move desktop navigation left while preserving fit */
@media (min-width: 1100px) {
  .site-header .header-inner,
  .cfiu-header-inner,
  .site-header .container {
    justify-content: flex-start !important;
  }

  .site-branding,
  .cfiu-branding {
    margin-right: 2.25rem !important;
  }

  .site-header nav,
  .cfiu-primary-nav {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1 1 auto !important;
  }

  .site-header .menu,
  .site-header .nav-menu,
  .cfiu-primary-nav ul {
    justify-content: flex-start !important;
  }
}


/* v1.0.16 — subtle divider below Mentors */
.entry-content p:has(strong:first-child),
.entry-content p:has(b:first-child) {
  /* no general visual change; targeted further below where supported */
}

/* The dashboard's Mentors row */
.entry-content p:has(strong:first-child) {
  padding-bottom: 0;
}

/* Match the light gray course-table divider */
.entry-content p:has(strong:first-child):has(a),
.entry-content p:has(b:first-child):has(a) {
  border-bottom: 1px solid #dddddd;
  padding-bottom: 1.1rem;
  margin-bottom: 1.6rem;
}


/* v1.0.16 — vertical separators between desktop menu items */
@media (min-width: 1100px) {
  .site-header .menu > li:not(:last-child)::after,
  .site-header .nav-menu > li:not(:last-child)::after,
  .cfiu-primary-nav ul > li:not(:last-child)::after {
    content: "|" !important;
    display: inline-block !important;
    margin-left: 0.55rem !important;
    color: #777 !important;
    font-weight: 400 !important;
  }

  .site-header .menu > li,
  .site-header .nav-menu > li,
  .cfiu-primary-nav ul > li {
    display: flex !important;
    align-items: center !important;
  }
}


/* v1.0.16 — reliable divider between Mentors and My Courses */
.entry-content h2,
.entry-content h3 {
  position: relative;
}

/* Put the divider immediately above the My Courses heading.
   This is reliable even when the Mentors line is generated by a shortcode/plugin. */
.entry-content h2:first-of-type,
.entry-content h3:first-of-type {
  border-top: 1px solid #dddddd !important;
  padding-top: 1.6rem !important;
  margin-top: 1.35rem !important;
}


/* v1.0.16 — divider attached directly to the rendered Mentors row */
.cfiu-mentors-divider {
  border-bottom: 1px solid #dddddd !important;
  padding-bottom: 1.15rem !important;
  margin-bottom: 1.45rem !important;
}


/* v1.0.17 — built-in CFIU member login section on the front page */
.cfiu-login-section{
  max-width:560px;
  margin:38px auto 8px;
  padding:28px 30px;
  border:1px solid #cfcfcf;
  border-radius:8px;
  background:#fff;
  box-shadow:0 3px 12px rgba(0,0,0,.07);
}
.cfiu-login-section h2{margin:0 0 18px;text-align:center;font-size:28px;color:#222}
.cfiu-login-section .login-username,.cfiu-login-section .login-password,.cfiu-login-section .login-remember,.cfiu-login-section .login-submit{margin:0 0 16px}
.cfiu-login-section label{display:block;margin-bottom:6px;font-weight:700;color:#333}
.cfiu-login-section .login-remember label{display:inline;font-weight:400}
.cfiu-login-section input[type=text],.cfiu-login-section input[type=password]{width:100%;min-height:44px;border:1px solid #c8c8c8;border-radius:4px;padding:10px 12px;font:inherit;background:#fff}
.cfiu-login-section input[type=submit],.cfiu-login-dashboard-link{display:inline-block;border:0;border-radius:4px;background:#111;color:#fff!important;padding:11px 20px;font-weight:700;cursor:pointer;text-decoration:none!important}
.cfiu-login-section input[type=submit]:hover,.cfiu-login-dashboard-link:hover{background:var(--gold-dark);color:#fff!important}
.cfiu-login-help{text-align:center;margin:12px 0 0}
.cfiu-login-signed-in{text-align:center}
@media(max-width:700px){.cfiu-login-section{margin-top:26px;padding:22px 18px}}

/* v1.0.20 — clean nested dropdown navigation support */
@media (min-width:1100px) {
  /* Top-level items become anchors for their dropdowns. */
  .cfiu-primary-nav > ul > li,
  .cfiu-primary-nav .menu > li {
    position:relative;
  }

  /* Small down-caret on menu items that contain children. */
  .cfiu-primary-nav > ul > li.menu-item-has-children > a,
  .cfiu-primary-nav .menu > li.menu-item-has-children > a {
    padding-right:15px !important;
    position:relative;
  }
  .cfiu-primary-nav > ul > li.menu-item-has-children > a::after,
  .cfiu-primary-nav .menu > li.menu-item-has-children > a::after {
    content:"";
    position:absolute;
    right:2px;
    top:50%;
    width:6px;
    height:6px;
    border-right:2px solid #777;
    border-bottom:2px solid #777;
    transform:translateY(-65%) rotate(45deg);
  }

  /* Dropdown panel. */
  .cfiu-primary-nav .sub-menu {
    display:block;
    position:absolute;
    left:0;
    top:calc(100% + 1px);
    min-width:230px;
    margin:0;
    padding:7px 0;
    background:#fff;
    border:1px solid #dedede;
    border-radius:7px;
    box-shadow:0 8px 22px rgba(0,0,0,.14);
    opacity:0;
    visibility:hidden;
    transform:translateY(7px);
    transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index:1000;
  }
  .cfiu-primary-nav li:hover > .sub-menu,
  .cfiu-primary-nav li:focus-within > .sub-menu {
    opacity:1;
    visibility:visible;
    transform:translateY(0);
  }
  .cfiu-primary-nav .sub-menu li {
    display:block !important;
    position:relative;
    width:100%;
    margin:0;
    white-space:normal;
  }
  .cfiu-primary-nav .sub-menu li::after {
    content:none !important;
    display:none !important;
  }
  .cfiu-primary-nav .sub-menu a {
    display:block;
    width:100%;
    padding:10px 15px !important;
    border:0 !important;
    font-size:14px !important;
    line-height:1.3;
    color:#262626;
    white-space:normal !important;
  }
  .cfiu-primary-nav .sub-menu a:hover,
  .cfiu-primary-nav .sub-menu a:focus,
  .cfiu-primary-nav .sub-menu .current-menu-item > a,
  .cfiu-primary-nav .sub-menu .current_page_item > a {
    background:#f6f6f6;
    color:var(--gold-dark);
    text-decoration:none;
  }

  /* Third-level menus open to the right. */
  .cfiu-primary-nav .sub-menu .menu-item-has-children > a {
    padding-right:30px !important;
  }
  .cfiu-primary-nav .sub-menu .menu-item-has-children > a::after {
    content:"›";
    position:absolute;
    right:13px;
    top:50%;
    transform:translateY(-50%);
    font-size:20px;
    color:#777;
  }
  .cfiu-primary-nav .sub-menu .sub-menu {
    left:calc(100% - 2px);
    top:-8px;
  }
}

/* Mobile/tablet: nested links stay inside the hamburger panel with clear hierarchy. */
@media (max-width:1099px) {
  .cfiu-primary-nav .sub-menu {
    display:block;
    margin:0;
    padding:0 0 0 18px;
    border:0;
    box-shadow:none;
    background:#fafafa;
  }
  .cfiu-primary-nav .sub-menu li {
    display:block !important;
    margin:0;
  }
  .cfiu-primary-nav .sub-menu li::after {
    content:none !important;
    display:none !important;
  }
  .cfiu-primary-nav .sub-menu a {
    padding:9px 10px 9px 18px !important;
    font-size:14px !important;
    font-weight:600;
    border-bottom:1px solid #e9e9e9;
  }
  .cfiu-primary-nav .menu-item-has-children > a::after {
    content:" ▾";
    color:#777;
    font-weight:400;
  }
}


/* v1.0.21 — keep desktop navigation on one row and use space to the left before collapsing. */
@media (min-width:1200px) {
  .cfiu-header-inner {
    max-width:none !important;
    width:100% !important;
    padding-left:18px !important;
    padding-right:18px !important;
    gap:18px !important;
  }
  .cfiu-brand {
    flex:0 0 220px !important;
    width:220px !important;
    margin-right:0 !important;
  }
  .cfiu-logo-link {
    width:220px !important;
  }
  .cfiu-brand img,
  .cfiu-brand .custom-logo {
    max-width:220px !important;
  }
  .cfiu-primary-nav {
    flex:1 1 auto !important;
    min-width:0 !important;
    margin-left:0 !important;
  }
  .cfiu-primary-nav > ul,
  .cfiu-primary-nav .menu {
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:flex-end !important;
    gap:.42rem !important;
    width:100% !important;
  }
  .cfiu-primary-nav > ul > li,
  .cfiu-primary-nav .menu > li {
    flex:0 0 auto !important;
  }
  .cfiu-primary-nav > ul > li > a,
  .cfiu-primary-nav .menu > li > a {
    white-space:nowrap !important;
    font-size:.88rem !important;
    padding-left:.08rem !important;
    padding-right:.08rem !important;
  }
  .cfiu-primary-nav > ul > li:not(:last-child)::after,
  .cfiu-primary-nav .menu > li:not(:last-child)::after {
    margin-left:.42rem !important;
  }
}

/* If the desktop row becomes tight, switch to the hamburger rather than wrapping. */
@media (min-width:1101px) and (max-width:1199px) {
  .cfiu-header-inner {min-height:82px;padding:8px 20px}
  .cfiu-brand{flex-basis:230px;width:230px}
  .cfiu-logo-link{width:230px;height:62px}
  .cfiu-brand img,.cfiu-brand .custom-logo{max-width:230px;max-height:62px}
  .cfiu-nav-toggle{display:block !important}
  .cfiu-primary-nav{display:none;position:absolute;left:0;right:0;top:100%;margin:0;background:#fff;border-top:1px solid #eee;box-shadow:0 7px 14px rgba(0,0,0,.12)}
  .cfiu-primary-nav.is-open{display:block}
  .cfiu-primary-nav ul{display:block !important;padding:8px 20px 14px}
  .cfiu-primary-nav li{display:block !important;white-space:normal}
  .cfiu-primary-nav li::after{content:none !important;display:none !important}
  .cfiu-primary-nav a{padding:11px 8px !important;border-bottom:1px solid #eee;font-size:15px !important;color:#202020}
  .cfiu-primary-nav .sub-menu{position:static !important;display:block !important;opacity:1 !important;visibility:visible !important;transform:none !important;margin:0;padding:0 0 0 18px;border:0;box-shadow:none;background:#fafafa}
}

/* v1.0.22 — responsive left-aligned desktop navigation.
   Start the menu immediately after the logo instead of pinning it to the
   right edge. New top-level links consume available space naturally; the
   existing compact navigation still takes over below the desktop breakpoint. */
@media (min-width:1200px) {
  .cfiu-primary-nav > ul,
  .cfiu-primary-nav .menu {
    justify-content:flex-start !important;
    width:auto !important;
  }
}
