/*  ═══════════════════════════════════════════════════════════════════
 *  Click IT CRM — shell.css
 *  Shared header & footer styles for all pages.
 *  Used alongside shell.js which injects the HTML.
 *  ───────────────────────────────────────────────────────────────────
 *  PROPRIETARY AND CONFIDENTIAL — Motherboard, Inc.
 *  Protected under the Defend Trade Secrets Act (18 U.S.C. § 1836).
 *  Unauthorized use, reproduction, or distribution is prohibited.
 *  Contact: legal@bymotherboard.com
 *  ═══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════ */
/* HEADER                                                            */
/* ══════════════════════════════════════════════════════════════════ */
#crm-header-slot {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.crm-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow 0.3s ease;
}
.crm-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,35,75,0.15);
}
.crm-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: height 0.35s ease;
}
.crm-header.scrolled .crm-header-inner {
  height: 64px;
}

/* ── Logo (transparent, sits directly on navy) ───────────────── */
.crm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px;
  transition: padding 0.35s ease;
}
.crm-header.scrolled .crm-logo {
  padding: 2px;
}
.crm-logo:hover { opacity: 0.9; }
.crm-logo-img {
  height: 80px;
  width: auto;
  transition: height 0.35s ease;
}
.crm-header.scrolled .crm-logo-img {
  height: 38px;
}

/* ── Navigation ────────────────────────────────────────────────── */
.crm-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.crm-nav a,
.crm-nav-trigger {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: all 0.15s;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.crm-nav a:hover,
.crm-nav-trigger:hover,
.crm-nav-trigger.open {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.crm-nav-active { color: #fff !important; }
.crm-caret { font-size: 0.65em; margin-left: 2px; opacity: 0.6; }

/* ── Dropdown menus ────────────────────────────────────────────── */
.crm-nav-group { position: relative; }
.crm-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,35,75,0.18), 0 0 0 1px var(--border);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}
.crm-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.crm-dropdown a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-size: 0.875rem;
  border-radius: 6px;
  font-weight: 500;
}
.crm-dropdown a:hover {
  background: var(--surface);
  color: var(--blue);
}

/* ── Header CTA buttons ─────────────────────────────────────── */
.crm-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.crm-header-cta {
  background: var(--green);
  color: var(--navy) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.crm-header-cta:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(129,215,66,0.3);
}
.crm-header-launch {
  background: var(--green);
  padding: 0.55rem 1.4rem;
  font-size: 0.88rem;
  box-shadow: 0 2px 10px rgba(129,215,66,0.25);
}

/* ── Mobile toggle ─────────────────────────────────────────────── */
.crm-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.crm-mobile-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.2s;
}

/* ── Mobile CTA buttons (hidden on desktop, shown in mobile nav) ── */
.crm-mobile-ctas {
  display: none;
}

/* ══════════════════════════════════════════════════════════════════ */
/* FOOTER                                                            */
/* ══════════════════════════════════════════════════════════════════ */
.crm-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding-top: 4rem;
}
.crm-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
}
.crm-footer-tagline {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.7;
}
.crm-footer-phone { margin-top: 0.5rem; font-size: 0.85rem; }
.crm-footer-phone a { color: rgba(255,255,255,0.7); text-decoration: none; }
.crm-footer-phone a:hover { color: var(--green); }
.crm-footer-launch {
  display: inline-block;
  margin-top: 1rem;
  background: var(--green);
  color: var(--navy) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(129,215,66,0.25);
}
.crm-footer-launch:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(129,215,66,0.35);
}
.crm-footer .crm-logo {
  padding: 2px;
}
.crm-footer .crm-logo-img {
  height: 44px;
}
.crm-footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.crm-footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.crm-footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  text-decoration: none;
}
.crm-footer-col a:hover { color: var(--green); }
.crm-footer-legal {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  opacity: 0.5;
  text-align: center;
}
.crm-footer-legal a { color: rgba(255,255,255,0.6); text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════ */
/* RESPONSIVE — Shell elements                                       */
/* ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide desktop nav and CTA buttons */
  .crm-nav,
  .crm-header-actions {
    display: none;
  }
  .crm-mobile-toggle {
    display: flex;
  }

  /* Shrink header on mobile */
  .crm-header-inner {
    height: 72px;
  }
  .crm-header.scrolled .crm-header-inner {
    height: 56px;
  }
  .crm-logo-img {
    height: 50px;
  }
  .crm-header.scrolled .crm-logo-img {
    height: 30px;
  }

  /* Mobile nav open state */
  .crm-nav.crm-nav-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    z-index: 999;
    gap: 0.25rem;
    max-height: 80vh;
    overflow-y: auto;
    transition: top 0.35s ease;
  }
  .crm-header.scrolled .crm-nav.crm-nav-open {
    top: 56px;
  }

  /* Nav links in mobile */
  .crm-nav.crm-nav-open > a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  .crm-nav.crm-nav-open > a:hover {
    background: rgba(255,255,255,0.08);
  }

  /* Nav groups (Features, Support dropdowns) */
  .crm-nav.crm-nav-open .crm-nav-group {
    width: 100%;
  }
  .crm-nav.crm-nav-open .crm-nav-trigger {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  /* Dropdowns always visible in mobile when nav is open */
  .crm-nav.crm-nav-open .crm-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    margin: 0.25rem 0 0.5rem 0;
    padding: 0.25rem 0.5rem;
    display: none;
  }
  .crm-nav.crm-nav-open .crm-dropdown.open {
    display: block;
  }
  .crm-nav.crm-nav-open .crm-dropdown a {
    color: rgba(255,255,255,0.75);
    padding: 0.6rem 1rem;
    font-size: 0.92rem;
  }
  .crm-nav.crm-nav-open .crm-dropdown a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
  }

  /* Show CTA buttons at bottom of mobile nav */
  .crm-nav.crm-nav-open::after {
    content: '';
    display: block;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.75rem 0 0.5rem;
  }

  /* Show CTA buttons at bottom of mobile nav */
  .crm-nav.crm-nav-open .crm-mobile-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .crm-mobile-cta-btn {
    display: block;
    text-align: center;
    background: var(--green);
    color: #fff !important;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(129,215,66,0.25);
  }
  .crm-mobile-cta-demo {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    box-shadow: none;
    border: 1.5px solid rgba(255,255,255,0.25);
  }

  /* Footer responsive */
  .crm-footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .crm-footer-links {
    grid-template-columns: 1fr;
  }
}
