/* ==========================================================
   CHERITAN SITE SYSTEM 2.2 — FINAL CROSS-PAGE FIXES
   - Restores mobile Call / WhatsApp / CTA bar on About
   - Keeps mobile action bars consistent across designed pages
   - Makes fixed social icons slightly larger without crowding content
   ========================================================== */

/* A little more presence for the fixed social rail on every Cheritan-designed page. */
:is(
  .cht-site.cht-classic,
  .cht-about-page,
  .cht-courses-page,
  .cht-makeup-page,
  .cht-beauty-page,
  .cht-studio-page,
  .cht-blog-page,
  .cht-post-page,
  .cht-contact-page,
  .cht-privacy-page
) .cht-social-rail{
  width:42px!important;
  overflow:visible!important;
}

:is(
  .cht-site.cht-classic,
  .cht-about-page,
  .cht-courses-page,
  .cht-makeup-page,
  .cht-beauty-page,
  .cht-studio-page,
  .cht-blog-page,
  .cht-post-page,
  .cht-contact-page,
  .cht-privacy-page
) .cht-social-rail .cht-social-link{
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  flex:0 0 42px!important;
}

:is(
  .cht-site.cht-classic,
  .cht-about-page,
  .cht-courses-page,
  .cht-makeup-page,
  .cht-beauty-page,
  .cht-studio-page,
  .cht-blog-page,
  .cht-post-page,
  .cht-contact-page,
  .cht-privacy-page
) .cht-social-rail .cht-social-icon{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  flex-basis:20px!important;
  background-size:contain!important;
}

/* Footer social buttons: modest increase only. */
:is(
  .cht-site.cht-classic,
  .cht-about-page,
  .cht-courses-page,
  .cht-makeup-page,
  .cht-beauty-page,
  .cht-studio-page,
  .cht-blog-page,
  .cht-post-page,
  .cht-contact-page,
  .cht-privacy-page
) .cht-footer-social .cht-social-link{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
}

:is(
  .cht-site.cht-classic,
  .cht-about-page,
  .cht-courses-page,
  .cht-makeup-page,
  .cht-beauty-page,
  .cht-studio-page,
  .cht-blog-page,
  .cht-post-page,
  .cht-contact-page,
  .cht-privacy-page
) .cht-footer-social .cht-social-icon{
  width:18px!important;
  height:18px!important;
  flex-basis:18px!important;
}

/* Desktop stays free of the mobile bottom action bar. */
@media(min-width:981px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar{
    display:none!important;
  }
}

