/* ============================================
   Sync Inn Digital — Header & Mega Menu
   White / Light theme matching syncinndigital.com
   ============================================ */

/* No hardcoded colors - all colors use CSS variables from theme settings */

/* ---------- Base resets for header area ---------- */
.site-header,
.site-header *,
.site-header *::before,
.site-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.site-header a {
  text-decoration: none;
  color: inherit;
}

.site-header ul,
.site-header ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header button {

    font-family: inherit;

}

/* ======================== TOP BAR ======================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: linear-gradient(to bottom, var(--sid-black) 0%, rgba(15, 23, 42, 0) 100%);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}


.site-header.scrolled {
  background: var(--sid-black);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.site-header.scrolled:has(.mega-menu-trigger.is-open) {
  box-shadow: none;
}

.site-header.scrolled .mega-panel,
.site-header.scrolled .mega-panel-container {
  border-radius: 0 0 20px 20px;
  top: 72px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: var(--sid-site-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  gap: 0;
}

.header-spacer {
  height: 72px;
}

/* ---------- Logo ---------- */

.site-branding {
  flex-shrink: 0;
  margin-right: 50px; /* desktop: separates logo from nav links */
}

/* On mobile the nav is hidden; remove the gap so logo + CTA + toggle match mob-screen-header */
@media (max-width: 1023px) {
  .site-branding {
    margin-right: 0;
  }
}

.header-logo-link {
  display: flex;
  align-items: center;
}

.header-logo-img {
  max-height: 40px;
  max-width: 150px;
  width: auto;
  display: block;
}

.header-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ---------- Desktop Nav ---------- */

.main-nav {
  display: none;
}

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 0 0 auto;
    gap: 0;
    margin-left: 0;
    margin-right: 0; /* header-right handles the push via margin-left: auto */
  }
}

.header-menu {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-menu-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-menu-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 72px;
  line-height: 72px;
  font-size: 17px;
  font-weight: 400 !important;
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif !important;
  color: var(--sid-white) !important;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-menu-link:hover,
.header-menu-link:focus {
  color: var(--sid-orange) !important;
}

.menu-chevron {
  transition: transform 0.25s ease;
}

.mega-menu-trigger.is-open .menu-chevron {
  transform: rotate(180deg);
}

.mega-menu-trigger.is-open > .header-menu-link {
  color: var(--sid-blue);
}

/* ---------- Header Right — CTA + mobile toggle group ---------- */

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* pushes group to far right on all breakpoints */
}

/* CTA: visible on all screen sizes */
.header-cta {
  display: inline-flex !important;
}

/* On very small screens scale down the CTA text — header and mobile menu stay identical */
@media (max-width: 480px) {
  .header-cta,
  .mob-cta-btn {
    font-size: 13px !important;
    padding: 8px 14px !important;
  }

  .header-right,
  .mob-screen-header-right {
    gap: 8px;
  }
}

/* ======================== MEGA MENU PANEL ======================== */

.mega-panel {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: calc(100vw - 48px);
  max-width: 1600px;
  background: transparent;
  border: none;
  border-radius: 20px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  box-shadow: none;
  z-index: 9998;
  overflow: hidden;
}

/* JS controls mega panel visibility via inline styles + .is-open class */

.mega-panel-container {
  display: grid;
  grid-template-columns: 280px 1fr 380px;
  min-height: 550px;
  height: 550px;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
}

/* ---------- LEFT: Category Sidebar ---------- */

.mega-categories {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  background: var(--sid-light-grayish-blue-bg);
  border: none;
  gap: 2px;
  border-radius: 20px 0 0 20px;
}

.mega-cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
  border-radius: 10px;
}

.mega-cat-btn:hover {
  background: var(--sid-primary-blue);
  color: #fff;
}

.mega-cat-btn:hover .mega-cat-icon img {
  filter: brightness(0) invert(1);
}

.mega-cat-btn.active {
  background: var(--sid-primary-blue);
  color: #fff;
  box-shadow: none;
}

.mega-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.mega-cat-icon img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

