/* REDCOWEB Global Header, Footer & Responsive System v3 — 2026-10-01
   Final public layer: keeps every public page aligned with the homepage shell. */

:root{
  --rw-page-max:1180px;
  --rw-page-gutter:40px;
  --rw-mobile-gutter:24px;
  --rw-header-h:82px;
}
html,body{max-width:100%;overflow-x:clip}
body{min-width:320px}
#main{min-width:0;overflow-x:clip}
#main :where(img,svg,video,canvas,iframe){max-width:100%}
#main :where(pre,table){max-width:100%}
#main pre{overflow:auto}
#main table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
#main :where(.shell,.rw5-shell,.rw-sv3-shell,.rahkar-shell,.rbiz-shell,.rbc-shell,.rwb-shell){
  width:min(var(--rw-page-max),calc(100% - var(--rw-page-gutter)))!important;
  max-width:var(--rw-page-max)!important;
  margin-inline:auto!important;
  min-width:0!important;
}

/* One header language everywhere — identical to homepage. */
body .site-header{
  height:var(--rw-header-h)!important;
  min-height:var(--rw-header-h)!important;
  position:sticky!important;
  top:0!important;
  z-index:120!important;
  border-bottom:1px solid #e8e2d9!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 8px 28px rgba(70,84,93,.055)!important;
  backdrop-filter:blur(14px)!important;
  -webkit-backdrop-filter:blur(14px)!important;
}
body .site-header .header-inner{
  width:min(var(--rw-page-max),calc(100% - var(--rw-page-gutter)))!important;
  max-width:var(--rw-page-max)!important;
  height:var(--rw-header-h)!important;
  min-height:var(--rw-header-h)!important;
  margin-inline:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:clamp(12px,1.6vw,24px)!important;
  padding:0!important;
}
body .rw-header-brand{flex:0 0 auto!important;min-width:0}
body .rw-header-logo{
  display:block!important;
  width:122px!important;
  height:62px!important;
  max-width:none!important;
  object-fit:contain!important;
}
body .main-nav{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:clamp(12px,1.35vw,21px)!important;
  margin-inline:auto!important;
  flex:1 1 auto!important;
}
body .main-nav a{
  min-width:0!important;
  white-space:nowrap!important;
  font-size:13.5px!important;
  line-height:1.4!important;
  font-weight:700!important;
  color:#53636b!important;
}
body .main-nav a:hover{color:#2f7f87!important}
body .header-actions{
  flex:0 0 auto!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
body .rw-header-phone{
  font-size:13px!important;
  font-weight:700!important;
  color:#53636b!important;
}
body .public-locales{
  display:flex!important;
  align-items:center!important;
  gap:2px!important;
}
body .public-locales a{
  min-width:34px!important;
  min-height:34px!important;
  padding:4px 7px!important;
  border-radius:10px!important;
  font-size:10px!important;
}
body .public-locales a.active{background:#edf6f5!important;color:#2f6b72!important}
body .mobile-menu{display:none!important}

/* Keep the same luxury footer on every route; neutralize inner-page footer overrides. */
body .site-footer.rw-footer.rw-lux-footer{
  position:relative!important;
  overflow:hidden!important;
  margin-top:clamp(54px,6vw,96px)!important;
  padding:26px 0 0!important;
  border-top:1px solid rgba(183,138,63,.18)!important;
  background:
    radial-gradient(circle at 9% 14%,rgba(216,183,109,.12),transparent 27%),
    radial-gradient(circle at 88% 4%,rgba(183,138,63,.08),transparent 25%),
    linear-gradient(145deg,#faf7f1 0%,#fff 48%,#fbf7ef 100%)!important;
  content-visibility:visible!important;
  contain:none!important;
}
body .site-footer.rw-footer.rw-lux-footer::before,
body .site-footer.rw-footer.rw-lux-footer::after{content:none!important;display:none!important}
body .rw-lux-footer-shell{width:min(1680px,calc(100% - 32px))!important}
body .rw-lux-footer-main>*,
body .rw-lux-footer-subgrid>*{min-width:0!important}

/* Generic anti-overflow rules for all existing page families. */
#main :where(
  .rw-hero-split,.rw-contact-layout,.rw-about-story,.rw-feature-grid,.rw-step-grid,.rw-values,.rw-timeline,.rw-stat-grid,
  .ai-hero-grid,.ai-demo-grid,.ai-principle-grid,.ai-solution-grid,.ai-architecture-grid,
  .rw-sv3-hero-grid,.rw-sv3-story-grid,.rw-sv3-service-grid,.rw-sv3-process-grid,
  .rahkar-hero-grid,.rahkar-industry-grid,.rahkar-wizard-steps,.rahkar-benefit-grid,
  .blog26-hero-grid,.blog26-grid,.blog26-feature,
  .rbiz-hero-grid,.rbiz-grid,.rbiz-stats,
  .rbc-hero-grid,.rbc-overview-grid,.rbc-dual-showcase,.rbc-cap-grid,.rbc-business-grid,.rbc-pillar-grid,.rbc-tech-grid,.rbc-gallery,.rbc-fit-grid,.rbc-faq-grid,.rbc-related-grid,
  .rwb-hero-grid,.rwb-principles,.rwb-case,.rwb-product-grid,.rwb-architecture-grid,.rwb-contact-grid,
  .rc-project-grid,.rc-service-grid,
  .rw-article-layout,.rw-article-gallery-grid,
  .rw-careers .career-hero-grid,.rw-careers .role-grid,.rw-careers .application-layout,.rw-careers .form-grid,
  .rwb-field-grid
)>*{min-width:0!important}

#main :where(
  .rw-service-cover,.rw-case-cover,.ai-hero-visual,.rw-sv3-hero-media,.rw-sv3-story-media,
  .rahkar-configurator,.rahkar-product-stage,.blog26-hero-art,.blog26-feature-media,
  .rbiz-hero-visual,.rbiz-card-media,.rbc-hero-visual,.rbc-screen,.rwb-hero-visual,.rwb-case-screen,
  .rc-card-visual
){max-width:100%!important;min-width:0!important}

#main :where(.rw-actions,.ai-actions,.rw-sv3-actions,.rahkar-hero-actions,.rbiz-actions,.rbc-hero-actions,.rwb-hero-actions,.rc-projects-actions){
  flex-wrap:wrap!important
}
#main :where(.rw-form input,.rw-form textarea,.rw-form select,.rwb-form input,.rwb-form textarea,.rwb-form select,.rw-careers input,.rw-careers textarea,.rw-careers select){
  width:100%!important;max-width:100%!important;min-width:0!important
}
/* Honeypot fields must stay available to bots without expanding the RTL document width. */
#main .hp-field,#main .rwb-hp,#main .rw-careers .hp-field{
  position:absolute!important;
  inset-inline-start:0!important;
  left:auto!important;
  top:0!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  pointer-events:none!important;
  opacity:0!important
}
#main .hp-field :where(input,textarea,select),#main .rwb-hp :where(input,textarea,select){
  width:1px!important;min-width:1px!important;max-width:1px!important;height:1px!important;padding:0!important;margin:0!important
}
#main :where(.rw-article-cover,.rw-article-media-section,.rw-rich-body){min-width:0!important}
#main :where(.rw-rich-body img,.rw-prose img,.rw-article-cover img){height:auto!important}

