/*
 * Theme A — "Air"
 * Maximum whitespace, no visual noise, Swiss-design minimal.
 * Accent: #4E61A6 (blue) / #02155a (dark blue)
 * Text: #2c2c2c / white backgrounds / light grey footer
 */

/* ── TYPOGRAPHY ── */
body {
  color: #2c2c2c;
  line-height: 1.7em;
}

h1, h2, .title, .subtitle {
  color: #02155a;
  font-weight: 700;
}
h3, h4, .subsubtitle {
  color: #4E61A6;
  font-weight: 600;
}

a {
  color: #4E61A6;
}
a:hover {
  color: #02155a;
}

/* ── HEADER / MASTHEAD ── */
.masthead {
  background: #ffffff;
  border-top: 3px solid #4E61A6;
  border-bottom: 1px solid #e8eaf0;
  padding: 0;
  margin-bottom: 0 !important;
}
.masthead-inner {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.7em 0;
}
.logo img {
  height: 48px;
  margin: 0;
  flex-shrink: 0;
}
.masthead-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-shrink: 0;
}
.nav-langs {
  display: flex;
  align-items: center;
  padding-left: 0.5em;
  font-size: 0.9em;
  color: #888;
  white-space: nowrap;
}

/* Hamburger button */
.masthead-toggler {
  background: none;
  border: none;
  padding: 0.3em 0.4em;
  cursor: pointer;
  color: #555;
  font-size: 1.2rem;
  line-height: 1;
}
.masthead-toggler:hover {
  color: #4E61A6;
}

/* ── DESKTOP NAVIGATION (inline with logo) ── */
.masthead-nav {
  margin-left: auto;
  align-items: center;
}
.masthead-nav .nav {
  flex-wrap: nowrap;
  gap: 0.2em;
}
.masthead-nav .nav-link {
  border-radius: 20px;
  color: #555;
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4em 1em;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.masthead-nav .nav-link:hover {
  background: #eef1fa;
  color: #4E61A6;
}
.masthead-nav .nav-link.active {
  background: #4E61A6;
  color: #ffffff;
}

/* ── MOBILE OFFCANVAS (slide from right) ── */
#mobileNav {
  width: 280px;
  border-left: 3px solid #4E61A6;
}
#mobileNav .offcanvas-header {
  border-bottom: 1px solid #e8eaf0;
  padding: 0.9em 1.2em;
}
#mobileNav .offcanvas-body {
  padding: 1em 1.2em;
}
#mobileNav .nav-link {
  color: #333;
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.8em 1em;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}
#mobileNav .nav-link:hover {
  background: #eef1fa;
  color: #4E61A6;
}
#mobileNav .nav-link.active {
  background: #4E61A6;
  color: #ffffff;
}
.mobile-langs {
  font-size: 1rem;
  color: #888;
  text-align: center;
  padding: 0.5em 0;
}

/* ── BUTTONS ── */
.btn-primary {
  background-color: #4E61A6;
  border-color: #4E61A6;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: #02155a !important;
  border-color: #02155a !important;
}
.btn-purple {
  border-radius: 4px;
  font-weight: 600;
}

/* ── HERO CAROUSEL ── */
.hero-carousel {
  background-color: #f7f9ff;
}
.hero-carousel .carousel-item {
  padding: 0 10% 2em;
  min-height: 520px;
}
.hero-carousel .lead {
  font-size: 1.6em;
  color: #2c2c2c;
}

/* ── CONTENT SECTIONS ── */
.vspace-3 {
  padding: 4em 0;
}

