/* ============================================================
   Cittacore Technologies — Shared Header & Footer Styles
   ============================================================ */

:root {
  --navy:      #02164a;
  --white:     #ffffff;
  --light:     #f3f3f3;
  --blue:      #00A1DF;
  --blue-dark: #0088c0;
  --ease:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== TOP BAR ========== */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  gap: 24px;
}
.top-bar-left { display: flex; align-items: center; gap: 20px; }
.top-bar-left-row { display: flex; align-items: center; gap: 20px; }
.top-bar-left a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--ease);
}
.top-bar-left a:hover { color: var(--white); }
.top-bar-divider { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
.top-bar-locations { display: flex; align-items: center; gap: 6px; }
.top-bar-locations span { color: rgba(255,255,255,0.5); font-size: 0.7rem; }
.top-bar-right { display: flex; align-items: center; gap: 14px; }
.top-bar-social { display: flex; align-items: center; gap: 18px; }
.top-bar-social a {
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  transition: color var(--ease);
}
.top-bar-social a:hover { color: var(--white); }
.top-bar-social svg { width: 16px; height: 16px; fill: currentColor; color: #ffffff; }

/* ========== HEADER / NAV ========== */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(2,22,74,0.1), 0 4px 20px rgba(2,22,74,0.07);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo img { height: 48px; width: auto; }
.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: 6px;
  white-space: nowrap;
  transition: color var(--ease), background var(--ease);
}
.nav-link:hover { color: var(--blue); background: rgba(0,161,223,0.07); }
.nav-link.active { color: var(--blue); background: rgba(0,161,223,0.09); font-weight: 600; }
.nav-link svg { width: 9px; height: 9px; fill: currentColor; transition: transform var(--ease); }
.nav-item:hover > .nav-link svg { transform: rotate(180deg); }

/* ── Simple dropdown ── */
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid rgba(2,22,74,0.08);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(2,22,74,0.14);
  min-width: 210px;
  white-space: nowrap;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  z-index: 200;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: #3a3a4a;
  border-radius: 6px;
  transition: color var(--ease), background var(--ease);
}
.dropdown a:hover { color: var(--blue); background: var(--light); }

/* ── Mega menu ── */
.mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 1100px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(2,22,74,0.12), 0 30px 64px rgba(2,22,74,0.24);
  border: 1px solid rgba(2,22,74,0.08);
  border-top: 3px solid var(--navy);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 190;
  overflow: hidden;
}
.mega-menu-inner { display: flex; flex-direction: column; }

