@import url("global.css");
@import url("header-footer.css");

/* =========================
  GLOBAL CONTAINER
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

@media (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* =========================
  HERO SECTION
========================= */


  .hero-assisted {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: center;
  border: 0px;
  border-radius: 12px, 12px, 12px, 12px;
  background:
    linear-gradient(
      to right,
      rgba(31, 122, 122, 0.85) 0%,   /* ✅ TRANSPARENT TEAL */
      rgba(31, 122, 122, 0.60) 38%,
      rgba(31, 122, 122, 0.30) 65%,
      rgba(31, 122, 122, 0.05) 100%
    ),
    url('/assets/guide-to-assisted-living.jpg')
    center / cover no-repeat;
}

/* PRIMARY COLOR OVERLAY */
.hero-assisted::before {
  content: "";
  position: absolute;
  inset: 0;

  /* Global primary color with transparency */
  background: linear-gradient(
    to right,
    rgba(31, 122, 122, 0.88) 0%,   /* primary teal */
    rgba(31, 122, 122, 0.65) 40%,
    rgba(31, 122, 122, 0.35) 90%,
    rgba(31, 122, 122, 0.10) 100%
  );

  z-index: 1;
}

/* CONTENT ABOVE OVERLAY */
.hero-content {
  position: relative;
  z-index: 2;

  max-width: 780px;
  padding: 0;
  color: var(--color-white);
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.65;
  opacity: 0.95;
  max-width: 640px;
  margin-bottom: 36px;
}
.hero-search {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
}
@media (max-width: 768px) {
  .hero-assisted::before {
    background: linear-gradient(
      to bottom,
      rgba(31, 122, 122, 0.80) 0%,
      rgba(31, 122, 122, 0.45) 60%,
      rgba(31, 122, 122, 0.15) 100%
    );
  }
  .hero-content {
  position: relative;
  z-index: 2;

  max-width: 780px;
  padding: 24px;
  color: var(--color-white);
}
}


/* =========================
  ARTICLE META
========================= */
.article-meta {
  padding-top: 48px;
  padding-bottom: 0;
}

.article-meta .small-text {
  color: #6b7280;
  line-height: 1.6;
}

/* =========================
  CONTENT LAYOUT
========================= */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 320px;
  justify-content: center;
  gap: 64px;
}

@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================
  ARTICLE CONTENT (READABILITY)
========================= */
.article-content {
  max-width: 760px;
}

.article-content h2 {
  margin-top: 42px;
  margin-bottom: 12px;
}

.article-content h3 {
  margin-top: 52px;
  margin-bottom: 16px;
}

.article-content p {
  font-size: 20px;
  line-height: 1.78;
  margin-bottom: 26px;
  color: #374151;
  max-width: 100%;
}

.article-content ul {
  padding-left: 24px;
  margin-bottom: 32px;
}

.article-content li {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* subtle paragraph separation for long reads */
.article-content p + p {
  margin-top: -6px;
}

/* =========================
  TABLE OF CONTENTS
========================= */
.toc {
  background: var(--color-bg-light);
  border-left: 4px solid var(--color-teal-primary);
  padding: 26px;
  border-radius: var(--radius-md);
  position: sticky;
  top: 120px;
}

.toc h4 {
  margin-bottom: 18px;
}

.toc ul {
  list-style: none;
  padding: 0;
}

.toc li {
  margin-bottom: 12px;
}

.toc a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: var(--transition-fast);
}

.toc a:hover {
  color: var(--color-teal-primary);
}

/* =========================
   MOBILE TOC POSITION FIX
========================= */
@media (max-width: 768px) {

  /* Stack layout vertically */
  .content-layout {
    display: flex;
    flex-direction: column;
  }

  /* Move TOC above article content */
  .article-sidebar {
    order: -1;
    position: static;
    margin-bottom: 24px;
  }

  /* Disable sticky on mobile */
  .toc {
    position: relative;
    top: auto;
  }

}

/* =========================
  CTA BOX
========================= */
.cta-box {
  background: linear-gradient(
    135deg,
    var(--color-bg-light),
    var(--color-white)
  );
  border: 1px solid var(--color-border-soft);
  padding: 40px;
  border-radius: var(--radius-lg);
  margin-top: 96px;
}

.cta-box h3 {
  margin-bottom: 14px;
}

.cta-search {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

.cta-search input {
  flex: 1;
}

/* =========================
  MOBILE TWEAKS
========================= */
@media (max-width: 768px) {
  .hero-assisted {
    min-height: 64vh;
    background:
      linear-gradient(
        to bottom,
        rgba(0,0,0,0.6),
        rgba(0,0,0,0.42)
      ),
      url('assets/Adult daughter spending time with elderly mother at home.png')
      center / cover no-repeat;
  }

  .hero-search {
    flex-direction: column;
    padding: 10px;
  }

  .hero-search button {
    width: 100%;
  }

  .article-content h2 {
    margin-top: 56px;
  }

  .cta-search {
    flex-direction: column;
  }
}