/* ── FOOTER ── */
footer {
  background-color: #f5f7fb;
  border-top: 1px solid #e8eaf0;
  padding: 3em 0 2em;
  color: #555;
}
footer h4, footer h5, footer strong {
  color: #02155a;
  font-weight: 700;
}
footer a {
  color: #4E61A6;
}
footer a:hover {
  color: #02155a;
}
.footer-col-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: #02155a;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.8rem;
}
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li {
  margin-bottom: 0.35rem;
}
.footer-nav a {
  font-size: 0.87rem;
  color: #4E61A6;
  text-decoration: none;
}
.footer-nav a:hover {
  color: #02155a;
  text-decoration: underline;
}
.footer-tagline {
  color: #666;
  font-size: 0.87rem;
  line-height: 1.55;
  margin: 0.75rem 0 1.2rem;
  max-width: 280px;
}
.footer-social {
  margin-top: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
.footer-social a {
  font-size: 1.25rem;
  color: #4E61A6;
  line-height: 1;
}
.footer-social a:hover {
  color: #02155a;
}
.footer-newsletter label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.4rem;
  display: block;
}
.footer-newsletter .form-control {
  font-size: 0.85rem;
  border-color: #dde1ec;
  border-radius: 3px 0 0 3px;
}
.footer-newsletter .btn {
  border-radius: 0 3px 3px 0;
  font-size: 0.85rem;
  white-space: nowrap;
}
.footer-bottom {
  border-top: 1px solid #e0e4ef;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  font-size: 0.8rem;
  color: #888;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.footer-bottom a {
  color: #888;
  text-decoration: none;
}
.footer-bottom a:hover {
  color: #02155a;
  text-decoration: underline;
}
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

/* ── BADGES ── */
.badge-primary {
  background-color: #4E61A6;
}

/* ── EDUCATION SUBMENU (desktop) ── */
.nav-item.has-submenu { position: relative; }
.submenu-caret {
  font-size: 0.6em;
  vertical-align: middle;
  opacity: 0.7;
  margin-left: 0.2em;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e8eaf0;
  border-top: 3px solid #4E61A6;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 28px rgba(2,21,90,0.13);
  min-width: 380px;
  padding: 1em 1em 0.75em;
  z-index: 1050;
  display: none;
}
.nav-submenu.open { display: block; }

.nav-submenu-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 0.6em;
}
.nav-submenu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3em;
}
.nav-submenu-grid a {
  display: block;
  padding: 0.45em 0.7em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-submenu-grid a:hover {
  background: #eef1fa;
  color: #4E61A6;
}

.nav-submenu-list {
  display: flex;
  flex-direction: column;
  min-width: 220px;
}
.nav-submenu-list a {
  display: block;
  padding: 0.45em 0.7em;
  font-size: 0.9rem;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-submenu-list a:hover {
  background: #eef1fa;
  color: #4E61A6;
}

/* ── EDUCATION SUBMENU (mobile offcanvas) ── */
#mobileNav .nav-sub {
  padding-left: 1.2em;
  display: none;
}
#mobileNav .nav-sub.open { display: block; }
#mobileNav .nav-sub .nav-link {
  font-size: 0.85rem;
  padding: 0.45em 1em;
  text-transform: none;
  letter-spacing: 0;
  color: #666;
  font-weight: 500;
}
#mobileNav .has-submenu-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
}
#mobileNav .submenu-toggle-icon {
  margin-left: auto;
  font-size: 0.75em;
  transition: transform 0.2s;
}
#mobileNav .has-submenu-toggle.open .submenu-toggle-icon {
  transform: rotate(180deg);
}

/* ── TAG BADGES ──
   To add a new tag: add a .tag-badge-{key} rule below with a unique background color,
   then add the key to $tag_labels in program.php and use it in course 'tags' arrays.
   All colors should provide good contrast with white text. */
