/* ============================================
   KADENCE CUSTOM CSS — The Morgano Agency
   ============================================ */

:root {
  --global-palette1: #02503c;
  --global-palette2: #013d2d;
  --global-palette3: #141413;
  --global-palette4: #4a5a4a;
  --global-palette5: #eef2ee;
  --global-palette6: #f8faf8;
  --global-palette7: #fcfbf0;
  --global-palette9: #ffffff;
}

body {
  background-color: #ffffff !important;
}

.wp-block-image.alignfull img,
.wp-block-cover.alignfull,
.wp-block-image.size-large img {
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

/* --- Header + Sticky --- */
#masthead,
#masthead.site-header,
.site-header {
  background: #02503c !important;
  background-color: #02503c !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  transition: all 0.3s ease;
}
#masthead .site-header-wrap {
  padding-top: 12px;
  padding-bottom: 12px;
}
/* Force green on ALL inner header wrappers */
#masthead .site-header-wrap,
#masthead .site-header-inner-wrap,
#masthead .site-header-upper-wrap,
#masthead .site-header-upper-inner-wrap,
#masthead .site-main-header-wrap,
#masthead .site-header-row-container-inner,
#masthead .site-header-row {
  background: #02503c !important;
  background-color: #02503c !important;
}

/* Nav links: white, gold on hover */
#masthead .header-navigation a,
#masthead .header-navigation .menu-item a,
#masthead .header-navigation ul li a,
#masthead .site-title a {
  color: #ffffff !important;
}
#masthead .header-navigation a:hover,
#masthead .header-navigation .menu-item a:hover {
  color: #f0b849 !important;
}

/* Gold underline on nav hover */
#masthead .header-navigation a {
  position: relative;
}
#masthead .header-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f0b849;
  transition: width 0.3s ease;
}
#masthead .header-navigation a:hover::after {
  width: 100%;
}

/* Header CTA button (gold) */
#masthead a.header-button,
#masthead .header-button a,
#masthead .header-button .button,
#masthead .header-button-wrap a {
  background: #f0b849 !important;
  color: #013d2d !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  padding: 10px 24px !important;
  font-size: 13px !important;
  border: none !important;
  transition: all 0.3s ease;
}
#masthead a.header-button:hover,
#masthead .header-button a:hover,
#masthead .header-button .button:hover,
#masthead .header-button-wrap a:hover {
  background: #ffffff !important;
  color: #02503c !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Admin bar offset */
.admin-bar #masthead {
  top: 32px !important;
}
@media (max-width: 782px) {
  .admin-bar #masthead {
    top: 46px !important;
  }
}

/* --- Dropdown Menu --- */
#masthead .header-navigation ul ul {
  background: #02503c !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
}
#masthead .header-navigation ul ul a {
  color: #ffffff !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
}
#masthead .header-navigation ul ul a:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #f0b849 !important;
}

/* --- Homepage whitespace fix --- */

.home .entry-content-wrap {
  padding-top: 0 !important;
}

/* --- Logo sizing --- */
#masthead .site-branding img,
#masthead .custom-logo,
#masthead .site-branding .custom-logo-link img {
  max-height: 96px !important;
  height: 96px !important;
  width: 96px !important;
  object-fit: contain !important;
}
#masthead .site-title,
#masthead .site-title a {
  font-family: 'Rubik', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #ffffff !important;
  letter-spacing: -0.3px;
}

/* --- Disable Kadence page title banner --- */
.entry-hero-section-overlay,
.entry-hero-layout-normal {
  display: none !important;
}

/* --- Footer --- */
#colophon,
.site-footer {
  background: #02503c !important;
  color: #ffffff !important;
}
.site-footer a {
  color: #f0b849 !important;
}
.site-footer a:hover {
  color: #ffffff !important;
}
.site-footer .footer-html .powered-by-flavor {
  display: none;
}

/* --- Buttons --- */
.wp-block-button__link {
  background-color: #02503c !important;
  border-color: #02503c !important;
}
.wp-block-button__link:hover {
  background-color: #013d2d !important;
  border-color: #013d2d !important;
}