/* Tablet: all major two-column hero/detail layouts become one clean column. */
@media(max-width:1000px){
  :root{--rw-page-gutter:32px}
  body .rw-header-phone{display:none!important}
  body .main-nav{display:none!important}
  body .mobile-menu{
    display:block!important;
    position:relative!important;
    flex:0 0 auto!important;
  }
  body .mobile-menu summary{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    display:grid!important;place-items:center!important;
    border:1px solid #e1e7e6!important;border-radius:12px!important;
    background:#fff!important;color:#43545c!important;
    font-size:20px!important;line-height:1!important;cursor:pointer!important;
    list-style:none!important;
  }
  body .mobile-menu summary::-webkit-details-marker{display:none}
  body .mobile-menu nav{
    position:fixed!important;
    z-index:150!important;
    top:calc(var(--rw-header-h) + 8px)!important;
    inset-inline:14px!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(72vh,620px)!important;
    overflow:auto!important;
    padding:10px!important;
    border:1px solid #dbe5e2!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 22px 56px rgba(55,73,78,.16)!important;
  }
  body .mobile-menu nav a{
    display:flex!important;align-items:center!important;
    min-height:44px!important;padding:9px 11px!important;
    border-radius:10px!important;color:#4c5e66!important;
    font-size:14px!important;font-weight:700!important;
  }
  body .mobile-menu nav a:hover{background:#f3f8f7!important;color:#2f747c!important}

  #main :where(
    .rw-hero-split,.rw-contact-layout,.rw-about-story,
    .ai-hero-grid,.ai-demo-grid,
    .rw-sv3-hero-grid,.rw-sv3-story-grid,
    .rahkar-hero-grid,.rahkar-wizard,
    .blog26-hero-grid,.blog26-feature,
    .rbiz-hero-grid,
    .rbc-hero-grid,.rbc-overview-grid,.rbc-dual-showcase,.rbc-business-grid,.rbc-fit-grid,
    .rwb-hero-grid,.rwb-case,.rwb-architecture-grid,.rwb-contact-grid,
    .rw-article-layout,
    .rw-careers .career-hero-grid,.rw-careers .application-layout
  ){
    grid-template-columns:minmax(0,1fr)!important;
  }
  #main :where(.rw-sv3-hero-grid,.rahkar-hero-grid,.blog26-hero-grid,.rbiz-hero-grid,.rbc-hero-grid,.rwb-hero-grid,.ai-hero-grid){
    gap:clamp(26px,5vw,48px)!important;
  }
  #main :where(.rw-sv3-hero-media,.rahkar-configurator,.blog26-hero-art,.rbiz-hero-visual,.rbc-hero-visual,.rwb-hero-visual,.ai-hero-visual){
    width:100%!important;max-width:760px!important;margin-inline:auto!important
  }

  #main :where(
    .rw-feature-grid,.rw-step-grid,.rw-values,.rw-timeline,.rw-stat-grid,
    .ai-principle-grid,.ai-solution-grid,
    .rw-sv3-service-grid,.rw-sv3-process-grid,
    .rahkar-industry-grid,.rahkar-benefit-grid,
    .blog26-grid,.rbiz-grid,.rbc-cap-grid,.rbc-pillar-grid,.rbc-tech-grid,.rbc-related-grid,
    .rwb-principles,.rwb-product-grid,.rc-project-grid,.rc-service-grid,.rw-careers .role-grid
  ){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Mobile: one-column content, safe controls, no horizontal drift. */
@media(max-width:720px){
  :root{--rw-page-gutter:var(--rw-mobile-gutter);--rw-header-h:72px}
  body .site-header{height:72px!important;min-height:72px!important}
  body .site-header .header-inner{
    width:min(100% - var(--rw-mobile-gutter),var(--rw-page-max))!important;
    height:72px!important;min-height:72px!important;
    gap:8px!important;
  }
  body .rw-header-logo{width:104px!important;height:52px!important}
  body .header-actions{margin-inline-start:auto!important;gap:4px!important}
  body .header-cta,body .rw-header-phone{display:none!important}
  body .public-locales a{min-width:32px!important;min-height:32px!important;padding:3px 6px!important;font-size:9.5px!important}
  body .mobile-menu{order:2!important}
  body .header-actions{order:3!important}
  body .rw-header-brand{order:1!important}

  #main :where(.shell,.rw5-shell,.rw-sv3-shell,.rahkar-shell,.rbiz-shell,.rbc-shell,.rwb-shell){
    width:min(100% - var(--rw-mobile-gutter),var(--rw-page-max))!important
  }

  #main :where(
    .rw-feature-grid,.rw-step-grid,.rw-values,.rw-timeline,.rw-stat-grid,.client-wall,.article-grid,
    .ai-principle-grid,.ai-solution-grid,
    .rw-sv3-service-grid,.rw-sv3-process-grid,
    .rahkar-industry-grid,.rahkar-benefit-grid,
    .blog26-grid,.rbiz-grid,.rbiz-stats,
    .rbc-cap-grid,.rbc-pillar-grid,.rbc-tech-grid,.rbc-gallery,.rbc-fit-grid,.rbc-faq-grid,.rbc-related-grid,
    .rwb-principles,.rwb-product-grid,
    .rc-project-grid,.rc-service-grid,
    .rw-article-gallery-grid,
    .rw-careers .role-grid,.rw-careers .form-grid,.rwb-field-grid
  ){grid-template-columns:minmax(0,1fr)!important}

  #main :where(.rw-actions,.ai-actions,.rw-sv3-actions,.rahkar-hero-actions,.rbiz-actions,.rbc-hero-actions,.rwb-hero-actions,.rc-projects-actions){
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
  }
  #main :where(.rw-actions a,.ai-actions a,.rw-sv3-actions a,.rahkar-hero-actions a,.rbiz-actions a,.rbc-hero-actions a,.rwb-hero-actions a,.rc-projects-actions a){
    width:100%!important;justify-content:center!important
  }

  #main :where(.rw-sv3-proof,.rahkar-proof,.blog26-pills,.rbiz-filters,.rw-tech-strip,.rwb-tags,.rw-pills){
    max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important
  }
  #main :where(.rw-sv3-proof,.rahkar-proof,.blog26-pills,.rbiz-filters,.rw-tech-strip,.rwb-tags,.rw-pills)::-webkit-scrollbar{display:none}

  #main :where(.rw-sv3-hero-media,.rahkar-configurator,.blog26-hero-art,.rbiz-hero-visual,.rbc-hero-visual,.rwb-hero-visual,.ai-hero-visual){
    max-width:100%!important
  }
  #main :where(.rw-sv3-device-viewport,.rw-sv3-glass-frame,.rbiz-laptop,.rbc-screen,.rwb-browser){
    max-width:100%!important;min-width:0!important
  }
  #main :where(.rw-card,.rw-step,.role-card,.rbc-tech-card,.rbc-showcase-card,.rwb-product,.rc-service-card){
    max-width:100%!important
  }

  .aiw-app,.aiw-shell,.aiw-main,.aiw-stage,.aiw-composer-wrap{max-width:100%!important;min-width:0!important}
  .aiw-composer{width:100%!important;max-width:100%!important}
  .aiw-suggestions{display:grid!important;grid-template-columns:1fr!important}
  .rr-page,.rq-section,.rr-game-frame,.rq-game,.rq-stage{max-width:100%!important;min-width:0!important}

  body .site-footer.rw-footer.rw-lux-footer{margin-top:44px!important;padding-top:12px!important}
  body .rw-lux-footer-shell{width:min(100% - 18px,1680px)!important;padding:20px 16px!important;border-radius:20px!important}
  body .rw-lux-footer-main{grid-template-columns:1fr!important;gap:26px!important}
  body .rw-lux-brand{grid-column:auto!important}
  body .rw-lux-map{grid-column:auto!important;min-height:320px!important}
  body .rw-lux-map iframe{height:320px!important}
  body .rw-lux-footer-subgrid{grid-template-columns:1fr!important;grid-template-areas:"features" "newsletter" "actions"!important}
  body .rw-lux-features{grid-template-columns:1fr!important}
  body .rw-lux-actions{flex-direction:column!important;align-items:stretch!important}
  body .rw-lux-consult{width:100%!important;min-width:0!important}
  body .rw-lux-bottom-inner{width:min(100% - 28px,1680px)!important;grid-template-columns:1fr!important;text-align:center!important}
  body .rw-lux-bottom-inner>span{ text-align:center!important }
  body .rw-lux-bottom nav{flex-wrap:wrap!important;white-space:normal!important}
}

@media(max-width:420px){
  :root{--rw-mobile-gutter:20px}
  body .rw-header-logo{width:96px!important;height:48px!important}
  body .public-locales a{min-width:30px!important;padding-inline:4px!important}
  body .mobile-menu summary{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
  body .rw-lux-footer-shell{width:min(100% - 14px,1680px)!important;padding:18px 14px!important}
}
@media(prefers-reduced-motion:reduce){
  body .site-header,*{scroll-behavior:auto!important}
}
