/* ===================================================
   CareThrive Resources Page Styles
   =================================================== */

/* ---------- CSS Variables ---------- */
.ctr-resources-page {
  --ctr-teal: #4ECDC4;
  --ctr-teal-dark: #3DBDB3;
  --ctr-teal-light: #e8f8f6;
  --ctr-navy: #134d87;
  --ctr-navy-dark: #0f3e6f;
  --ctr-green-deep: #1a6b4a;
  --ctr-coral: #e0654f;
  --ctr-coral-dark: #cc5440;
  --ctr-gray-50: #f7fafc;
  --ctr-gray-100: #f1f5f0;
  --ctr-gray-200: #e2e8f0;
  --ctr-gray-600: #636b75;
  --ctr-gray-900: #1a202c;
  --ctr-white: #ffffff;
  --ctr-radius: 12px;
  --ctr-radius-sm: 8px;
}

/* ---------- Reset & Base ---------- */
.ctr-resources-page.ctr-resources-page *,
.ctr-resources-page.ctr-resources-page *::before,
.ctr-resources-page.ctr-resources-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ctr-resources-page {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ctr-gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Hero Section ---------- */
.ctr-resources-page .ctr-hero {
  position: relative;
  background: linear-gradient(90deg, #f3f8f6 0%, #eef6f2 45%, #f4f7f3 100%);
  min-height: 360px;
  padding: 84px 0 64px;
  overflow: hidden;
}

.ctr-resources-page .ctr-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 72px;
  position: relative;
  z-index: 2;
}

.ctr-resources-page .ctr-hero-text {
  max-width: 680px;
}

.ctr-resources-page .ctr-hero-label {
  display: inline-block;
  font-family: 'Figtree', 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #3f8f6f;
  margin-bottom: 18px;
}

.ctr-resources-page .ctr-hero-title {
  font-family: 'Figtree', 'Montserrat', sans-serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: #12355b;
  margin-bottom: 20px;
}

.ctr-resources-page .ctr-hero-subtitle {
  font-family: 'Figtree', 'Montserrat', sans-serif;
  font-size: 21px;
  color: #4a5561;
  max-width: 680px;
  line-height: 1.5;
}

/* Full-bleed photo on the right that fades into the background */
.ctr-resources-page .ctr-hero-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 70%;
  z-index: 1;
}

.ctr-resources-page .ctr-hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 22%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.35) 22%, #000 42%);
}

.ctr-resources-page .ctr-hero-knowledge {
  position: absolute;
  top: 20%;
  right: 0.5%;
  width: 170px;
  transform: rotate(-8deg);
  opacity: 0.85;
  pointer-events: none;
}

.ctr-resources-page .ctr-hero-knowledge img {
  width: 100%;
  height: auto;
  display: block;
}

/* Soft decorative background shapes */
.ctr-resources-page .ctr-hero-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

.ctr-resources-page .ctr-hero-decor--blob-1 {
  top: -60px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.10) 0%, rgba(78, 205, 196, 0) 70%);
}

.ctr-resources-page .ctr-hero-decor--blob-2 {
  bottom: -140px;
  left: 38%;
  width: 360px;
  height: 300px;
  background: radial-gradient(circle, rgba(63, 143, 111, 0.12) 0%, rgba(63, 143, 111, 0) 70%);
}

/* ---------- Filter Tabs ---------- */
.ctr-resources-page .ctr-filters {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

.ctr-resources-page .ctr-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--ctr-white);
  padding: 10px 16px;
  border-radius: var(--ctr-radius);
}

.ctr-resources-page .ctr-filter-btn {
  padding: 10px 22px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ctr-gray-600);
  background: transparent;
  border: 1.5px solid var(--ctr-gray-200);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
}

.ctr-resources-page .ctr-filter-btn:hover {
  color: var(--ctr-teal-dark);
  background: var(--ctr-teal-light);
}

.ctr-resources-page .ctr-filter-btn.active {
  color: var(--ctr-white);
  background: var(--ctr-teal-dark);
  border-color: var(--ctr-teal-dark);
  font-weight: 600;
}