/* Invert icon color when active (white on blue) */
.mega-cat-btn.active .mega-cat-icon img {
  filter: brightness(0) invert(1);
}

/* Inline SVG fallback (for backward compat) */
.mega-cat-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mega-cat-label {
  flex: 1;
}

.mega-cat-arrow {
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.mega-cat-btn.active .mega-cat-arrow {
  opacity: 1;
}

/* ---------- MIDDLE: Sub-Services ---------- */

.mega-services {
  padding: 32px 36px;
  position: relative;
  border: none;
  background: var(--sid-white);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-radius: 0 20px 20px 0;
}

.mega-services-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}

.mega-services-panel.active {
  display: flex;
}

.mega-services-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}

.mega-services-footer {
  padding-top: 16px;
  padding-bottom: 16px;
  margin-top: auto;
}

.mega-services-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.mega-services-intro {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.6;
}

.mega-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  align-content: start;
}

.mega-service-card {
  display: block;
  padding: 16px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.mega-service-card:hover {
  background: var(--sid-light-blue);
  border: none;
}

.mega-service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mega-service-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.mega-service-card:hover .mega-service-name {
  color: #0f172a;
}

.mega-service-arrow {
  color: var(--sid-icon-dark);
  width: 20px;
  height: 20px;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: transparent;
}

.mega-service-card:hover .mega-service-arrow {
  color: #0f172a;
  background: transparent;
  transform: rotate(45deg);
}

.mega-service-desc {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.4;
}

.mega-service-card:hover .mega-service-desc {
  color: #6b7280;
}

.mega-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  border-bottom: 1px solid #374151;
}

.mega-view-all:hover {
  color: var(--sid-blue);
  border-bottom-color: var(--sid-blue);
}

/* ---------- RIGHT: Promo + Stats ---------- */

.mega-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--sid-light-blue);
  margin-left: 5px;
  border-radius: 20px;
}

/* Promo Card */
.mega-promo {
  position: relative;
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
}

.mega-promo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  z-index: 0;
}

.mega-promo-content {
  position: relative;
  z-index: 1;
}

.mega-promo-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.3;
}

.mega-promo-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 0 16px;
}

.mega-promo-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: 8px;
}

.mega-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.mega-promo-badge svg {
  color: #4ade80;
  flex-shrink: 0;
}


/* Stats Grid */
.mega-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mega-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 16px 6px;
  background: var(--sid-white);
  border: none;
  border-radius: 12px;
}

.mega-stat-num {
  font-size: 26px;
  font-family: var(--sid-font-heading);
  font-weight: 700;
  color: var(--sid-green);
  line-height: 1.1;
  margin-bottom: 4px;
}

.mega-stat-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  line-height: 1.3;
}

/* ======================== HAMBURGER ======================== */

/* Only shown below 1024px */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .mobile-toggle {
    display: flex;
  }
}

.mob-burger-icon {
  display: block;
  flex-shrink: 0;
}

/* ======================== MOBILE MENU OVERLAY ======================== */

/* Full-screen black overlay — hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--sid-black, #000);
  color: #fff; /* ensures all inherited link colors default to white */
  z-index: 99999;
  overflow: hidden;
}

.admin-bar .mobile-menu {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .mobile-menu {
    top: 46px;
  }
}

/* Instant open — no transition */
.mobile-menu.open {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ── Screens ─────────────────────────────────────────────────── */

.mob-screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.mob-screen.is-active {
  display: flex;
}

/* ── Screen header row ───────────────────────────────────────── */

.mob-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 72px;
  flex-shrink: 0;
}

.mob-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mob-logo-img {
  max-height: 40px;
  max-width: 150px;
  width: auto;
  display: block;
}

.mob-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-family: var(--sid-font-heading, 'Poppins'), sans-serif;
}

.mob-screen-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Close button */
.mob-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.mob-close-btn svg {
  display: block;
  flex-shrink: 0;
}

/* Back button (screen 2) */
.mob-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--sid-font-body, 'Nunito'), sans-serif;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.mob-back-btn:hover {
  color: var(--sid-orange);
}

