/* =====================================================
   ALIRAN TENAGA TECHNOLOGY — main.css v3.0
   CyberGate MSP Technology
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500&display=swap');

/* ── TOKENS ── */
:root {
  --navy:      #08111F;
  --navy2:     #0D1A35;
  --navy3:     #111F3D;
  --navy4:     #162848;
  --brand:     #1B2D72;
  --red:       #C4122E;
  --red2:      #E02040;
  --blue:      #3478D4;
  --blue2:     #4A90FF;
  --white:     #FFFFFF;
  --gray:      #8BAACF;
  --gray2:     #5A7A9C;
  --border:    rgba(74,144,255,0.14);
  --border2:   rgba(255,255,255,0.07);
  --f-display: 'Orbitron', sans-serif;
  --f-ui:      'Rajdhani', sans-serif;
  --f-body:    'Inter', sans-serif;
  --t:         0.25s ease;
  --r:         4px;
  --r2:        8px;
  --at-logo-h: 32px; /* fallback — overridden by wp_head inline style */
}

/* ── RESET ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body { font-family:var(--f-body); background:var(--navy); color:var(--white); overflow-x:hidden; }
img  { display:block; max-width:100%; height:auto; }
a    { color:inherit; text-decoration:none; }
ul   { list-style:none; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }
svg  { display:block; flex-shrink:0; }

/* ── CONTAINER ── */
.container { width:100%; max-width:1280px; margin:0 auto; padding:0 24px; }

/* ── CIRCUIT BG ── */
.at-circuit {
  background-image:
    linear-gradient(rgba(74,144,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,144,255,.04) 1px, transparent 1px);
  background-size:50px 50px;
}

