:root {
  --topics-bg: #ffffff;
  --topics-card: #ffffff;
  --topics-ink: #1f2937;
  --topics-muted: #5b6472;
  --topics-brand: #c8a45d;
  --topics-brand-dark: #8f6f33;
  --topics-border: #e8dcc7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  background: var(--topics-bg);
  color: var(--topics-ink);
  line-height: 1.65;
}

a {
  color: inherit;
}

.container {
  width: min(1400px, 90%);
  margin: 0 auto;
  padding: 0 20px;
}

.topics-shell {
  width: min(1600px, 90%);
  margin: 0 auto;
  padding: 180px 0 80px;
}

.topics-hero {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 450px;
  display: grid;
  align-items: end;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.topics-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 23, 38, 0.88), rgba(11, 23, 38, 0.55));
}

.topics-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topics-hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 34px;
  max-width: 760px;
}

.topics-hero-content h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.7vw, 3rem);
  line-height: 1.2;
}

.topics-hero-content p {
  margin: 0;
  font-size: 1.03rem;
  color: rgba(255, 255, 255, 0.92);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.topic-card {
  background: var(--topics-card);
  border: 1px solid var(--topics-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(200, 164, 93, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(200, 164, 93, 0.4);
}

.topic-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.topic-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.topic-card h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--topics-ink);
}

.topic-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--topics-muted);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.topic-card .read-more {
  color: var(--topics-brand);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.topic-card .read-more:hover {
  gap: 10px;
}

.topics-article {
  background: #fff;
  border: 1px solid var(--topics-border);
  border-radius: 18px;
  padding: clamp(18px, 2.8vw, 34px);
  box-shadow: 0 10px 26px rgba(23, 35, 54, 0.06);
  margin-bottom: 40px;
}

.article-header {
  margin-bottom: 30px;
}

.article-hero-image {
  background: linear-gradient(135deg, var(--topics-brand), var(--topics-brand-dark));
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.article-hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/static/assets/images/IMG_1204.WEBP') center/cover;
  opacity: 0.3;
  z-index: 0;
}

/* Specific hero images for different topics */
.the-visionary-behind-the-smile .article-hero-image::before {
  background: url('/static/assets/images/Dr Assem.jpeg') center/cover;
}

.the-art-of-emax-veneers .article-hero-image::before {
  background: url('/static/assets/images/The Art of E-max Veneers 2.webp') center/cover;
}

.medical-tourism .article-hero-image::before {
  background: url('/static/assets/images/pyramids.webp') center/cover;
}

.hero-image-title {
  position: relative;
  z-index: 1;
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.article-header h1 {
  margin: 0 0 18px;
  line-height: 1.25;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--topics-ink);
}

.article-intro {
  font-size: 1.1rem;
  color: var(--topics-muted);
  line-height: 1.7;
  font-style: italic;
  margin: 0;
}

.article-content {
  max-width: none;
}

.content-section {
  margin-bottom: 40px;
}

.content-section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  color: var(--topics-ink);
  border-bottom: 2px solid var(--topics-brand);
  padding-bottom: 8px;
}

.content-section h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--topics-ink);
}

.content-section p {
  margin-bottom: 16px;
  color: #364152;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.feature-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid rgba(200, 164, 93, 0.2);
  color: #364152;
  line-height: 1.6;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--topics-brand);
  font-weight: bold;
  font-size: 1.1rem;
}

.feature-list li:last-child {
  border-bottom: none;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(200, 164, 93, 0.1), rgba(200, 164, 93, 0.05));
  border: 1px solid var(--topics-border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  position: relative;
}

.highlight-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--topics-brand);
  border-radius: 12px 12px 0 0;
}

.highlight-box h3 {
  margin-top: 0;
  color: var(--topics-brand-dark);
}

.expert-tip {
  background: rgba(200, 164, 93, 0.1);
  border-left: 4px solid var(--topics-brand);
  padding: 20px;
  margin: 24px 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

.expert-tip p {
  margin: 0;
}

.expert-tip a {
  color: var(--topics-brand-dark);
  text-decoration: none;
  font-weight: 600;
}

.expert-tip a:hover {
  text-decoration: underline;
}

.cta-section {
  background: linear-gradient(135deg, var(--topics-brand), var(--topics-brand-dark));
  color: white;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  margin: 40px 0;
}

.cta-section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: white;
  border-bottom: none;
  padding-bottom: 0;
}

.cta-section p {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: white;
  color: var(--topics-brand-dark);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.breadcrumb {
  margin-bottom: 20px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.92rem;
  color: var(--topics-muted);
}

.breadcrumb a {
  color: var(--topics-brand-dark);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .topics-shell {
    padding-top: 138px;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .topics-hero {
    min-height: 300px;
  }

  .cta-section {
    padding: 30px 20px;
  }
}

@media (max-width: 580px) {
  .topics-hero-content {
    padding: 20px;
  }

  .topics-shell {
    width: 94%;
    padding-top: 126px;
  }

  .topics-article {
    padding: 20px;
  }

  .highlight-box {
    padding: 20px;
  }

  .cta-section {
    padding: 24px 16px;
  }
}