.tag-badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  vertical-align: middle;
}
.tag-badge-openehr                    { background-color: #e07b00 !important; } /* hue ~35°  orange */
.tag-badge-fhir                       { background-color: #c4531c !important; } /* hue ~20°  orange */
.tag-badge-hl7_v2x                    { background-color: #7030a0 !important; } /* hue ~290° violet */
.tag-badge-cda                        { background-color: #9a6a00 !important; } /* hue ~45°  amber */
.tag-badge-dicom                      { background-color: #2a5f8f !important; } /* hue ~210° steel blue */
.tag-badge-mirth_connect              { background-color: #3b7a41 !important; } /* hue ~120° forest green */
.tag-badge-rest_apis                  { background-color: #a32035 !important; } /* hue ~0°   crimson */
.tag-badge-clinical_data_repositories { background-color: #6a8a00 !important; } /* hue ~80°  olive */
.tag-badge-interoperability           { background-color: #4a3faa !important; } /* hue ~255° indigo */

/* Tag filter bar — always-visible above course grid */
.tag-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.tag-filter-all {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #aaa;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}
.tag-filter-all:hover { background: #777; color: #fff; }
.tag-filter-all.active { background: #555; color: #fff; }

.tag-filter-bar .tag-badge {
  text-decoration: none;
  opacity: 0.32;
  transition: opacity 0.15s;
}
.tag-filter-bar .tag-badge:hover { opacity: 0.7; color: #fff; }
.tag-filter-bar .tag-badge.active { opacity: 1; }

/* ── INSIGHTS ── */

.insights-level-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-top: 1rem;
}
.insights-level-legend > div {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.9rem;
  color: #555;
}

.insights-level-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18em 0.55em;
  border-radius: 3px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  flex-shrink: 0;
  white-space: nowrap;
}
.insights-level-badge.level-executive { background: #1e4080; }
.insights-level-badge.level-architect { background: #2a7a5a; }
.insights-level-badge.level-developer { background: #7a3a80; }

.insights-pillar {
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
}
.insights-pillar:first-child { border-top: none; }

.insights-pillar-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.insights-pillar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.insights-pillar-summary {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 1rem;
}

.insights-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.insights-article-list li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 0;
  border-bottom: 1px solid #f0f0f0;
}
.insights-article-list li:last-child { border-bottom: none; }

.insights-article-link {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}
.insights-article-link:hover {
  color: #2a7a5a;
  text-decoration: underline;
}

/* ── SOFTWARE / PRODUCTS ── */
.border-atomik { border-color: #4E61A6 !important; }
.border-cabo   { border-color: #177e6e !important; }
.text-sw       { color: #02155a !important; }

.sw-hero {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background: #02155a;
  color: #fff;
  padding: 5rem 0 4.5rem;
  margin-bottom: 2.5rem;
}
.sw-hero h1 { color: #fff; font-size: 2.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.sw-hero .lead { color: #c8d4f0; font-size: 1.2rem; margin-bottom: 2rem; }

.sw-why-col { text-align: center; padding: 1.5rem 2rem; }
.sw-why-col + .sw-why-col { border-left: 1px solid #e0e0e0; }
.sw-why-icon { font-size: 2rem; color: #4E61A6; margin-bottom: 1rem; display: block; }

.sw-section-title { font-size: 1.4rem; font-weight: 700; color: #02155a; margin-bottom: 0.4rem; }
.sw-section-intro { color: #555; margin-bottom: 2rem; max-width: 720px; }

.sw-final-cta { background: #02155a; color: #fff; padding: 3rem 0; text-align: center; margin-top: 3rem; }
.sw-final-cta h2 { color: #fff; font-size: 1.6rem; }
.sw-final-cta p { color: #c8d4f0; }

.product-subnav { border-bottom: 1px solid #e0e0e0; margin-bottom: 2rem; padding-bottom: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.product-subnav a { color: #4E61A6; padding: 0.3em 0.7em; font-size: 0.88rem; text-decoration: none; border-radius: 3px 3px 0 0; border-bottom: 2px solid transparent; }
.product-subnav a:hover { color: #02155a; background: #f0f3fa; }
.product-subnav a.active { color: #02155a; border-bottom-color: #4E61A6; font-weight: 600; }

.sw-related { background: #f7f9ff; border-radius: 6px; padding: 1.2rem 1.5rem; margin-top: 2.5rem; }
.sw-related h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-bottom: 0.8rem; }
.sw-related a { display: block; color: #4E61A6; margin-bottom: 0.4rem; font-size: 0.92rem; }

/* ── MOBILE ── */
@media (max-width: 767.98px) {
  .hero-carousel .carousel-item {
    padding: 0 5% 2em;
    min-height: 560px;
  }
  .hero-carousel .lead {
    font-size: 1.3em;
  }
}
