
/* =========================================================
   ELCHPOWER V5.2 – MASTER SYSTEM
   ========================================================= */

:root{
  --ep-header-h:92px;
  --ep-subnav-h:62px;
  --ep-footer-h:70px;
  --ep-gold:#d5aa50;
  --ep-cream:#f3f0e6;
  --ep-dark:#07140d;
  --ep-muted:#93a098;
}

/* Shared page frame */
body{
  background:var(--ep-dark);
}

/* Header: same height everywhere */
.site-header{
  min-height:var(--ep-header-h) !important;
  height:var(--ep-header-h) !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  align-items:center !important;
}
.site-header .brand img{
  width:78px !important;
  height:70px !important;
  object-fit:contain;
}
.main-nav{
  gap:29px !important;
}
.main-nav a{
  font-size:.86rem !important;
}
.main-nav .nav-contact{
  min-height:42px !important;
  padding:0 17px !important;
  display:inline-flex !important;
  align-items:center !important;
  border-radius:999px;
}

/* Stronger service navigation */
.ep-master-service-nav{
  height:var(--ep-subnav-h);
  border-top:1px solid rgba(213,170,80,.06);
  border-bottom:1px solid rgba(213,170,80,.10);
  background:rgba(6,18,12,.96);
  display:flex;
  align-items:center;
  position:relative;
  z-index:25;
}
.ep-master-shell{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
}
.ep-master-service-nav .ep-master-shell{
  height:100%;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  align-items:stretch;
}
.ep-master-service-link{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#7e8b83;
  border-left:1px solid rgba(243,240,230,.035);
  transition:background .25s ease,color .25s ease;
}
.ep-master-service-link:last-child{
  border-right:1px solid rgba(243,240,230,.035);
}
.ep-master-service-link span{
  color:#967b3d;
  font-size:.72rem;
  font-weight:800;
}
.ep-master-service-link strong{
  font-size:.84rem;
  font-weight:600;
}
.ep-master-service-link::after{
  content:"";
  position:absolute;
  left:20%;
  right:20%;
  bottom:0;
  height:2px;
  background:var(--ep-gold);
  transform:scaleX(0);
  transition:transform .25s ease;
}
.ep-master-service-link:hover,
.ep-master-service-link.active{
  color:#e7dfc8;
  background:rgba(213,170,80,.035);
}
.ep-master-service-link.active span{
  color:var(--ep-gold);
}
.ep-master-service-link.active::after,
.ep-master-service-link:hover::after{
  transform:scaleX(1);
}

/* Service overview: use the same available frame */
body.services-overview-page{
  min-height:100vh !important;
  display:grid !important;
  grid-template-rows:var(--ep-header-h) var(--ep-subnav-h) 1fr var(--ep-footer-h) !important;
  overflow:hidden !important;
}
body.services-overview-page .v47-overview,
body.services-overview-page .clickfirst-overview{
  min-height:0 !important;
  overflow:hidden !important;
}
body.services-overview-page .service-hub-v47{
  min-height:0 !important;
  height:100% !important;
}

/* Detail pages: exact same frame */
body:has(.ep-detail-main){
  min-height:100vh !important;
  height:100vh !important;
  display:grid !important;
  grid-template-rows:var(--ep-header-h) var(--ep-subnav-h) 1fr var(--ep-footer-h) !important;
  overflow:hidden !important;
}
body:has(.ep-detail-main) .ep-detail-main{
  min-height:0 !important;
  overflow:hidden !important;
}
body:has(.ep-detail-main) .ep-detail-screen{
  height:100% !important;
  min-height:0 !important;
}
body:has(.ep-detail-main) .ep-detail-grid{
  height:100%;
  min-height:0;
  padding-top:28px !important;
  padding-bottom:24px !important;
}

/* Unify detail typographic proportions */
.ep-detail-left h1{
  font-size:clamp(2.4rem,3.45vw,4rem) !important;
  line-height:1 !important;
  max-width:10ch !important;
}
.ep-detail-lead{
  font-size:.92rem !important;
  line-height:1.68 !important;
}
.ep-detail-right{
  min-height:0 !important;
  height:min(440px,90%);
}
.ep-detail-point{
  min-height:0;
  padding:14px 15px !important;
}
.ep-detail-point strong{
  font-size:.82rem !important;
}
.ep-detail-focus{
  padding:30px !important;
}

/* Homepage same header/footer proportions */
body:has(.v5-home-main){
  min-height:100vh;
}
body:has(.v5-home-main) .v5-home-screen{
  min-height:calc(100vh - var(--ep-header-h) - var(--ep-footer-h)) !important;
}