/* Top header bar */
.mega-header-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 240px;
  background: #ffffff;
  border-bottom: 1px solid rgba(2,22,74,0.08);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.mega-col-label {
  padding: 11px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  border-right: 1px solid rgba(2,22,74,0.08);
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}
.mega-col-label:last-child { border-right: none; }
.mega-col-label.col-cta { background: #ffffff; }
/* Active when its service column is hovered */
.mega-col-label.col-active {
  background: var(--navy);
  color: #ffffff;
}
/* Trigger positioning */
.nav-item.has-mega { position: relative; }
.nav-item.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Tab bar — hidden (all panels shown simultaneously) */
.mega-tabs { display: none; }

/* Section header inside each panel column */
.mega-section-header {
  padding: 11px 14px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  flex-shrink: 0;
}
/* Panel footer with View Details button */
.mega-panel-footer {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(2,22,74,0.07);
  margin-top: auto;
}
.mega-view-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--blue);
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.1px;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.mega-view-btn:hover {
  background: var(--blue-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,161,223,0.35);
}
/* Glass shine streak that sweeps across the button */
.mega-view-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: skewX(-22deg);
  pointer-events: none;
}
/* Hover anywhere on a service column -> its View Details turns dark blue + shine sweep */
.mega-panel:hover .mega-view-btn {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(2, 22, 74, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.mega-panel:hover .mega-view-btn::before {
  animation: mega-btn-shine 0.85s ease-out;
}
@keyframes mega-btn-shine {
  0%   { left: -150%; }
  100% { left: 150%; }
}
@media (prefers-reduced-motion: reduce) {
  .mega-panel:hover .mega-view-btn::before { animation: none; }
}

/* Panel layout */
.mega-panels { display: grid; grid-template-columns: 1fr 240px; }
.mega-content {
  display: flex;
  border-right: 1px solid rgba(2,22,74,0.06);
  min-height: 320px;
  background: var(--white);
}
.mega-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  border-right: 1px solid rgba(2,22,74,0.07);
  background: var(--white);
  transition: background 0.2s ease;
}
.mega-panel:last-child { border-right: none; }
/* Hover a service column (or its heading) -> column turns light blue */
.mega-panel:hover,
.mega-panel.col-hot { background: rgb(0 161 223 / .05); }
.mega-panel-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

/* Service items */
.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(2,22,74,0.06);
  cursor: pointer;
  transition: background 0.18s;
  text-decoration: none;
  background: transparent;
}
.mega-item:last-of-type { border-bottom: none; }
.mega-item:hover {
  background: #ffffff;
  border-color: transparent;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(2,22,74,0.12);
}
.mega-item-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(0,161,223,0.08);
  border: 1px solid rgba(0,161,223,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background 0.2s, border-color 0.2s;
}
.mega-item:hover .mega-item-icon {
  background: var(--navy);
  border-color: var(--navy);
}
.mega-item-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}
.mega-item:hover .mega-item-icon svg { stroke: var(--white); }
.mega-item-body { flex: 1; min-width: 0; }
.mega-item-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
  transition: color 0.16s;
  line-height: 1.3;
}
.mega-item:hover .mega-item-title { color: var(--blue); }
.mega-item-desc {
  font-size: 0.6rem;
  color: #8a93a8;
  line-height: 1.5;
  transition: color 0.16s;
}
.mega-item:hover .mega-item-desc { color: var(--navy); }
.mega-item-action { display: none; }

/* ===== Unified brand color theming across all 3 columns ===== */

/* CTA column */
.mega-cta-col {
  background: var(--navy);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
}
.mega-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0,161,223,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
  width: fit-content;
}
.mega-cta-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 8px;
}
.mega-cta-heading span { color: #5bc4f5; }
.mega-cta-desc {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  margin-bottom: 14px;
}
.mega-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  margin-bottom: 20px;
}
.mega-cta-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,161,223,0.35);
}
.mega-cta-divider { height: 1px; background: rgba(255,255,255,0.08); margin-bottom: 16px; }
.mega-cta-contact { display: flex; flex-direction: column; gap: 9px; }
.mega-cta-contact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}
.mega-cta-contact-item svg {
  width: 13px;
  height: 13px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}
.mega-cta-contact-item a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.16s;
}
.mega-cta-contact-item a:hover { color: #5bc4f5; }

/* On narrower screens the 1100px menu overflows -> drop the CTA column and fit to viewport */
@media (max-width: 1180px) {
  /* Center the menu on the (centered) nav bar instead of the off-center trigger so it never overflows */
  .nav-wrap { position: relative; }
  .nav-item.has-mega { position: static; }
  .mega-menu { width: min(900px, calc(100vw - 24px)); }
  .mega-header-bar { grid-template-columns: 1fr 1fr 1fr; }
  .mega-panels { grid-template-columns: 1fr; }
  .mega-col-label.col-cta,
  .mega-cta-col { display: none; }
}

@media (max-width: 1024px) { .mega-menu { display: none; } }

.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-contact {
  background: var(--blue);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.1px;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
}
.btn-contact:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,161,223,0.35);
}
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: none;
  border-radius: 8px;
  background: var(--blue);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,161,223,0.4); }
