/* =========================================
   CANADA SKILL ACADEMY SHARED HEADER & NAVBAR
   ========================================= */

:root {
  --red: #FD040A;           /* Dominant Primary Red */
  --red-hover: #d60308;     /* Darker Red Hover */
  --red-light: #fff0f0;     /* Soft Tint Red */
  --blue: #014BAC;          /* Secondary Brand Blue */
  --blue-dark: #014BAC;     /* Secondary Brand Blue */
  --blue-light: #eef4fc;    /* Soft Luminance Blue */
  --light: #f8fafc;         /* Bright Clean Background */
  --white: #fff;
  --text: #1f2937;
  --muted: #667085;
  --border: #dbe5f1;
  --bg-gradient-blue: #014BAC;
  --bg-gradient-red-blue: #FD040A;
  --shadow: 0 18px 55px rgba(1, 75, 172, .08);
  --shadow-lg: 0 25px 70px rgba(1, 75, 172, .15);
  --radius: 18px;
  --transition: all .35s cubic-bezier(.4, 0, .2, 1);
}

.cs-topbar,
.cs-topbar *,
.cs-header,
.cs-header * {
  box-sizing: border-box;
}

/* TOP INFORMATION BAR — DOMINANT SOLID PRIMARY RED */
.cs-topbar {
  width: 100%;
  background: var(--red);
  color: var(--white);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  position: relative;
  z-index: 1002;
}

.cs-topbar-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 42px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cs-topbar-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 30px;
}

.cs-topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.cs-topbar-info i {
  color: var(--white);
  font-size: 15px;
}

.cs-socials {
  display: flex;
  align-items: center;
  gap: 17px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.cs-socials a {
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
}

.cs-socials a:hover {
  color: var(--blue-light);
  transform: translateY(-2px);
}

/* MAIN HEADER */
.cs-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(1, 75, 172, 0.05);
  font-family: "Inter", Arial, sans-serif;
  transition: var(--transition);
}

.cs-nav-wrap {
  width: min(1180px, calc(100% - 48px));
  min-height: 104px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: min-height 0.35s ease;
}

/* LOGO */
.cs-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 270px;
  text-decoration: none;
}

.cs-brand img {
  display: block;
  width: auto;
  height: 68px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transition: height 0.35s ease;
}

/* NAVIGATION LINKS */
.cs-nav {
  margin-left: auto;
}

.cs-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.55vw, 26px);
  margin: 0;
  padding: 0;
}

.cs-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: var(--transition);
}

.cs-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 6px;
  height: 3px;
  border-radius: 10px;
  background: var(--red);
  transition: var(--transition);
}

.cs-nav-links a:hover,
.cs-nav-links a.active {
  color: var(--red);
}

.cs-nav-links a:hover::after,
.cs-nav-links a.active::after {
  right: 0;
}

/* GET STARTED BUTTON */
.cs-get-started {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(253, 4, 10, 0.3);
  transition: var(--transition);
}

.cs-get-started:hover {
  background: var(--red-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(253, 4, 10, 0.4);
}

/* MOBILE-ONLY ELEMENTS */
.cs-mobile-contact,
.cs-menu-toggle {
  display: none;
}

@media (min-width: 1101px) {
  .cs-header.cs-scrolled .cs-nav-wrap {
    min-height: 82px;
  }
  .cs-header.cs-scrolled .cs-brand img {
    height: 54px;
  }
}

@media (max-width: 1200px) {
  .cs-nav-wrap { gap: 17px; }
  .cs-brand { max-width: 220px; }
  .cs-brand img { height: 60px; }
  .cs-nav-links { gap: 14px; }
  .cs-nav-links a { font-size: 13px; }
  .cs-get-started { padding: 0 18px; }
}

@media (max-width: 1100px) {
  .cs-topbar-inner { width: min(100% - 32px, 1180px); }
  .cs-topbar-info { gap: 8px 18px; }
  .cs-topbar-info span { font-size: 12px; }
  .cs-nav-wrap { width: min(100% - 32px, 1180px); min-height: 86px; }
  .cs-brand { max-width: 220px; }
  .cs-brand img { height: 56px; }
  .cs-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    margin-left: auto;
    transition: var(--transition);
  }
  .cs-menu-toggle:hover { border-color: var(--red); }
  .cs-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
    transition: var(--transition);
  }
  .cs-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .cs-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .cs-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .cs-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(1, 75, 172, 0.12);
    display: none;
  }
  .cs-nav.cs-open { display: block; }
  .cs-nav-links {
    width: min(100% - 32px, 900px);
    margin: 0 auto;
    padding: 16px 0 22px;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }
  .cs-nav-links li { width: 100%; }
  .cs-nav-links a {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  .cs-nav-links a::after { display: none; }
  .cs-nav-links a.active { color: var(--red); }
  .cs-mobile-contact { display: inline-flex; }
  .cs-get-started { min-height: 44px; padding: 0 18px; font-size: 13px; }
}

@media (max-width: 650px) {
  .cs-topbar-inner { width: min(100% - 28px, 1180px); min-height: 40px; justify-content: center; }
  .cs-topbar-info { justify-content: center; gap: 5px 12px; }
  .cs-topbar-info span { font-size: 11px; }
  .cs-topbar-info span:nth-child(2) { display: none; }
  .cs-socials { display: none; }
  .cs-nav-wrap { width: min(100% - 28px, 1180px); min-height: 76px; gap: 10px; }
  .cs-brand { max-width: 180px; }
  .cs-brand img { height: 48px; }
  .cs-get-started { display: none; }
  .cs-nav-links { width: min(100% - 28px, 1180px); }
}

@media (prefers-reduced-motion: reduce) {
  .cs-header *,
  .cs-topbar * {
    transition: none !important;
  }
}