/* --- Old Barnsbury color refs --- */
.has-primary-color { color: #02503c !important; }
.has-primary-background-color { background-color: #02503c !important; }
.has-secondary-color { color: #02503c !important; }
.has-secondary-background-color { background-color: #02503c !important; }
.has-foreground-color { color: #141413 !important; }
.has-foreground-background-color { background-color: #141413 !important; }
.has-background-color { color: #fcfbf0 !important; }
.has-background-background-color { background-color: #fcfbf0 !important; }
.has-tertiary-color { color: #fcfbf0 !important; }
.has-tertiary-background-color { background-color: #fcfbf0 !important; }

.has-tertiary-background-color.wp-block-separator {
  background-color: #fcfbf0 !important;
  border-color: #fcfbf0 !important;
}

/* --- Mobile Header --- */
.mobile-header-wrap,
.mobile-header-wrap .site-header-wrap,
#mobile-header,
.kadence-mobile-header,
#masthead .mobile-header-wrap {
  background: #02503c !important;
}
.mobile-toggle-open-container .menu-toggle-icon,
.mobile-toggle-open-container .menu-toggle-open .kadence-svg-iconset,
.mobile-header-wrap .menu-toggle-open .kadence-svg-iconset svg,
.mobile-header-wrap .menu-toggle-open {
  color: #ffffff !important;
  fill: #ffffff !important;
}
.mobile-toggle-open-container .menu-toggle-open .mobile-toggle-label {
  color: #ffffff !important;
}
.mobile-header-wrap .site-branding img,
.mobile-header-wrap .custom-logo {
  max-height: 40px !important;
  height: 40px !important;
  width: auto !important;
}
.mobile-header-wrap .site-title,
.mobile-header-wrap .site-title a {
  color: #ffffff !important;
  font-size: 16px;
}
.mobile-navigation .drawer-inner,
.mobile-navigation .drawer-content,
#mobile-drawer .drawer-inner {
  background: #02503c !important;
}
#mobile-drawer .drawer-inner a,
.mobile-navigation a {
  color: #ffffff !important;
}
#mobile-drawer .drawer-inner a:hover,
.mobile-navigation a:hover {
  color: #f0b849 !important;
}
#mobile-drawer .drawer-header .drawer-toggle {
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .wp-block-image.alignfull img,
  .wp-block-image.size-large img {
    max-height: 250px;
  }
}

/* --- Fix white gap between content and footer --- */
.content-area {
  margin-bottom: 0 !important;
}
.entry-content-wrap {
  padding-bottom: 0 !important;
}
.morgano-homepage .states-ticker {
  border-bottom: none !important;
}

/* --- Fix white bar between header and hero on homepage --- */
.home .content-area {
  margin-top: 0 !important;
}

/* --- Mobile header white bar fix --- */
@media (max-width: 768px) {
  .home .content-area {
    margin-top: 0 !important;
  }
  .mobile-header-wrap + .site-content,
  .mobile-header-wrap + .wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}


/* --- Fix white bar between header and content on service pages --- */
.page-template-default .content-area,
.page-template-default #primary {
  margin-top: 0 !important;
}
.page-template-default .entry-content-wrap {
  padding-top: 0 !important;
}

/* ========== FOOTER STATES TICKER ========== */
@keyframes fstScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.footer-states-ticker {
  background: #02503c;
  padding: 16px 0;
  overflow: hidden;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.footer-states-ticker .fst-label {
  text-align: center;
  margin-bottom: 10px;
  font-family: 'Rubik', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #c9a227;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.footer-states-ticker .fst-wrap {
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  overflow: hidden;
}
.footer-states-ticker .fst-track {
  display: flex;
  gap: 0;
  animation: fstScroll 25s linear infinite;
  width: max-content;
  align-items: center;
}
.footer-states-ticker .fst-track:hover {
  animation-play-state: paused;
}
.footer-states-ticker .fst-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.footer-states-ticker .fst-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9a227;
  flex-shrink: 0;
}
/* Hide widget wrapper styling */
.widget_custom_html:has(.footer-states-ticker) {
  padding: 0 !important;
  margin: 0 !important;
}
.site-footer-row-container:has(.footer-states-ticker) {
  padding: 0 !important;
}
.site-footer-row-container:has(.footer-states-ticker) .site-container {
  max-width: 100% !important;
  padding: 0 !important;
}