
/* =========================================================
   AWEBZONE V21 — HEADER AVATAR + GLOBAL CONTRAST SAFETY FIX
   ========================================================= */

/* ---------------------------------------------------------
   1. HEADER OWNER PHOTO — definitive rendering
--------------------------------------------------------- */
.az-site-header .az-header-avatar,
.site-header .az-header-avatar,
header .az-header-avatar,
.az-topbar .az-header-avatar,
.az-user-avatar,
.az-header-user,
.az-header-profile,
header .az-avatar,
.az-topbar .az-avatar{
  background-image:url('awebzone-owner-profile.png')!important;
  background-repeat:no-repeat!important;
  background-size:contain!important;
  background-position:center center!important;
  background-color:#111315!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
}

.az-site-header .az-header-avatar img,
.site-header .az-header-avatar img,
header .az-header-avatar img,
.az-topbar .az-header-avatar img,
.az-user-avatar img,
.az-header-user img,
.az-header-profile img,
header .az-avatar img,
.az-topbar .az-avatar img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:scale(.80)!important;
  transform-origin:center center!important;
  opacity:1!important;
  visibility:visible!important;
}

/* Header-specific fallback: force the supplied image into the visual layer. */
.az-site-header .az-header-avatar::before,
.site-header .az-header-avatar::before,
header .az-header-avatar::before,
.az-user-avatar::before,
.az-header-user::before,
.az-header-profile::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:url('awebzone-owner-profile.png') center/contain no-repeat!important;
  z-index:2!important;
  pointer-events:none!important;
}

/* ---------------------------------------------------------
   2. GLOBAL TEXT CONTRAST SAFETY SYSTEM
   No same-colour foreground/background combinations.
--------------------------------------------------------- */
:root{
  --az-contrast-dark:#17191d;
  --az-contrast-light:#ffffff;
  --az-contrast-muted:#5f6872;
  --az-contrast-green:#79c800;
}

/* Dark/black surfaces always receive readable light text. */
[class*="dark"],
[class*="black"],
[class*="pricing"],
[class*="price"],
.az-pricing,
.az-price-card,
.az-pricing-card,
.az-pricing-box,
.az-price-box,
.az-plan-card{
  color:var(--az-contrast-dark);
}

/* Explicit dark panels and buttons */
.az-dark,
.az-dark-card,
.az-dark-panel,
.az-dark-box,
.az-pricing-featured,
.az-pricing-card.featured,
.az-price-card.featured,
.az-price-box.featured,
.az-plan-card.featured,
.az-plan-card.is-featured,
.az-button-dark,
.az-nav-cta{
  color:var(--az-contrast-light)!important;
}

/* Every text descendant on intentional dark surfaces must remain readable. */
.az-dark *,
.az-dark-card *,
.az-dark-panel *,
.az-dark-box *,
.az-pricing-featured *,
.az-pricing-card.featured *,
.az-price-card.featured *,
.az-price-box.featured *,
.az-plan-card.featured *,
.az-plan-card.is-featured *,
.az-button-dark *,
.az-nav-cta *{
  color:inherit!important;
}

/* Correct the common black-box / black-text pricing issue directly. */
.az-pricing-featured,
.az-pricing-card.featured,
.az-price-card.featured,
.az-price-box.featured,
.az-plan-card.featured,
.az-plan-card.is-featured{
  background-color:#17191d!important;
  color:#ffffff!important;
}
.az-pricing-featured h1,
.az-pricing-featured h2,
.az-pricing-featured h3,
.az-pricing-featured h4,
.az-pricing-featured p,
.az-pricing-featured li,
.az-pricing-featured span,
.az-pricing-featured strong,
.az-pricing-card.featured h1,
.az-pricing-card.featured h2,
.az-pricing-card.featured h3,
.az-pricing-card.featured h4,
.az-pricing-card.featured p,
.az-pricing-card.featured li,
.az-pricing-card.featured span,
.az-pricing-card.featured strong,
.az-price-card.featured *,
.az-price-box.featured *,
.az-plan-card.featured *,
.az-plan-card.is-featured *{
  color:#ffffff!important;
}

/* CTA badges/buttons inside dark pricing cards stay visually distinct. */
.az-pricing-featured a,
.az-pricing-card.featured a,
.az-price-card.featured a,
.az-price-box.featured a,
.az-plan-card.featured a,
.az-plan-card.is-featured a{
  color:#17191d!important;
  background:#9cff00!important;
}

/* Light cards always use dark readable copy. */
.az-post,
.az-page-post,
.az-blog-card,
.az-problem-post,
.az-final-post,
.az-service-feed-grid a,
.az-pricing-card:not(.featured),
.az-price-card:not(.featured),
.az-price-box:not(.featured),
.az-plan-card:not(.featured){
  color:#20242a!important;
}
.az-post h1, .az-post h2, .az-post h3,
.az-page-post h1, .az-page-post h2, .az-page-post h3,
.az-blog-card h1, .az-blog-card h2, .az-blog-card h3,
.az-pricing-card:not(.featured) h1,
.az-pricing-card:not(.featured) h2,
.az-pricing-card:not(.featured) h3,
.az-price-card:not(.featured) h1,
.az-price-card:not(.featured) h2,
.az-price-card:not(.featured) h3,
.az-price-box:not(.featured) h1,
.az-price-box:not(.featured) h2,
.az-price-box:not(.featured) h3,
.az-plan-card:not(.featured) h1,
.az-plan-card:not(.featured) h2,
.az-plan-card:not(.featured) h3{
  color:#20242a!important;
}
.az-post p, .az-page-post p, .az-blog-card p,
.az-pricing-card:not(.featured) p,
.az-price-card:not(.featured) p,
.az-price-box:not(.featured) p,
.az-plan-card:not(.featured) p{
  color:#5f6872!important;
}

/* Generic accessibility safety for text placed directly on very dark backgrounds. */
[style*="background:#000"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background: #000"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background:#111"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background: #111"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background-color:#000"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background-color: #000"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background-color:#111"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small),
[style*="background-color: #111"] :is(h1,h2,h3,h4,h5,h6,p,span,li,strong,small){
  color:#fff!important;
}

/* Ensure links are visible against their local surfaces. */
.az-post a:not(.az-nav-cta),
.az-page-post a:not(.az-nav-cta),
.az-blog-card a:not(.az-nav-cta){
  color:#4d7800;
}

/* Mobile contrast reinforcement */
@media(max-width:820px){
  .az-pricing-featured,
  .az-pricing-card.featured,
  .az-price-card.featured,
  .az-price-box.featured,
  .az-plan-card.featured,
  .az-plan-card.is-featured{
    color:#fff!important;
  }
}
