/*
 * CAM News & Insights elements.
 * Brand palette: navy #29205f, coral #f0444b. Bookmania headings, Poppins body.
 */

.cn-container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* Link hygiene: our sections style their own links. */
.cn-hero a,
.cn-feature a,
.cn-latest a {
  text-decoration: none;
}

/* ----------------------------------------------------------------- hero */
.cn-hero {
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  background: #29205f;
  color: #fff;
  padding: 64px 0 58px;
  text-align: center;
  font-family: var(--rh-font-body, "Poppins", Arial, sans-serif);
}

.cn-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 210px;
  height: 210px;
  background: #f0444b;
  clip-path: polygon(100% 0, 50% 0, 100% 100%);
  pointer-events: none;
}

.cn-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 210px;
  height: 210px;
  background: #e9e9ee;
  clip-path: polygon(0 0, 50% 0, 67% 33%);
  pointer-events: none;
}

.cn-hero-title {
  margin: 0 0 14px;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: clamp(32px, 4vw, 46px);
  color: #fff;
  font-weight: 700;
}

.cn-hero-sub {
  margin: 0 auto 30px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.6;
  color: rgb(255, 255, 255);
  font-weight: 500;
}

.cn-search {
  display: flex;
  align-items: center;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 6px 6px 6px 24px;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

.cn-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #29205f;
  outline: none;
  font-family: inherit;
}

.cn-search input::placeholder { color: #9a97ad; }

.cn-search button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 30px;
  background: #f0444b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  font-family: inherit;
  transition: background .2s ease;
}

.cn-search button:hover { background: #d9323b; }

/* ---------------------------------------------------------------- feature */
.cn-feature {
  background: #fff;
  padding: 56px 0 64px;
  font-family: var(--rh-font-body, "Poppins", Arial, sans-serif);
}

.cn-section-title {
  margin: 0 0 28px;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: clamp(26px, 3vw, 34px);
  color: #29205f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.cn-feature-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 34px;
  align-items: start;
}

.cn-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.cn-slider-track { position: relative; }

.cn-slide {
  display: none;
  position: relative;
}

.cn-slide.is-active { display: block; }

.cn-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8.4;
  object-fit: cover;
}

.cn-slide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(30, 24, 70, .78));
  pointer-events: none;
}

.cn-slide-caption {
  z-index: 1;
  position: absolute;
  left: 26px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.cn-slide-caption strong {
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 700;
}

.cn-slide-caption em {
  font-style: normal;
  font-size: 12px;
  letter-spacing: 2.5px;
  opacity: .9;
}

.cn-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f0444b;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.cn-slider-arrow:hover { background: #d9323b; }
.cn-slider-prev { left: 16px; }
.cn-slider-next { right: 16px; }

.cn-feature-meta {
  margin: 18px 0 0;
  text-align: center;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-style: italic;
  font-size: 15px;
  color: #29205f;
}

.cn-top-articles {
  background: #ececf1;
  border-radius: 18px;
  padding: 28px 26px;
}

.cn-top-title {
  margin: 0 0 18px;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: 20px;
  color: #29205f;
  text-transform: uppercase;
  font-weight: 700;
}

.cn-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cn-top-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #d9d9e0;
}

.cn-top-list li:first-child { padding-top: 0; }
.cn-top-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.cn-top-num {
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: 22px;
  color: #f0444b;
  line-height: 1.1;
}

.cn-top-list a,
.cn-top-list span:not(.cn-top-num) {
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: 15px;
  line-height: 1.4;
  color: #29205f;
  font-weight: 600;
}

.cn-top-list a:hover { color: #f0444b; }

/* ---------------------------------------------------------------- latest */
.cn-latest {
  background: linear-gradient(180deg, #29205f 0%, #5a1f4d 55%, #a02443 100%);
  padding: 56px 0 64px;
  font-family: var(--rh-font-body, "Poppins", Arial, sans-serif);
}

.cn-latest-title {
  margin: 0 0 24px;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-size: clamp(26px, 3vw, 34px);
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .5px;
}

.cn-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
  margin-bottom: 30px;
}

.cn-filter {
  border: 0;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 30px;
  background: transparent;
  color: #f0444b;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-family: inherit;
  transition: background .2s ease, color .2s ease;
}

.cn-filter:hover { background: #fdeceb; }

.cn-filter.is-active {
  background: #f0444b;
  color: #fff;
}

.cn-cards {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cn-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 26px;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .22);
}

.cn-card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
}

.cn-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cn-card-body {
  padding: 10px 8px 10px 0;
  align-self: center;
}

.cn-card-title {
  margin: 0 0 10px;
  font-family: var(--rh-font-heading, "Bookmania", Georgia, serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.35;
  color: #29205f;
  font-weight: 700;
}

.cn-card-title a { color: #29205f; }
.cn-card-title a:hover { color: #f0444b; }

.cn-card-excerpt {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #77757f;
  font-style: italic;
}

.cn-card-meta {
  margin: 0;
  font-size: 12px;
  color: #f0444b;
  font-weight: 600;
}

.cn-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.cn-page,
.cn-page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 50%;
  background: #fff;
  color: #29205f;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}

.cn-page:hover,
.cn-page-arrow:hover {
  background: #fdeceb;
  color: #f0444b;
}

.cn-page.is-current {
  background: #f0444b;
  color: #fff;
}

.cn-page-arrow {
  font-size: 20px;
}

/* --------------------------------------------------------------- mobile */
@media (max-width: 900px) {
  .cn-feature-grid { grid-template-columns: 1fr; }
  .cn-card { grid-template-columns: 1fr; }
  .cn-card-media { min-height: 0; aspect-ratio: 16 / 9; }
  .cn-hero.cn-hero--photo{
    margin-top: 110px;
  }
}

@media (max-width: 560px) {
  .cn-container { width: calc(100% - 36px); }

  /* One single row on phones: smaller circles, tighter gap, scrolls only if
     there are exceptionally many pages. */
  .cn-pagination {
    flex-wrap: nowrap;
    gap: 3px;
    margin-top: 26px;
    overflow-x: auto;
    justify-content: safe center;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .cn-pagination::-webkit-scrollbar { display: none; }

  .cn-page,
  .cn-page-arrow {
    flex: 0 0 auto;
    min-width: 24px;
    height: 24px;
    padding: 0 2px;
    font-size: 11px;
  }

  .cn-page-arrow { font-size: 15px; }
  .cn-hero { padding: 44px 0 40px; }
  .cn-hero::before,
  .cn-hero::after { width: 130px; height: 130px; }
  .cn-search { padding-left: 16px; }
  .cn-search button { padding: 11px 18px; }
  .cn-filters { border-radius: 20px; }
  .cn-filter { padding: 8px 14px; font-size: 16px; }
  .cn-hero.cn-hero--photo{
    margin-top: 130px;
  }
}
