:root {
  --brand: #b22222; /* MedFire red */
  --accent: #e60000;
  --font: 'Segoe UI', Roboto, sans-serif;
  --ui-radius: 6px;
  --page-max: 1200px;
}

/* === GLOBAL === */
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.5;
  color: #333;
  background: #fff;
}

.page-container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* === HEADER === */
header {
  background: var(--brand);
  color: #fff;
  padding: 1rem 1.25rem;
  line-height: 1.3;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
}

nav li { white-space: nowrap; }

nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--accent);
  border-radius: var(--ui-radius);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}

/* === HERO === */
#hero {
  text-align: center;
  margin: 2rem auto;
}

.hero-photo {
  max-width: 100%;
  height: auto;
  border-radius: var(--ui-radius);
  margin-top: 1rem;
}

/* === TILE GRID === */
#programs, #resources, #sessions, #elearning {
  margin: 3rem auto;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-auto-rows: 1fr;
}

.tile-card {
  display: flex;
  flex-direction: column;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: var(--ui-radius);
  overflow: hidden;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.tile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === TILE IMAGE === */
.tile-image {
  width: 100%;
  height: 180px;          /* uniform thumbnail height */
  object-fit: cover;      /* crops neatly without distortion */
  display: block;
  border-bottom: 1px solid #ddd; /* optional divider line */
}

/* === TILE CONTENT === */
.tile-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.tile-desc {
  flex-grow: 1;           /* fills space above footer */
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #555;
}

/* === TILE META + BUTTON FOOTER === */
.tile-meta {
  margin-top: auto;       /* pushes price/free tag down */
  font-weight: bold;
  text-align: center;
  color: #333;
  padding-top: 0.75rem;
  border-top: 1px solid #ddd; /* subtle divider line */
  background: #f5f5f5;    /* light shaded footer background */
}

.tile-link {
  margin-top: 0.5rem;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--brand);
  color: #fff;
  border-radius: var(--ui-radius);
  font-weight: 600;
  transition: background 0.2s ease;
  text-align: center;
}

.tile-card:hover .tile-link {
  background: var(--accent);
}

/* === RESPONSIVE TILE IMAGE HEIGHT === */
@media (max-width: 720px) {
  .tile-image { height: 140px; object-fit: cover; }
}

@media (max-width: 420px) {
  .tile-image { height: 120px; object-fit: cover; }
}

/* === RESOURCES GRID === */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 900px;
}

.resources-grid .resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: var(--ui-radius);
  background: #fff;
  text-decoration: none;
  padding: 1rem;
  height: 220px;
  max-width: 200px;
  margin: 0 auto;
  transition: box-shadow 0.2s ease;
}

.resources-grid .resource-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.resource-card .tile-image {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.resource-card .tile-content {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.resource-card .tile-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #333;
}

.resource-card .tile-link {
  color: #0073e6;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
}

#resources ul {
  margin-bottom: 0;
  padding-left: 1.2em; /* keep bullets indented neatly */
}

#resources li {
  margin-bottom: 0;
}

/* === FOOTER === */
footer {
  background: var(--brand);
  color: #fff;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-left { text-align: left; }
.footer-right { text-align: right; }

.footer-inner p {
  margin: 0.4rem 0;
  line-height: 1.4;
}

.footer-inner a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.footer-inner a[href*="facebook"],
.footer-inner a[href*="linkedin"] {
  color: #1877F2;
}

.footer-disclosure {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 1rem;
  line-height: 1.5;
}

/* Partner logo styling */
.partner-logo {
  height: 40px;
  width: auto;
  display: inline-block;
  margin-top: 0.5rem;
}

.disclaimer {
  margin-top: 0;
  font-size: 0.9em;
  color: #555;
  text-align: left;
  line-height: 1.4;
}

/* Secondary button style */
.tile-link--secondary {
  background: #f9f9f9;
  color: #333;
  border: 1px solid #ccc;
}
.tile-link--secondary:hover {
  background: #eaeaea;
  border-color: #bbb;
}

/* Tile actions footer */
.tile-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

/* === RESPONSIVE === */
@media (max-width: 720px) {
  .logo { height: 60px; }
  .site-title { font-size: 1.25rem; }
  nav ul { gap: 0.5rem; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-right { text-align: left; }
}

@media (max-width: 420px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .logo-title {
    justify-content: center;
  }
}