.hamburger-btn svg { width: 18px; height: 18px; stroke: #ffffff; stroke-width: 2.5; stroke-linecap: round; }

/* ========== MOBILE NAV ========== */
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid rgba(2,22,74,0.06);
  padding: 8px 0 20px;
  box-shadow: 0 16px 40px rgba(2,22,74,0.18);
}
.mobile-nav.open {
  display: block;
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-nav-item { border-bottom: 1px solid rgba(2,22,74,0.06); }
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.mobile-nav-toggle svg { width: 14px; height: 14px; stroke: var(--navy); stroke-width: 2; transition: transform 0.2s; flex-shrink: 0; }
.mobile-nav-toggle.open svg { transform: rotate(180deg); }
.mobile-nav-dropdown { display: none; background: rgba(2,22,74,0.03); }
.mobile-nav-dropdown.open { display: block; }
.mobile-nav-dropdown a {
  display: block;
  padding: 10px 24px 10px 36px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
  transition: color var(--ease);
}
.mobile-nav-dropdown a:hover { color: var(--blue); }
/* Mobile "What We Do" hierarchy (category + indented sub-items) */
.mobile-nav-dropdown a.mobile-nav-cat {
  font-weight: 700;
  color: var(--blue);
  padding: 12px 24px 6px 24px;
}
.mobile-nav-dropdown a.mobile-nav-cat:first-child { padding-top: 6px; }
.mobile-nav-dropdown a.mobile-nav-sub {
  position: relative;
  padding-left: 48px;
}
.mobile-nav-dropdown a.mobile-nav-sub::before {
  content: '';
  position: absolute;
  left: 30px; top: 0; bottom: 0;
  width: 1.5px;
  background: rgba(2,22,74,0.16);
}
.mobile-nav-dropdown a.mobile-nav-sub::after {
  content: '';
  position: absolute;
  left: 30px; top: 50%;
  width: 12px; height: 1.5px;
  background: rgba(2,22,74,0.16);
}
/* last sub-item in a group → L-shaped connector (line stops at the tick) */
.mobile-nav-dropdown a.mobile-nav-sub:last-child::before,
.mobile-nav-dropdown a.mobile-nav-sub:has(+ a.mobile-nav-cat)::before {
  bottom: 50%;
}
.mobile-nav-plain {
  display: block;
  padding: 13px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid rgba(2,22,74,0.06);
}
.mobile-nav-plain:hover { color: var(--blue); }
.mobile-nav-plain.active { color: var(--blue); }
.mobile-nav-cta { padding: 16px 24px 0; }
.mobile-nav-cta .btn-contact { display: inline-block; }

/* ========== FOOTER ========== */
.site-footer { background: var(--navy); padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.2fr 1.6fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { height: 54px; margin-bottom: 16px; display: block; background: #fff; border-radius: 8px; padding: 6px 10px; }
.footer-tagline { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.footer-social:hover { background: rgba(0,161,223,0.2); color: #00a1df; }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-col-title {
  font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 700;
  letter-spacing: 0.5px; color: #fff; margin-bottom: 18px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-links li { font-size: 0.85rem; }
.footer-links a, .footer-links span { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #00a1df; }
.footer-contact-list li { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.5); }
.footer-contact-list svg { flex-shrink: 0; color: #00a1df; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: 0.82rem; color: rgba(255,255,255,0.38);
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: rgba(255,255,255,0.38); text-decoration: none; transition: color 0.2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .top-bar-inner { height: auto; padding: 10px 0; flex-direction: column; align-items: center; gap: 8px; }
  .top-bar-left { flex-direction: column; align-items: center; gap: 6px; width: 100%; }
  .top-bar-left a { justify-content: center; }
  .top-bar-left-row { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: nowrap; }
  .top-bar-left-row a { font-size: 0.72rem; white-space: nowrap; gap: 4px; }
  .top-bar-left-row a svg { width: 12px; height: 12px; flex-shrink: 0; }
  .top-bar-locations { display: flex; justify-content: center; font-size: 0.75rem; }
  .top-bar-right { width: 100%; display: flex; justify-content: center; }
  .nav-center { display: none; }
  .btn-contact, .nav-right img { display: none; }
  .hamburger-btn { display: flex !important; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