/* Tablet + phone: guarantee Call / WhatsApp / page CTA bar is present. */
@media(max-width:980px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ){
    padding-bottom:max(76px,calc(62px + env(safe-area-inset-bottom,0px)))!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:10050!important;
    display:grid!important;
    grid-template-columns:.9fr 1.05fr 1.25fr!important;
    width:100%!important;
    min-height:60px!important;
    margin:0!important;
    padding:0 0 env(safe-area-inset-bottom,0px)!important;
    background:#fff!important;
    box-shadow:0 -5px 22px rgba(0,0,0,.16)!important;
    visibility:visible!important;
    opacity:1!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar > a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    min-width:0!important;
    min-height:60px!important;
    margin:0!important;
    padding:7px 4px!important;
    border:0!important;
    border-right:1px solid #dfe2e7!important;
    background:#fff!important;
    color:#303640!important;
    font-size:9.5px!important;
    font-weight:800!important;
    line-height:1.15!important;
    text-align:center!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    visibility:visible!important;
    opacity:1!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar > a:nth-child(2),
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar .cht-mobile-wa{
    background:#128c4a!important;
    color:#fff!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar > a:last-child{
    border-right:0!important;
    background:#f4a98a!important;
    color:#303640!important;
  }

  /* Explicit About-page recovery: old About CSS contained a historical display:none rule. */
  .cht-about-page .cht-mobile-bar{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
  }

  /* Slightly larger social rail on tablet without covering content. */
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail{
    width:38px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-link{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    flex-basis:38px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-icon{
    width:18px!important;
    height:18px!important;
    min-width:18px!important;
    flex-basis:18px!important;
  }
}

@media(max-width:650px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail{
    width:34px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-link{
    width:34px!important;
    min-width:34px!important;
    height:36px!important;
    min-height:36px!important;
    flex-basis:36px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-icon{
    width:17px!important;
    height:17px!important;
    min-width:17px!important;
    flex-basis:17px!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar{
    grid-template-columns:.82fr 1.02fr 1.32fr!important;
    min-height:58px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar > a{
    min-height:58px!important;
    padding:6px 2px!important;
    gap:3px!important;
    font-size:8.2px!important;
  }
}

@media(max-width:360px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-mobile-bar > a{
    font-size:7.6px!important;
  }
}

/* ==========================================================
   CHERITAN SITE SYSTEM 2.3 — MOBILE SOCIAL RAIL DRAWER
   Desktop: social icons stay visible.
   Tablet/mobile: rail is hidden off-canvas and opens on tap.
   This prevents icons from covering page text.
   ========================================================== */
@media(max-width:980px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail{
    --cht-social-rail-width:38px;
    position:fixed!important;
    left:0!important;
    top:50%!important;
    width:var(--cht-social-rail-width)!important;
    transform:translate3d(calc(-1 * var(--cht-social-rail-width)), -50%, 0)!important;
    overflow:visible!important;
    border-radius:0 6px 6px 0!important;
    box-shadow:0 7px 20px rgba(17,24,39,.18)!important;
    transition:transform .22s ease!important;
    will-change:transform;
    z-index:9998!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail.is-open,
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail:focus-within{
    transform:translate3d(0,-50%,0)!important;
  }

  /* Small tab always remains visible. Tap it to reveal the icons. */
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-toggle{
    position:absolute!important;
    left:100%!important;
    top:50%!important;
    width:22px!important;
    height:48px!important;
    min-width:22px!important;
    min-height:48px!important;
    margin:0!important;
    padding:0!important;
    transform:translateY(-50%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:0 8px 8px 0!important;
    background:#3f4551!important;
    color:#fff!important;
    box-shadow:5px 0 13px rgba(17,24,39,.16)!important;
    font:700 17px/1 Arial,sans-serif!important;
    cursor:pointer!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
    visibility:visible!important;
    opacity:1!important;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-toggle::before{
    content:"›";
    display:block;
    transform:translateX(1px);
    transition:transform .2s ease;
  }

  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail.is-open .cht-social-toggle::before{
    transform:rotate(180deg) translateX(-1px);
  }

  /* Prevent hidden links from taking taps while drawer is closed. */
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail:not(.is-open) .cht-social-link{
    pointer-events:none!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail.is-open .cht-social-link{
    pointer-events:auto!important;
  }
}

@media(max-width:650px){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail{
    --cht-social-rail-width:36px;
    width:36px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-link{
    width:36px!important;
    min-width:36px!important;
    height:38px!important;
    min-height:38px!important;
    flex-basis:38px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail .cht-social-icon{
    width:18px!important;
    height:18px!important;
    min-width:18px!important;
    flex-basis:18px!important;
  }
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-toggle{
    width:20px!important;
    min-width:20px!important;
    height:44px!important;
    min-height:44px!important;
    font-size:16px!important;
  }
}

/* Devices that genuinely support hover may also reveal the drawer on hover. */
@media(max-width:980px) and (hover:hover) and (pointer:fine){
  :is(
    .cht-site.cht-classic,
    .cht-about-page,
    .cht-courses-page,
    .cht-makeup-page,
    .cht-beauty-page,
    .cht-studio-page,
    .cht-blog-page,
    .cht-post-page,
    .cht-contact-page,
    .cht-privacy-page
  ) .cht-social-rail:hover{
    transform:translate3d(0,-50%,0)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .cht-social-rail,
  .cht-social-toggle::before{transition:none!important}
}

/* ==========================================================
   CHERITAN SITE SYSTEM 2.4 — HERO + SOCIAL RELIABILITY
   ========================================================== */

/* Home hero: use the user's new wide image as one seamless full-width background. */
.cht-site.cht-classic .cht-hero{
  background-color:#252c35!important;
  background-image:
    linear-gradient(90deg,rgba(28,34,43,.94) 0%,rgba(28,34,43,.76) 39%,rgba(28,34,43,.18) 72%,rgba(28,34,43,.05) 100%),
    url("https://cheritan.com/wp-content/uploads/2026/09/Cheritan-ne.png")!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
}

/* Mobile gets its own portrait crop so text remains readable and the face stays visible. */
@media(max-width:650px){
  .cht-site.cht-classic .cht-hero{
    min-height:560px!important;
    background-image:
      linear-gradient(180deg,rgba(28,34,43,.91) 0%,rgba(28,34,43,.72) 43%,rgba(28,34,43,.23) 100%),
      url("https://cheritan.com/wp-content/uploads/2026/09/Cheritan2.png")!important;
    background-size:cover!important;
    background-position:center top!important;
    background-repeat:no-repeat!important;
  }
  .cht-site.cht-classic .cht-hero-left{
    max-width:94%!important;
    position:relative!important;
    z-index:2!important;
  }
}

/* Generic social rail styles also work when a page is still carrying older body content. */
body.cheritan-designed-page .cht-social-rail{
  position:fixed!important;
  left:0!important;
  top:50%!important;
  z-index:9998!important;
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
}
body.cheritan-designed-page .cht-social-rail .cht-social-link{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
}
body.cheritan-designed-page .cht-social-facebook{background:#1877f2!important}
body.cheritan-designed-page .cht-social-linkedin{background:#0a66c2!important}
body.cheritan-designed-page .cht-social-instagram{background:linear-gradient(180deg,#c13584,#e1306c 52%,#f56040)!important}
body.cheritan-designed-page .cht-social-youtube{background:#ff0000!important}
body.cheritan-designed-page .cht-social-icon{
  display:block!important;
  width:19px!important;
  height:19px!important;
  min-width:19px!important;
  background-position:center!important;
  background-size:contain!important;
  background-repeat:no-repeat!important;
  background-image:var(--social-icon)!important;
}
body.cheritan-designed-page .cht-social-facebook{--social-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M14 22v-9h3l.5-4H14V7c0-1 .3-2 2-2h2V1.5C17.3 1.2 16.2 1 15 1c-3.3 0-5 2-5 5v3H7v4h3v9Z'/%3E%3C/svg%3E")}
body.cheritan-designed-page .cht-social-linkedin{--social-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='white'%3E%3Ccircle cx='4.5' cy='4.5' r='2'/%3E%3Cpath d='M3 8h3v13H3zM9 8h3v1.7c1-1.4 2.2-2 3.9-2 3.5 0 5.1 2 5.1 5.7V21h-3.4v-7c0-2.1-.6-3.2-2.2-3.2-1.8 0-2.9 1.2-2.9 3.4V21H9Z'/%3E%3C/g%3E%3C/svg%3E")}
body.cheritan-designed-page .cht-social-instagram{--social-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='1.9'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/g%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='white'/%3E%3C/svg%3E")}
body.cheritan-designed-page .cht-social-youtube{--social-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M6 5h12a4 4 0 0 1 4 4v6a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V9a4 4 0 0 1 4-4Zm4 4v6l6-3Z'/%3E%3C/svg%3E")}

/* Mobile/tablet: keep the rail hidden until the user taps the edge tab. */
@media(max-width:980px){
  body.cheritan-designed-page .cht-social-rail{
    --cht-social-rail-width:40px;
    width:var(--cht-social-rail-width)!important;
    transform:translate3d(calc(-1 * var(--cht-social-rail-width)), -50%, 0)!important;
    overflow:visible!important;
    transition:transform .22s ease!important;
  }
  body.cheritan-designed-page .cht-social-rail.is-open,
  body.cheritan-designed-page .cht-social-rail:focus-within{
    transform:translate3d(0,-50%,0)!important;
  }
  body.cheritan-designed-page .cht-social-rail:not(.is-open) .cht-social-link{pointer-events:none!important}
  body.cheritan-designed-page .cht-social-rail.is-open .cht-social-link{pointer-events:auto!important}
}
