/*
Theme Name: Addiba Automatic Gates - Premium
Theme URI: https://addibaautomaticgatesbarriers.com/
Author: Custom
Description: Premium blue/gold multi-page WordPress theme for Al Addiba Automatic Gates & Barriers.
Version: 2.0.0
Text Domain: addiba-gates
*/
:root{--blue:#0757b8;--blue2:#0a3f88;--yellow:#f5a900;--ink:#111827;--muted:#667085;--soft:#f5f8fc;--white:#fff;--line:#e5eaf0;--radius:18px;--shadow:0 16px 50px rgba(9,40,90,.10)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,Arial,sans-serif;color:var(--ink);line-height:1.7;background:#fff}a{color:inherit;text-decoration:none}img{max-width:100%;height:auto}.container{width:min(1180px,92%);margin:auto}
.topbar{background:var(--blue2);color:#fff;font-size:13px}.topbar .container{display:flex;justify-content:space-between;padding:8px 0;gap:20px}
.site-header{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 3px 18px rgba(0,0,0,.05)}.nav{min-height:82px;display:flex;align-items:center;gap:24px}.brand{display:flex;align-items:center;min-width:180px}.brand img{width:178px;height:auto;display:block}
.menu{display:flex;align-items:center;justify-content:center;gap:20px;list-style:none;margin:0;padding:0;flex:1}.menu li{position:relative}.menu a{font-weight:800;font-size:14px;color:#172033}.menu a:hover{color:var(--blue)}.menu .dropdown{padding-right:15px}.menu .dropdown:after{content:"⌄";position:absolute;right:0;top:1px;color:var(--blue)}.menu .sub-menu{display:none;position:absolute;top:100%;left:-12px;background:#fff;min-width:235px;padding:10px;margin:0;list-style:none;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px}.menu li:hover>.sub-menu{display:block}.menu .sub-menu li{padding:7px 10px}.menu .sub-menu a{font-size:13px;display:block}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 21px;border-radius:10px;font-weight:900;border:0;cursor:pointer;transition:.25s transform,.25s box-shadow}.btn:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(0,0,0,.12)}.btn-primary{background:var(--yellow);color:#111}.btn-blue{background:var(--blue);color:#fff}.btn-dark{background:#111827;color:#fff}
.hero{position:relative;overflow:hidden;color:#fff;background:linear-gradient(120deg,#052f6b,#0757b8 58%,#0c74d6);padding:95px 0 70px}.hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 90% 10%,rgba(245,169,0,.25),transparent 35%);pointer-events:none}.hero-grid{display:grid;grid-template-columns:1.02fr .98fr;gap:48px;align-items:center;position:relative;z-index:2}.eyebrow{color:var(--yellow);font-weight:900;text-transform:uppercase;letter-spacing:1.5px;font-size:13px}.hero h1{font-size:clamp(39px,5vw,65px);line-height:1.03;margin:13px 0 20px;letter-spacing:-2px}.hero p{font-size:18px;color:#eaf2ff;max-width:650px}.hero-visual{position:relative;min-height:420px}.gate-scene{position:absolute;inset:0;border-radius:26px;background:linear-gradient(135deg,#dfe8f3,#fff);overflow:hidden;box-shadow:0 25px 70px rgba(0,0,0,.25)}.gate-scene:before{content:"";position:absolute;left:8%;right:8%;bottom:26%;height:44%;background:repeating-linear-gradient(0deg,#26313b 0 12px,#101820 12px 22px);border:8px solid #111820;transform:perspective(500px) rotateX(3deg);box-shadow:0 18px 30px rgba(0,0,0,.25)}.gate-post{position:absolute;bottom:18%;width:9%;height:55%;background:linear-gradient(90deg,#111,#555,#111);z-index:2}.gate-post.left{left:7%}.gate-post.right{right:7%}.gate-motor{position:absolute;bottom:22%;left:43%;width:85px;height:65px;background:#eef2f5;border:3px solid #8d98a4;border-radius:9px;z-index:3;box-shadow:0 10px 20px rgba(0,0,0,.2)}.barrier{position:absolute;right:3%;top:12%;width:110px;height:12px;background:var(--yellow);transform:rotate(-8deg);box-shadow:0 0 0 4px rgba(255,255,255,.55);animation:barrierPulse 3s ease-in-out infinite}.barrier-base{position:absolute;right:8%;top:10%;width:30px;height:95px;background:#26313b;border-radius:5px}.gear{position:absolute;right:13%;bottom:11%;width:75px;height:75px;border:9px dotted var(--yellow);border-radius:50%;animation:spin 8s linear infinite;opacity:.85}.hero-badge{position:absolute;left:-18px;bottom:22px;background:#fff;color:#111827;padding:15px 18px;border-radius:13px;box-shadow:var(--shadow);font-weight:900}.hero-badge span{color:var(--blue)}@keyframes barrierPulse{50%{transform:rotate(5deg)}}@keyframes spin{to{transform:rotate(360deg)}}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:32px}.stat{padding:18px;border-left:2px solid var(--yellow);background:rgba(255,255,255,.09);border-radius:8px}.stat strong{display:block;font-size:26px;color:var(--yellow)}
.section{padding:88px 0}.section-alt{background:var(--soft)}.section-head{max-width:780px;margin-bottom:40px}.section-head h2{font-size:clamp(30px,4vw,46px);line-height:1.1;margin:9px 0}.muted{color:var(--muted)}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:23px}.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:30px}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);transition:.25s transform,.25s box-shadow}.card:hover{transform:translateY(-6px);box-shadow:0 22px 55px rgba(9,40,90,.15)}.card-body{padding:24px}.card h3{margin-top:0}.service-image,.product-image{width:100%;height:190px;object-fit:cover;background:#dce6f2}.icon{width:48px;height:48px;border-radius:12px;background:#e9f2ff;color:var(--blue);display:grid;place-items:center;font-size:22px;margin-bottom:16px}
.photo{width:100%;height:100%;min-height:350px;object-fit:cover;border-radius:22px;box-shadow:var(--shadow)}.feature-list{list-style:none;padding:0}.feature-list li{margin:12px 0;padding-left:28px;position:relative}.feature-list li:before{content:"✓";position:absolute;left:0;color:var(--blue);font-weight:900}
.process{counter-reset:step}.process .card{padding:25px}.process .icon:before{counter-increment:step;content:counter(step)}
.cta{background:linear-gradient(110deg,var(--yellow),#ffc63c);padding:55px 0}.cta-row{display:flex;align-items:center;justify-content:space-between;gap:30px}.cta h2{margin:0;font-size:36px;line-height:1.15}.breadcrumbs{padding:14px 0;background:var(--soft);font-size:13px;color:var(--muted)}.page-hero{padding:65px 0;background:linear-gradient(110deg,#063c84,#0757b8);color:#fff}.page-hero h1{font-size:50px;line-height:1.1;margin:8px 0}.faq details{padding:18px 0;border-bottom:1px solid var(--line)}.faq summary{cursor:pointer;font-weight:900}
.contact-box{padding:30px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}.contact-box input,.contact-box textarea{width:100%;padding:13px;margin:6px 0 12px;border:1px solid #d6dce5;border-radius:9px;font:inherit}.contact-box textarea{min-height:150px}
.site-footer{background:#081321;color:#d8e0e9;padding:65px 0 25px}.footer-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr 1fr;gap:35px}.site-footer h3{color:#fff}.site-footer a:hover{color:var(--yellow)}.copyright{border-top:1px solid #233347;margin-top:35px;padding-top:20px;font-size:13px}

.mobile-toggle{display:none;background:none;border:0;font-size:27px}
@media(max-width:900px){.hero-grid,.grid-3,.grid-4,.grid-2,.footer-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}.menu{display:none}.mobile-toggle{display:block;margin-left:auto}.brand{min-width:0}.brand img{width:150px}.nav>.btn{display:none}.menu.open{display:flex;position:absolute;left:4%;right:4%;top:82px;background:#fff;padding:20px;flex-direction:column;align-items:flex-start;box-shadow:var(--shadow);border-radius:0 0 14px 14px}.menu .sub-menu{position:static;box-shadow:none;border:0;margin-top:8px}.menu li:hover>.sub-menu{display:block}.hero{padding:70px 0}.hero-visual{min-height:350px}.page-hero h1{font-size:40px}.cta-row{flex-direction:column;align-items:flex-start}}

/* =========================================================
   V4 — LAYOUT STABILITY / LOGO FIX
   Prevents logo growth, header jumps, image layout shifts,
   navigation overflow and mobile horizontal scrolling.
========================================================= */
html,body{width:100%;max-width:100%;overflow-x:hidden}
img{display:block}
.site-header{height:86px}
.site-header .nav{height:86px;min-height:86px;display:flex;align-items:center;flex-wrap:nowrap}
.brand{
  width:74px!important;
  height:74px!important;
  min-width:74px!important;
  max-width:74px!important;
  flex:0 0 74px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden;
  margin:0!important;
}
.brand img{
  display:block!important;
  width:70px!important;
  height:70px!important;
  max-width:70px!important;
  max-height:70px!important;
  min-width:70px!important;
  min-height:70px!important;
  object-fit:contain!important;
  object-position:center!important;
  flex:none!important;
}
.site-header nav{min-width:0;flex:1 1 auto}
.menu{min-width:0;gap:15px;white-space:nowrap}
.menu>li>a{white-space:nowrap}
.site-header>.container>.btn{flex:0 0 auto;white-space:nowrap}
.topbar{min-height:35px}
.topbar .container{min-height:35px;align-items:center;flex-wrap:wrap}
.hero-visual{width:100%;height:420px;min-height:420px}
.gate-scene{width:100%;height:100%}
.service-image,.product-image{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/9;
  object-fit:cover;
  background:#eaf1f9;
}
.photo{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  min-height:0;
  object-fit:cover;
}
.card{min-width:0}
.card-body{min-width:0}
.section img{max-width:100%}
@media(max-width:1180px) and (min-width:901px){
  .container{width:94%}
  .menu{gap:11px}
  .menu>li>a{font-size:12.5px}
  .brand{margin-right:4px!important}
}
@media(max-width:900px){
  .site-header,.site-header .nav{height:76px;min-height:76px}
  .brand{width:64px!important;height:64px!important;min-width:64px!important;max-width:64px!important;flex-basis:64px!important}
  .brand img{width:60px!important;height:60px!important;max-width:60px!important;max-height:60px!important;min-width:60px!important;min-height:60px!important}
  .hero-visual{height:350px;min-height:350px}
  .topbar .container{justify-content:center;text-align:center;gap:2px 12px}
}
@media(max-width:560px){
  .topbar{font-size:11px}
  .hero-visual{height:285px;min-height:285px}
  .hero-badge{left:10px;bottom:12px;font-size:12px;padding:10px 12px}
  .gate-post{bottom:18%}
  .gate-motor{transform:scale(.75);transform-origin:center}
  .barrier{width:85px}
  .stats{grid-template-columns:1fr 1fr}
}

@media(max-width:900px){
  .menu.open{top:76px;max-height:calc(100vh - 76px);overflow:auto}
  .menu{white-space:normal}
  .menu li,.menu a{max-width:100%}
}

/* ===== V5 HEADER / DROPDOWN STABILITY FIX ===== */
.site-header,
.site-header .container,
.site-header .nav,
.site-header nav,
.site-header nav ul { overflow: visible !important; }

.site-header { position: sticky !important; z-index: 9999 !important; }
.site-header .nav { position: relative; min-height: 78px; }
.site-header nav { flex: 1 1 auto; min-width: 0; }

.site-header .menu {
  position: relative;
  z-index: 10000;
  min-width: 0;
}

.site-header .menu > li { position: relative; }

.site-header .menu > li > .sub-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%);
  display: none;
  width: 270px;
  min-width: 270px;
  max-height: 70vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px !important;
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid #e5eaf0 !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.16) !important;
  z-index: 10001 !important;
}

.site-header .menu > li:hover > .sub-menu,
.site-header .menu > li:focus-within > .sub-menu,
.site-header .menu > li.submenu-open > .sub-menu {
  display: block !important;
}

.site-header .menu > li > .sub-menu:before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e5eaf0;
  border-top: 1px solid #e5eaf0;
  transform: translateX(-50%) rotate(45deg);
}

.site-header .menu > li > .sub-menu li {
  width: 100%;
  padding: 0 !important;
}

.site-header .menu > li > .sub-menu li a {
  display: block !important;
  padding: 9px 11px !important;
  border-radius: 8px;
  white-space: normal !important;
  line-height: 1.35;
}

.site-header .menu > li > .sub-menu li a:hover {
  background: #f3f7fd;
  color: var(--blue);
}

/* Keep the actual logo from ever enlarging the header. */
.site-header .brand {
  width: 178px;
  height: 70px;
  flex: 0 0 178px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.site-header .brand img {
  width: 70px !important;
  height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  object-fit: contain !important;
  display: block;
}

/* No stray floating widgets / whitespace at the end of the document. */
.floating { display: none !important; }

/* Mobile dropdown: inside the mobile menu, not an absolute desktop dropdown. */
@media (max-width: 900px) {
  .site-header .nav { min-height: 74px; }
  .site-header .brand {
    width: 150px;
    height: 64px;
    flex-basis: 150px;
  }
  .site-header .brand img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }
  .site-header .menu.open {
    position: absolute !important;
    top: 74px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - 82px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10002 !important;
    border-radius: 0 0 14px 14px !important;
  }
  .site-header .menu.open > li > .sub-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: none !important;
    box-shadow: none !important;
    border: 0 !important;
    border-left: 2px solid var(--yellow) !important;
    border-radius: 0 !important;
    margin: 5px 0 5px 8px !important;
    padding: 4px 0 4px 8px !important;
  }
  .site-header .menu.open > li.submenu-open > .sub-menu {
    display: block !important;
  }
  .site-header .menu.open > li > .sub-menu:before { display: none !important; }
  .site-header .menu.open > li > .sub-menu li a {
    padding: 8px 10px !important;
  }
}

.site-footer{position:relative;display:block;margin:0!important}.site-footer+*{margin-top:0!important}