/* ── BUTTONS ── */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--f-ui); font-size:12px; font-weight:700;
  letter-spacing:1.5px; text-transform:uppercase;
  padding:11px 24px; border-radius:var(--r);
  transition:all var(--t); white-space:nowrap; border:none;
}
.btn svg { width:13px; height:13px; }
.btn-red     { background:var(--red); color:#fff; }
.btn-red:hover { background:var(--red2); transform:translateY(-1px); }
.btn-outline { background:transparent; color:var(--white); border:1.5px solid rgba(74,144,255,.35); }
.btn-outline:hover { border-color:var(--blue2); color:var(--blue2); }

/* =====================================================
   TOP BAR
   ===================================================== */
.at-topbar {
  background:var(--navy);
  border-bottom:1px solid var(--border);
  padding:6px 0;
}
.at-topbar .container {
  display:flex; align-items:center;
  justify-content:space-between; gap:8px; flex-wrap:wrap;
}
.at-topbar-left  { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.at-topbar-right { display:flex; align-items:center; gap:10px; }
.at-topbar a,
.at-topbar-left span {
  font-family:var(--f-ui); font-size:11.5px; font-weight:500;
  color:#C8D8EE; display:flex; align-items:center; gap:5px;
  transition:color var(--t);
}
.at-topbar a:hover { color:#fff; }
.at-topbar svg { width:11px; height:11px; }
.at-tb-sep { color:rgba(255,255,255,0.2); }

/* Social brand icon buttons in topbar */
.at-tb-social {
  display:flex; align-items:center; gap:6px;
}
.at-tb-soc {
  display:flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:4px;
  transition:opacity var(--t); flex-shrink:0;
}
.at-tb-soc:hover { opacity:.8; }
.at-tb-soc svg { width:14px; height:14px; }
.at-tb-soc.fb  { background:#1877F2; }
.at-tb-soc.tt  { background:#000000; }
.at-tb-soc.li  { background:#0A66C2; }
.at-tb-soc.wa  { background:#25D366; }

.at-wa-pill {
  background:#25D366; color:#fff !important;
  padding:3px 12px; border-radius:100px;
  font-size:11px; font-weight:700;
  display:flex; align-items:center; gap:5px;
}
.at-wa-pill::before { content:''; width:6px; height:6px; background:#fff; border-radius:50%; flex-shrink:0; animation:atPulse 2s ease infinite; }
@keyframes atPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }
.at-wa-pill:hover { background:#20ba58; }

/* =====================================================
   HEADER & NAV
   ===================================================== */
.at-header {
  position:sticky; top:0; z-index:1000;
  background:rgba(8,17,31,0.97);
  backdrop-filter:blur(10px);
  border-bottom:2.5px solid var(--red);
  transition:box-shadow var(--t);
}
.at-header.scrolled { box-shadow:0 4px 40px rgba(0,0,0,.6); }
.at-header .container { display:flex; align-items:center; height:66px; gap:16px; }

/* ── LOGO
   KEY FIX: .custom-logo-link uses display:contents so the flex
   container sees the <img> directly, preventing full-width stretch.
   Then height is controlled by CSS variable set from customizer.
   ── */
.at-logo { display:flex; align-items:center; flex-shrink:0; padding-right:20px; }
.at-logo .custom-logo-link { display:contents; }
.at-logo img,
.at-logo .custom-logo {
  height:var(--at-logo-h, 32px) !important;
  width:auto !important;
  max-width:none !important;
  display:block !important;
}

/* ── DESKTOP NAV ── */
.at-nav { flex:1; display:flex; align-items:stretch; overflow:visible; }
.at-nav > ul { display:flex; align-items:stretch; height:66px; }
.at-nav > ul > li { display:flex; align-items:stretch; position:relative; }
.at-nav > ul > li > a {
  display:flex; align-items:center; gap:5px;
  font-family:var(--f-ui); font-size:12px; font-weight:700;
  letter-spacing:.7px; text-transform:uppercase;
  color:var(--gray); padding:0 13px;
  border-bottom:2.5px solid transparent; margin-bottom:-2.5px;
  transition:color var(--t), border-color var(--t);
  white-space:nowrap; cursor:pointer;
}
.at-nav > ul > li > a:hover,
.at-nav > ul > li.current-menu-item > a,
.at-nav > ul > li.current-menu-ancestor > a { color:var(--white); border-bottom-color:var(--blue2); }
.at-chev {
  width:5px; height:5px; flex-shrink:0;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px); opacity:.5;
}

/* ── STANDARD DROPDOWN ── */
.at-drop {
  display:none; position:absolute; top:100%; left:0;
  min-width:220px; background:var(--navy3);
  border:1px solid var(--border); border-top:2px solid var(--red);
  box-shadow:0 16px 48px rgba(0,0,0,.65);
  padding:6px 0; z-index:200;
}
.at-nav > ul > li:hover > .at-drop { display:block; }
.at-drop li a {
  display:block; font-family:var(--f-ui); font-size:12.5px; font-weight:500;
  color:var(--gray); padding:9px 20px;
  border-left:3px solid transparent; transition:all .18s;
}
.at-drop li a::before { content:'▸ '; color:var(--red); font-size:9px; }
.at-drop li a:hover { color:var(--white); background:rgba(74,144,255,.07); border-left-color:var(--blue2); padding-left:24px; }

/* ── MEGA MENU ── */
.at-has-mega { position:static !important; }
.at-has-mega > .at-mega {
  display:none; position:absolute; top:100%; left:0; width:100%;
  background:var(--navy3);
  border-top:2px solid var(--red); border-bottom:1px solid var(--border);
  box-shadow:0 20px 60px rgba(0,0,0,.7); z-index:200;
}
.at-has-mega:hover > .at-mega { display:block; }

.at-mega-grid { display:grid; grid-template-columns:repeat(3,1fr); padding:24px 0 18px; }
.at-mega-col  { padding:0 24px; border-right:1px solid var(--border); }
.at-mega-col:last-child { border-right:none; }

/* Section header — clickable link to service parent page */
.at-mega-section {
  font-family:var(--f-display); font-size:9px; font-weight:700;
  letter-spacing:2px; text-transform:uppercase; color:var(--red);
  margin-bottom:8px; margin-top:18px; padding-bottom:7px;
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:6px;
  text-decoration:none;
  transition:color var(--t), border-color var(--t);
}
.at-mega-section:first-child { margin-top:0; }
.at-mega-section svg { width:12px; height:12px; stroke:var(--red); fill:none; stroke-width:1.5; transition:stroke var(--t); }
.at-mega-section:hover { color:var(--white); border-bottom-color:rgba(255,255,255,0.2); }
.at-mega-section:hover svg { stroke:var(--white); }

/* Sub-items — clickable links */
.at-mega-links { display:flex; flex-direction:column; }
.at-mega-links a {
  font-family:var(--f-ui); font-size:12px; font-weight:500;
  color:var(--gray2); padding:5px 0 5px 10px;
  border-left:2px solid transparent; display:block; transition:all .18s;
}
.at-mega-links a:hover { color:var(--white); border-left-color:var(--blue2); padding-left:14px; }

/* Mega footer strip */
.at-mega-foot {
  background:rgba(8,17,31,.6); border-top:1px solid var(--border);
  padding:10px 24px; display:flex; align-items:center;
  justify-content:space-between; gap:16px;
}
.at-mega-foot-txt  { font-family:var(--f-ui); font-size:11px; color:var(--gray2); }
.at-mega-foot-link {
  font-family:var(--f-ui); font-size:11px; font-weight:700;
  color:var(--blue2); display:flex; align-items:center; gap:5px;
  transition:color .18s; white-space:nowrap;
}
.at-mega-foot-link svg { width:12px; height:12px; transition:transform .18s; }
.at-mega-foot-link:hover { color:var(--red); }
.at-mega-foot-link:hover svg { transform:translateX(3px); }

/* ── NAV CTA ── */
.at-nav-cta { flex-shrink:0; }

/* ── HAMBURGER ── */
.at-burger {
  display:none; flex-direction:column; justify-content:center;
  align-items:center; gap:5px;
  width:42px; height:42px; flex-shrink:0; margin-left:auto;
  border:1.5px solid var(--border); border-radius:var(--r);
  transition:border-color var(--t);
}
.at-burger:hover { border-color:var(--red); }
.at-burger span { display:block; width:20px; height:2px; background:var(--white); border-radius:2px; transition:all var(--t); }
.at-burger.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.at-burger.open span:nth-child(2) { opacity:0; }
.at-burger.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* Admin bar offset */
.admin-bar .at-header   { top:32px; }
.admin-bar .at-mobile-nav { top:78px; } /* 46px admin bar + 32 header top */
@media (max-width:782px) {
  .admin-bar .at-header   { top:46px; }
  .admin-bar .at-mobile-nav { top:46px; }
}

/* =====================================================
   MOBILE NAV
   ===================================================== */
.at-mobile-nav {
  display:none; position:fixed;
  top:0; left:0; right:0; bottom:0;
  z-index:9999; background:rgba(6,12,24,.98);
  flex-direction:column; overflow-y:auto;
}
.at-mobile-nav.open { display:flex; }

.at-mnav-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid var(--border); flex-shrink:0;
}
.at-mnav-head img { height:28px; width:auto; }
.at-mnav-close {
  width:40px; height:40px; display:flex; align-items:center; justify-content:center;
  border:1.5px solid var(--border); border-radius:var(--r); color:var(--white);
  transition:all var(--t);
}
.at-mnav-close:hover { border-color:var(--red); background:rgba(196,18,46,.15); }
.at-mnav-close svg { width:18px; height:18px; }

.at-mnav-body { flex:1; }

/* Mobile nav items */
.at-mnav-item { border-bottom:1px solid var(--border); }
.at-mnav-item > a {
  display:block; font-family:var(--f-ui); font-size:15px; font-weight:700;
  color:var(--white); text-transform:uppercase; letter-spacing:.8px;
  padding:14px 20px; transition:color var(--t);
}
.at-mnav-item > a:hover { color:var(--red); }

/* Accordion toggle button */
.at-mnav-acc {
  display:flex; width:100%; align-items:center; justify-content:space-between;
  font-family:var(--f-ui); font-size:15px; font-weight:700;
  color:var(--white); text-transform:uppercase; letter-spacing:.8px;
  padding:14px 20px; text-align:left; transition:color var(--t);
}
.at-mnav-acc:hover { color:var(--red); }
.at-mnav-chev {
  width:8px; height:8px; flex-shrink:0;
  border-right:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px); transition:transform var(--t);
}
.at-mnav-item.open > .at-mnav-acc .at-mnav-chev { transform:rotate(-135deg); }

/* Sub panel */
.at-mnav-sub { display:none; background:rgba(13,26,53,.8); }
.at-mnav-item.open > .at-mnav-sub { display:block; }

/* Section labels inside mobile sub — <a> tags, now clickable */
.at-mnav-label {
  display:block; font-family:var(--f-ui); font-size:9px; font-weight:700;
  letter-spacing:2px; text-transform:uppercase; color:var(--red);
  padding:12px 24px 4px; text-decoration:none;
  transition:color var(--t);
}
a.at-mnav-label:hover { color:var(--white); }
.at-mnav-sub a {
  display:block; font-family:var(--f-ui); font-size:13px; font-weight:500;
  color:var(--gray2); padding:7px 24px 7px 32px;
  border-left:2px solid transparent; margin-left:16px; transition:all .18s;
}
.at-mnav-sub a:hover { color:var(--white); border-left-color:var(--blue2); }

/* Mobile footer actions */
.at-mnav-foot {
  padding:20px; border-top:1px solid var(--border);
  display:flex; flex-direction:column; gap:10px; flex-shrink:0;
}
.at-mnav-foot .btn { justify-content:center; }

/* =====================================================
   PAGE CONTENT (non-Elementor fallback)
   ===================================================== */
.at-page-hero {
  background:var(--navy2); border-bottom:2px solid var(--red);
  padding:52px 0 44px;
}
.at-page-hero .at-kicker {
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--f-ui); font-size:11px; font-weight:700;
  letter-spacing:2px; text-transform:uppercase; color:var(--red); margin-bottom:10px;
}
.at-page-hero .at-kicker::before { content:''; width:20px; height:2px; background:var(--red); }
.at-page-hero h1 {
  font-family:var(--f-display); font-size:clamp(1.8rem,3.5vw,3rem);
  font-weight:700; color:var(--white); line-height:1.1;
}
.at-content-wrap { padding:56px 0; }
.at-content-wrap h1,.at-content-wrap h2,.at-content-wrap h3 { font-family:var(--f-display); color:var(--white); margin-bottom:14px; }
.at-content-wrap p { color:var(--gray); line-height:1.8; margin-bottom:14px; font-size:15px; }
.at-content-wrap a { color:var(--blue2); }
.at-content-wrap a:hover { color:var(--red); }

/* =====================================================
   FOOTER
   ===================================================== */
.at-footer { background:#050B16; border-top:2.5px solid var(--red); }
.at-footer-top { display:grid; grid-template-columns:1.8fr 1fr 1fr 1fr; gap:40px; padding:52px 0 36px; }
.at-foot-brand img { height:30px; width:auto; margin-bottom:14px; }
.at-foot-brand p { font-size:13px; color:var(--gray2); line-height:1.8; max-width:280px; margin-bottom:18px; }
.at-foot-socials { display:flex; gap:8px; }
.at-soc {
  width:34px; height:34px; background:var(--navy3); border:1px solid var(--border);
  border-radius:var(--r); display:flex; align-items:center; justify-content:center;
  transition:all var(--t);
}
.at-soc svg { width:14px; height:14px; stroke:var(--gray); fill:none; stroke-width:1.5; transition:stroke var(--t); }
.at-soc:hover { background:var(--red); border-color:var(--red); }
.at-soc:hover svg { stroke:#fff; }
.at-foot-col h4 {
  font-family:var(--f-ui); font-size:9.5px; font-weight:700; letter-spacing:2px;
  text-transform:uppercase; color:var(--red); margin-bottom:14px;
  padding-bottom:8px; border-bottom:1px solid var(--border);
}
.at-foot-col a { display:block; font-size:13px; color:var(--gray2); padding:5px 0; transition:all .18s; }
.at-foot-col a:hover { color:var(--white); padding-left:6px; }
.at-foot-contact p { display:flex; gap:8px; font-size:12.5px; color:var(--gray2); line-height:1.75; margin-bottom:8px; }
.at-foot-contact svg { width:12px; height:12px; stroke:var(--gray2); fill:none; stroke-width:1.5; flex-shrink:0; margin-top:3px; }
.at-foot-contact a { color:var(--gray2); display:inline; padding:0; }
.at-foot-contact a:hover { color:var(--blue2); padding-left:0; }
.at-footer-bottom {
  border-top:1px solid var(--border); padding:15px 0;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
}
.at-footer-bottom span { font-family:var(--f-ui); font-size:11px; color:var(--gray2); }
.at-footer-bottom a { color:var(--blue2); transition:color .18s; }
.at-footer-bottom a:hover { color:var(--red); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width:1100px) {
  .at-mega-grid { grid-template-columns:1fr 1fr; }
  .at-mega-col:nth-child(2) { border-right:none; }
  .at-mega-col:nth-child(3) { grid-column:1/-1; border-right:none; border-top:1px solid var(--border); padding-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:0 32px; }
  .at-footer-top { grid-template-columns:1fr 1fr; }
}

@media (max-width:900px) {
  /* Hide desktop nav & CTA, show hamburger */
  .at-nav, .at-nav-cta { display:none !important; }
  .at-burger { display:flex !important; }
  /* Top bar: hide left on mobile */
  .at-topbar-left { display:none; }
  .at-topbar .container { justify-content:flex-end; }
  .at-header .container { height:58px; }
}

@media (max-width:640px) {
  .at-footer-top { grid-template-columns:1fr; gap:24px; padding:36px 0 24px; }
  .at-mega-col:nth-child(3) { grid-template-columns:1fr; }
}