/* ---------- Resource Cards Grid ---------- */
.ctr-resources-page .ctr-resources {
  max-width: 1200px;
  margin: 48px auto 64px;
  padding: 0 24px;
}

.ctr-resources-page .ctr-resources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.ctr-resources-page .ctr-card {
  background: var(--ctr-white);
  border: 1px solid var(--ctr-gray-200);
  border-radius: var(--ctr-radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.ctr-resources-page .ctr-card:hover {
  transform: translateY(-4px);
  border-color: var(--ctr-teal);
}

.ctr-resources-page .ctr-card-image {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.ctr-resources-page .ctr-card-image {
  background: linear-gradient(135deg, #e8f5ee 0%, #d4ede0 100%);
}

.ctr-resources-page .ctr-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ctr-resources-page .ctr-card-icon {
  position: absolute;
  bottom: -18px;
  left: 18px;
  width: 42px;
  height: 42px;
  background: var(--ctr-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ctr-gray-200);
}

.ctr-resources-page .ctr-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ctr-teal-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctr-resources-page .ctr-card-body {
  padding: 10px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ctr-resources-page .ctr-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ctr-navy-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.ctr-resources-page .ctr-card-desc {
  font-size: 13.5px;
  color: var(--ctr-gray-600);
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.ctr-resources-page .ctr-card-download {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  white-space: nowrap;
  font-weight: 500;
  color: var(--ctr-gray-900);
  background: #f3f5f6;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s ease;
  text-decoration: none;
}

.ctr-resources-page .ctr-card-download:hover {
  background: #e8ecee;
}

.ctr-resources-page .ctr-card-download .ctr-pdf-icon {
  width: 22px;
  height: 26px;
  flex-shrink: 0;
  display: block;
}

.ctr-resources-page .ctr-card-download .ctr-file-size {
  margin-left: auto;
  font-weight: 600;
  font-size: 11px;
  color: var(--ctr-gray-600);
}

/* ---------- Category Tag (visible on filtered cards) ---------- */
.ctr-resources-page .ctr-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ctr-teal-dark);
  padding: 4px 1px;
  border-radius: 4px;
  margin-bottom: 0;
  align-self: flex-start;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ctr-resources-page .ctr-resources-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ctr-resources-page .ctr-hero-inner {
    padding: 0 40px;
  }

  .ctr-resources-page .ctr-hero-text {
    max-width: 52%;
  }

  .ctr-resources-page .ctr-hero-title {
    font-size: 42px;
  }

  .ctr-resources-page .ctr-hero-subtitle {
    font-size: 18px;
  }

  .ctr-resources-page .ctr-hero-knowledge {
    width: 100px;
  }
}

@media (max-width: 768px) {
  .ctr-resources-page .ctr-hero {
    display: flex;
    flex-direction: column-reverse;
    padding: 0;
  }

  .ctr-resources-page .ctr-hero-inner {
    padding: 32px 24px 40px;
  }

  .ctr-resources-page .ctr-hero-text {
    max-width: 100%;
  }

  .ctr-resources-page .ctr-hero-image {
    position: relative;
    width: 100%;
    height: 260px;
  }

  .ctr-resources-page .ctr-hero-photo {
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  }

  .ctr-resources-page .ctr-hero-knowledge {
    top: 12px;
    right: 12px;
    width: 90px;
  }

  .ctr-resources-page .ctr-hero-title {
    font-size: 34px;
  }

  .ctr-resources-page .ctr-hero-subtitle {
    font-size: 17px;
  }

  .ctr-resources-page .ctr-resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .ctr-resources-page .ctr-filters-bar {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ctr-resources-page .ctr-hero-image {
    height: 210px;
  }

  .ctr-resources-page .ctr-hero-title {
    font-size: 28px;
  }

  .ctr-resources-page .ctr-resources-grid {
    grid-template-columns: 1fr;
  }

  .ctr-resources-page .ctr-filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}
