:root {
  --navy: #0C1A2F;
  --blue-mid: #345679;
  --font: 'Segoe UI', sans-serif;
}

/* Global */
html, body {
  margin: 0;
  font-family: var(--font);
  background: #fff;
  color: var(--navy);
  overflow-x: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a, a:visited {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--navy);
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 2rem;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
}
.header h1 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #1a2740;
  margin: 0;
}
.header h1 .org { font-weight: 400; color: #777; }
.slogan { font-size: 0.9rem; color: #aaa; }
.header nav {
  margin-top: 0.5rem;
  display: flex;
  gap: 1.5rem;
}
.header nav a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}
.header nav a:hover { color: var(--blue-mid); }

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: url("../assets/images/MarbleBackground.webp") center/cover no-repeat;
  color: var(--navy);
}
.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}
.hero-content p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #444;
}

/* Buttons */
.btn-hollow {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  background: #fff;
  margin: 0.5rem;
  transition: all 0.2s ease;
}
.btn-hollow:hover {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.cta-wrapper {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
}
.post-cta {
  font-size: 0.95rem;
  color: #444;
  max-width: 700px;
  margin: 0 auto;
}
.micro-under-cta {
  font-size: 0.8rem;
  color: #777;
  margin-top: -0.25rem;
}
.micro-under-cta a:hover { color: var(--blue-mid); }

/* Tooltip */
.tooltip { position: relative; cursor: help; }
.tooltip-trigger {
  border-bottom: 1px dotted rgba(12,26,47,0.5);
  font-weight: 600;
}
.tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 260px;
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 10px 12px;
  position: absolute;
  bottom: 125%; left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: opacity 0.2s ease;
}
.tooltip-text::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #fff;
}
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* --- Tooltip guardrail + mobile fix --- */
.tooltip-text {
  max-width: 90vw;       /* prevent overflow on narrow screens */
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .tooltip-text {
    bottom: auto;        /* cancel upward positioning */
    top: 125%;           /* place below trigger */
    left: 50%;
    transform: translateX(-50%);
  }

  .tooltip-text::after {
    top: -6px;           /* arrow flips to point up */
    bottom: auto;
    border-color: transparent transparent #fff transparent;
  }
}


/* Why Section */
.why {
  padding: 3rem 1.5rem;
  background: #fafafa;
  text-align: center;
}
.why h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.why-sub { font-size: 0.8rem; color: #888; margin-bottom: 2rem; }
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.why-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.why-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.why-item p { font-size: 1rem; color: #555; margin-bottom: 1.2rem; }

/* Who Section */
.who {
  padding: 3rem 1.5rem;
  text-align: center;
}
.who h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.who-sub { font-size: 0.8rem; color: #888; margin-bottom: 2rem; }
.who-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.who-item {
  padding: 1.5rem;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.who-item h3 { font-size: 1.2rem; color: var(--blue-mid); }
.who-item p { font-size: 0.95rem; color: #555; margin-bottom: 0.6rem; }
.micro-link {
  font-size: 0.8rem;
  color: rgba(52,86,121,0.8);
}
.micro-link:hover { color: var(--blue-mid); }

/* Partners */
.cw-partners {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1rem;
  text-align: center;
}
.partners-left, .partners-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.partners-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}
.partners-heading .bar {
  width: 4px; height: 40px;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, var(--navy), var(--blue-mid));
  border-radius: 2px;
}
.partners-left h2 { font-size: 1.6rem; margin: 0; font-weight: 500; }
.partners-left p { max-width: 100%; margin-bottom: 1rem; color: #555; }
.logo-frame-wide {
  width: 100%; max-width: 800px; height: 80px;
  border-radius: 16px; background: #fff;
  padding: 10px 0; display: flex; align-items: center;
  overflow: hidden;
}
.logo-slider {
  display: flex;
  animation: scrollLogos 16s linear infinite;
  min-width: max-content;
}
.logo-slider img {
  height: 50px;
  margin-right: 48px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.logo-slider img:hover { 
  filter: grayscale(0%); 
}

.partners-tagline { 
  margin-top: 1rem; 
  font-size: 1rem;    /* softer than before */
  color: #888;        /* lighter tone */
  font-style: italic; /* optional: gives a subtle softer feel */
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #eee;
  background: #fff;
  font-size: 0.9rem;
  color: #555;
}

.footer-links {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #888;
}
.footer-links a { margin: 0 4px; }

/* Animations */
@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.who-item { opacity: 0; transform: translateY(40px); transition: opacity 1s ease-out, transform 1s ease-out; }
.who-item.visible { opacity: 1; transform: translateY(0); }
.who-item:nth-child(1){transition-delay:0.3s;}
.who-item:nth-child(2){transition-delay:0.6s;}
.who-item:nth-child(3){transition-delay:0.9s;}
.who-item:nth-child(4){transition-delay:1.2s;}

/* -------------------------------
   Tablet / Desktop Overrides
   ------------------------------- */
@media (min-width: 769px) {
  .hero-content h2 { font-size: 2rem; }
  .why-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .who-grid { grid-template-columns: 1fr 1fr; }
  .cw-partners { flex-direction: row; padding: 60px 30px; text-align: left; }
  .partners-left { align-items: flex-start; }
  .partners-heading { flex-direction: row; }
  .partners-heading .bar { margin: 0 12px 0 0; }
  .partners-left p { max-width: 460px; }
}

/* Ultra-Wide */
@media (min-width: 1600px) {
  .why, .who, .cw-partners, .hero-content { max-width: 1400px; margin: 0 auto; }
  .cw-partners { gap: 60px; }
  .logo-slider img { max-height: 100px; margin-right: 60px; }
  .why-grid, .who-grid { gap: 2.5rem; }
}
/* Micro Raised Azure badge (global, consistent across all pages) */
.azure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  font-size: 0.8rem;
  padding: 4px 10px;

  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);

  margin: 0.5rem auto;
}

.azure-badge img,
.azure-badge-icon {
  height: 14px;
  width: auto;
}

@media (min-width: 769px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .header nav {
    margin-top: 0;
  }
}
@media (max-width: 768px) {
  .partners-heading .bar {
    width: 40px;     /* flip to horizontal bar */
    height: 4px;
    margin: 0 0 8px 0;
    background: linear-gradient(90deg, var(--navy), var(--blue-mid));
  }
}
/* --- ClaraWell.org | Why Section: Equal Height Cards + Aligned Buttons --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch; /* ensures all cards match tallest height */
}

.why-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* space between content and button */
  align-items: center;
  text-align: center;
  height: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.why-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.why-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.why-item p {
  flex-grow: 1; /* absorb variable text height */
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.why-item .btn-hollow {
  min-height: 48px; /* same height for all buttons */
  width: 80%;       /* consistent width across breakpoints */
  margin-top: auto; /* push to bottom */
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* On mobile: stack cleanly and preserve equal height feel */
@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
  .why-item {
    max-width: 500px;
    margin: 0 auto;
  }
}
/* === Partner Logo Adjustment: AMA === */
.partner-logo[alt*="American Medical Association"],
.partner-logo[alt*="AMA"] {
  height: 70px !important;   /* slightly larger for readability */
  margin-top: -5px;          /* optical balance alignment */
}

/* === Optional Mobile Balance === */
@media (max-width: 768px) {
  .partner-logo[alt*="American Medical Association"],
  .partner-logo[alt*="AMA"] {
    height: 55px !important;  /* scale down slightly on smaller screens */
    margin-top: -3px;
  }
}