/* Master footer */
.ep-master-footer{
  height:var(--ep-footer-h);
  min-height:var(--ep-footer-h);
  border-top:1px solid rgba(243,240,230,.055);
  background:#06110b;
  position:relative;
  z-index:30;
}
.ep-master-footer .ep-master-shell{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}
.ep-master-footer-left,
.ep-master-footer-right{
  display:flex;
  align-items:center;
  gap:18px;
}
.ep-master-footer-left span,
.ep-master-footer-left a,
.ep-master-footer-right span,
.ep-master-partner-trigger{
  font-size:.78rem;
  white-space:nowrap;
}
.ep-master-footer-left span,
.ep-master-footer-left a{
  color:#7d8a82;
}
.ep-master-footer-left a:hover{
  color:#d7c68f;
}
.ep-master-footer-right>span{
  color:#8d7743;
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:.66rem;
}
.ep-master-partner-trigger{
  appearance:none;
  border:0;
  background:transparent;
  color:#a99b73;
  font-family:inherit;
  cursor:pointer;
  padding:0;
}
.ep-master-partner-trigger:hover{
  color:var(--ep-gold);
}
.ep-master-partner-popover{
  position:absolute;
  right:max(20px,calc((100vw - 1180px)/2));
  bottom:76px;
  width:min(320px,calc(100vw - 40px));
  padding:18px;
  border:1px solid rgba(213,170,80,.16);
  border-radius:15px;
  background:rgba(8,23,15,.98);
  box-shadow:0 22px 54px rgba(0,0,0,.3);
  backdrop-filter:blur(12px);
}
.ep-master-partner-popover[hidden]{display:none}
.ep-master-partner-popover strong{
  display:block;color:#f2eee3;font-size:.94rem;margin-bottom:5px
}
.ep-master-partner-popover>span{
  display:block;color:#91a096;font-size:.76rem;margin-bottom:9px
}
.ep-master-partner-popover p{
  color:#7d8a82;font-size:.72rem;margin:0 0 10px
}
.ep-master-partner-popover a{
  display:inline-block;color:var(--ep-gold);font-size:.76rem;margin-bottom:10px
}
.ep-master-partner-popover small{
  display:block;color:#647168;font-size:.64rem;line-height:1.45
}

/* Remove prior page-specific lower bars if styling survives in markup */
.ep-process-rail,
.ep-utility-footer,
.ep-home-utility-footer,
.footer-v46{
  display:none !important;
}

/* Keep V5 status rail but make it same visual rhythm */
.v5-home-bottom-inner{
  min-height:54px !important;
  font-size:.73rem !important;
}

/* Short screens */
@media(min-width:980px) and (max-height:820px){
  :root{
    --ep-header-h:84px;
    --ep-subnav-h:56px;
    --ep-footer-h:62px;
  }
  .site-header .brand img{
    width:70px !important;height:62px !important;
  }
  .main-nav a{font-size:.8rem !important}
  .ep-master-service-link strong{font-size:.78rem}
  .ep-master-service-link span{font-size:.68rem}
  .ep-detail-left h1{font-size:clamp(2.1rem,3vw,3.4rem) !important}
  .ep-detail-grid{padding-top:16px !important;padding-bottom:14px !important}
  .ep-detail-right{height:min(360px,90%)}
  .ep-master-footer-left span,
  .ep-master-footer-left a,
  .ep-master-partner-trigger{font-size:.7rem}
}

/* Tablet/mobile */
@media(max-width:979px){
  body.services-overview-page,
  body:has(.ep-detail-main){
    display:block !important;
    height:auto !important;
    overflow:auto !important;
  }
  .site-header{
    height:auto !important;
    min-height:78px !important;
  }
  .ep-master-service-nav{
    height:auto;
    overflow-x:auto;
  }
  .ep-master-service-nav .ep-master-shell{
    width:max-content;
    min-width:100%;
    grid-template-columns:repeat(4,minmax(150px,1fr));
  }
  .ep-master-service-link{
    min-height:58px;
    padding:0 16px;
  }
  .ep-master-footer{
    height:auto;
    min-height:70px;
  }
  .ep-master-footer .ep-master-shell{
    padding:12px 0;
    flex-wrap:wrap;
  }
  .ep-master-footer-left{
    flex-wrap:wrap;
  }
  .ep-master-footer-right{
    margin-left:auto;
  }
}