/* Back button row (Screen 2: sits below the header, above categories) */
.mob-back-row {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  flex-shrink: 0;
}

/* ── Screen 1: Nav items ─────────────────────────────────────── */

.mob-nav {
  padding: 30px 0;
}

.mob-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* This targets both direct .mob-nav-link elements AND the walker's mobile-nav-item/link */
.mob-nav-item,
.mobile-nav-item {
  list-style: none;
}

.mob-nav-link,
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  font-family: var(--sid-font-heading, 'Poppins'), sans-serif;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}

.mob-nav-link:hover,
.mobile-nav-link:hover {
  color: var(--sid-orange);
}

/* Services button: text + icon grouped on the left */
.mob-services-btn {
  justify-content: flex-start;
  gap: 10px;
}

.mob-services-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  color: #fff;
}

/* ── Screen 1: Footer ────────────────────────────────────────── */

.mob-footer {
  flex-shrink: 0;
  padding: 120px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mob-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
}

/* Short divider only as wide as the link text, between email and phone */
.mob-contact-link:not(:last-child) {
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 5px;
}

.mob-contact-link {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--sid-font-body, 'Nunito'), sans-serif;
  color: white;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mob-contact-link:hover {
  color: var(--sid-orange);
}

.mob-socials {
      margin-top: 50px;
  display: flex;
  gap: 8px;
}

.mob-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #000 !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.mob-social-icon:hover { color: #fff; }
.mob-social-icon.social-facebook:hover  { background: #1877F2; }
.mob-social-icon.social-instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mob-social-icon.social-linkedin:hover  { background: #0A66C2; }
.mob-social-icon.social-youtube:hover   { background: #FF0000; }
.mob-social-icon.social-x:hover         { background: #fff; color: #000; }

.mob-footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mob-footer-link {
  font-size: 14px;
  font-family: var(--sid-font-body, 'Nunito'), sans-serif;
  color: white;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mob-footer-link:hover {
  color: var(--sid-orange);
}

.mob-footer-sep {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

/* ── Screen 2: Categories accordion ─────────────────────────── */

.mob-services-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.mob-cat-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  color: #fff;
  cursor: pointer; /* whole row triggers accordion */
  transition: background 0.15s ease;
}



.mob-cat-item.is-open .mob-cat-toggle {
  background: var(--sid-primary-blue, #0047D8);
  border-radius: 10px 10px 0px 0px;
}

/* Link = text label only, inline/auto width — stops accordion on click */
.mob-cat-link {
  color: #fff;
  text-decoration: none;
  font-family: var(--sid-font-heading, 'Poppins'), sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.mob-cat-link:hover {
  text-decoration: none;
  color: #fff;
}

.mob-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.mob-cat-icon img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1); /* always white on dark bg */
}

.mob-cat-label {
  font-family: var(--sid-font-heading, 'Poppins'), sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.mob-cat-chevron {
  flex-shrink: 0;
  margin-left: auto; /* pushes chevron to the far right */
  transition: transform 0.2s ease;
  color: #fff;
}

.mob-cat-item.is-open .mob-cat-chevron {
  transform: rotate(180deg);
  color: #fff;
}

.mob-cat-sub {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background: white;
}

.mob-cat-item.is-open .mob-cat-sub {
  display: block;
border-radius: 0px 0px 10px 10px;
}

.mob-cat-sub li a {
  display: block;
  padding: 7px 54px;
  color: black;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--sid-font-body, 'Nunito'), sans-serif;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mob-cat-sub li:last-child a {
  border-bottom: none;
}

.mob-cat-sub li a:hover {
  color: var(--sid-black, #000);
}

/* ======================== WP ADMIN BAR FIX ======================== */

.admin-bar .site-header {
  top: 32px;
}

.admin-bar .header-spacer {
  height: 104px;
}

.admin-bar .mega-panel {
  top: 104px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .admin-bar .header-spacer {
    height: 118px;
  }

  .admin-bar .mega-panel {
    top: 118px;
  }
}
