/* ============================================
   St. Vincent De Paul Hospitals — Shared Components
   ============================================ */

/* ============ TOP INFO BAR ============ */
.top-info-bar {
  background: var(--color-red);
  color: #fff;
  font-size: 0.75rem;
}
.top-info-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.top-info-bar-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.top-info-bar-contact span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.top-info-bar-contact i {
  font-size: 0.65rem;
  opacity: 0.9;
}
.top-info-bar-social {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-info-bar-label {
  display: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}
.top-info-bar-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-info-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 0.55rem;
  transition: background 0.2s;
}
.top-info-bar-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 640px) {
  .top-info-bar-label {
    display: inline;
  }
}

/* ============ HEADER ============ */
.site-header {
  background: #fff;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-navy);
}
.logo-sub {
  font-size: 0.625rem;
  letter-spacing: 3px;
  color: var(--color-navy);
  font-weight: 500;
  text-transform: uppercase;
}

.primary-nav ul {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.primary-nav a {
  font-size: 0.875rem;
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
}
.primary-nav a:hover { color: var(--color-red); }
.primary-nav a.active {
  color: var(--color-red);
}
.primary-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--color-red);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px; height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ============ GENERIC HERO (Flexible) ============ */
.hero-section {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(480px, 75vh, 700px); /* Increased height for grander feel */
  background: var(--color-navy);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
  transition: transform 12s ease-out;
}

.hero-section:hover .hero-img {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Sharper transition: Absolute text protection on left, crystal clear subjects on right */
  background: 
    linear-gradient(90deg, rgba(14, 42, 85, 1) 0%, rgba(14, 42, 85, 0.9) 25%, rgba(14, 42, 85, 0) 50%, transparent 100%),
    linear-gradient(to top, rgba(14, 42, 85, 0.2) 0%, transparent 20%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-copy {
  max-width: 680px; /* Narrower to prevent subject overlap on the right */
  color: #fff;
  animation: hero-reveal 1.2s cubic-bezier(0.2, 1, 0.3, 1) both;
}

@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  width: 3rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.hero-copy h1 {
  color: #fff;
  margin-bottom: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-cta {
  padding: 1rem 2.25rem;
  font-size: 0.9375rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-cta i {
  transition: transform 0.3s ease;
}

.hero-cta:hover i {
  transform: translateY(3px);
}

/* ============ SECTION HEADERS ============ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--color-red);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  color: var(--color-navy);
  margin-bottom: 1rem;
}

.section-title span {
  display: block;
  font-size: 0.9em;
  font-weight: 400;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* Light header for dark backgrounds */
.section-header--light .section-title {
  color: #fff;
}
.section-header--light .section-eyebrow {
  color: var(--color-gold);
}
.section-header--light .section-title span {
  color: rgba(255, 255, 255, 0.7);
}

/* ============ STATS COUNTERS ============ */
.stats {
  padding: 5rem 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}

.stat-number span {
  font-size: 0.45em; /* Smaller for +, /100 etc */
  color: var(--color-navy);
  margin-left: 2px;
  font-weight: 600;
}

.stat p {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
}

/* Vertical dividers on desktop */
@media (min-width: 769px) {
  .stat:not(:last-child) {
    border-right: 1px solid var(--color-border);
  }
}

@media (max-width: 768px) {
  .stats { padding: 4rem 0; }
  .stats-inner { grid-template-columns: 1fr; gap: 3rem; }
  .stat { border-right: none; }
  .stat:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 3rem;
  }
}

/* ============ QUOTE BAND ============ */
.quote-band {
  text-align: center;
  padding: 4.5rem 1rem;
  background: #f8fafc; /* Very soft blue-grey to break the white */
  border-top: 1px solid rgba(14, 42, 85, 0.04);
  border-bottom: 1px solid rgba(14, 42, 85, 0.04);
  position: relative;
  overflow: hidden;
}

.quote-band::before {
  content: '"';
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 10rem;
  color: var(--color-navy);
  opacity: 0.03;
  line-height: 1;
  pointer-events: none;
}

.quote-band .container {
  max-width: 800px; /* Narrower for better reading rhythm */
  position: relative;
  z-index: 1;
}

.quote-line {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--color-navy);
  line-height: 1.6;
  font-style: italic;
  font-weight: 500;
}

.quote-line + .quote-line {
  margin-top: 0.5rem;
}

.quote-band::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--color-gold);
  margin: 1.5rem auto 0;
  border-radius: 2px;
}

/* ============ VALUES GRID & CARDS ============ */
.values {
  background: var(--color-navy);
  color: #fff;
  padding: 5rem 0;
}

/* Ensure title visibility inside dark values section */
.values .section-title,
.values .values-title,
.values h2 {
  color: #fff !important;
}

.values .section-eyebrow {
  color: var(--color-gold);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.value-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  text-align: left;
}

.value-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--color-gold);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  background: var(--color-gold);
  color: var(--color-navy);
  transform: scale(1.1) rotate(-5deg);
}

.value-content {
  flex: 1;
  min-width: 0;
}

.value-card h3 {
  color: #fff !important; /* Explicitly white for dark backgrounds */
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
}

.value-card p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Light Variant (e.g. Careers page) */
.values--light {
  background: #fff;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}

.values--light .section-eyebrow {
  color: var(--color-red);
}

.values--light .section-title,
.values--light .values-title,
.values--light h2 {
  color: var(--color-navy) !important;
}

.values--light h3 {
  color: var(--color-navy) !important;
}

.values--light p {
  color: var(--color-muted);
}

.values--light .value-icon {
  background: var(--color-light);
  color: var(--color-red);
}

.values--light .value-card:hover .value-icon {
  background: var(--color-red);
  color: #fff;
}

/* ============ RESPONSIVE UTILS ============ */
@media (max-width: 1024px) {
  .primary-nav ul { gap: 1.25rem; }
  .primary-nav a { font-size: 0.8125rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.open { max-height: 600px; }
  .primary-nav ul {
    flex-direction: column;
    padding: 1.5rem 0;
    align-items: stretch;
    gap: 0;
  }
  .primary-nav a {
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--color-light);
  }
  .primary-nav a.active::after { display: none; }

  /* Hero Mobile Refinement */
  .hero-section {
    height: clamp(520px, 80vh, 600px);
  }
  .hero-overlay {
    background: 
      linear-gradient(180deg, rgba(14, 42, 85, 0.6) 0%, rgba(14, 42, 85, 0.85) 100%);
  }
  .hero-content {
    justify-content: center;
    text-align: center;
  }
  .hero-copy {
    padding: 0 1rem;
  }
  .hero-eyebrow {
    justify-content: center;
    font-size: 0.75rem;
  }
  .hero-eyebrow::before { display: none; }
  .hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  .hero-copy h1 br { display: none; }
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
  }
}
