/* Blog listing + article pages (Modules/Web/Resources/views/blog). Loaded after main.css. */

/* ---------- Listing toolbar ---------- */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.blog-toolbar__eyebrow {
  display: inline-block;
  color: var(--rr-theme-primary);
  font-weight: var(--rr-fw-sbold);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.blog-toolbar__title {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.blog-toolbar__count {
  margin: 0;
  font-size: 15px;
}

/* ---------- Search ---------- */
.blog-search {
  position: relative;
  width: 100%;
  max-width: 360px;
}
.blog-search--block { max-width: none; }
.blog-search input {
  width: 100%;
  height: 52px;
  padding: 0 56px 0 22px;
  border: 1px solid #FFD8D0;
  border-radius: 30px;
  background: var(--rr-common-white);
  color: var(--rr-text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.blog-search input:focus {
  border-color: var(--rr-theme-primary);
  box-shadow: 0 0 0 4px rgba(255, 99, 71, .12);
}
.blog-search button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
  transition: background .2s;
}
.blog-search button:hover { background: var(--rr-heading-primary); }

/* ---------- Category chips ---------- */
.blog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border: 1px solid #FFD8D0;
  border-radius: 30px;
  background: var(--rr-common-white);
  color: var(--rr-heading-primary);
  font-size: 15px;
  line-height: 22px;
  transition: all .2s;
}
.blog-chip span {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--rr-background-gray);
  font-size: 12px;
  text-align: center;
}
.blog-chip:hover,
.blog-chip.is-active {
  border-color: var(--rr-theme-primary);
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
}
.blog-chip:hover span,
.blog-chip.is-active span {
  background: rgba(255, 255, 255, .25);
  color: var(--rr-common-white);
}

/* ---------- Cards ---------- */
.blog-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--rr-common-white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
  transition: transform .3s, box-shadow .3s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
}
.blog-card .blog-card__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 12px 12px 0 0;
}
.blog-card .blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
.blog-card .blog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 26px 26px;
}
.blog-card .blog-card__title { margin-bottom: 10px; }
.blog-card .blog-card__title a,
.blog-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .blog-card__title a {
  font-size: 20px;
  line-height: 28px;
  -webkit-line-clamp: 2;
}
.blog-card__excerpt {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 24px;
  -webkit-line-clamp: 3;
}
.blog-card .blog-card__more { margin-top: auto; align-self: flex-start; }

/* ---------- Empty state ---------- */
.blog-empty {
  padding: 70px 20px;
  border-radius: 16px;
  background: var(--rr-background-gray);
  text-align: center;
}
.blog-empty i {
  font-size: 42px;
  color: var(--rr-theme-primary);
  margin-bottom: 16px;
}
.blog-empty h3 { font-size: 26px; line-height: 1.3; }

/* ---------- Pagination ---------- */
.blog-pagination .blog__content-pagination-social { gap: 10px; }
.blog-pagination .blog__content-pagination-social > a,
.blog-pagination .blog__content-pagination-social > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #FFD8D0;
  border-radius: 8px;
  color: var(--rr-heading-primary);
  font-weight: var(--rr-fw-sbold);
}
.blog-pagination .blog__content-pagination-social > a:hover,
.blog-pagination .blog__content-pagination-social .active {
  border-color: var(--rr-theme-primary);
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
}
.blog-pagination .blog__content-pagination-social .disabled { opacity: .4; }

/* ---------- Article ---------- */
.blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.blog-article__badge {
  padding: 4px 16px;
  border-radius: 30px;
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
  font-size: 14px;
  font-weight: var(--rr-fw-sbold);
  line-height: 24px;
}
.blog-article__badge:hover { background: var(--rr-heading-primary); color: var(--rr-common-white); }
.blog-article__read { font-size: 14px; color: var(--rr-text-body); }
.blog-article__read i { color: var(--rr-theme-primary); margin-right: 4px; }
.blog-article__title {
  font-size: 40px;
  line-height: 1.25;
  margin-bottom: 16px;
}
.blog-article__lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--rr-text-primary);
  margin-bottom: 28px;
}
.blog-article__thumb { margin: 0 0 36px; }
.blog-article__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 850 / 416;
  object-fit: cover;
  border-radius: 16px;
}
.blog-article__body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--rr-text-body);
}
.blog-article__body > * + * { margin-top: 18px; }
.blog-article__body p { margin-bottom: 0; font-size: 17px; line-height: 1.8; }
.blog-article__body h2,
.blog-article__body h3 {
  margin-top: 36px;
  margin-bottom: 0;
  line-height: 1.3;
}
.blog-article__body h2 { font-size: 28px; }
.blog-article__body h3 { font-size: 23px; }
.blog-article__body ul,
.blog-article__body ol { padding-left: 22px; }
.blog-article__body ul li { list-style: disc; }
.blog-article__body ol li { list-style: decimal; }
.blog-article__body li { margin-top: 8px; padding-left: 4px; }
.blog-article__body li::marker { color: var(--rr-theme-primary); }
.blog-article__body a { color: var(--rr-theme-primary); text-decoration: underline; }
.blog-article__body strong { color: var(--rr-text-primary); }
.blog-article__body blockquote {
  margin: 28px 0 0;
  padding: 22px 26px;
  border-left: 4px solid var(--rr-theme-primary);
  border-radius: 0 12px 12px 0;
  background: var(--rr-background-gray);
  color: var(--rr-text-primary);
  font-size: 18px;
  font-style: italic;
}
.blog-article__body img { max-width: 100%; height: auto; border-radius: 12px; }

/* ---------- Share ---------- */
.blog-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding: 20px 0;
  border-top: 1px solid #FFD8D0;
  border-bottom: 1px solid #FFD8D0;
}
.blog-share__label { font-weight: var(--rr-fw-sbold); color: var(--rr-heading-primary); }
.blog-share__links { display: flex; gap: 10px; }
.blog-share__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rr-background-gray);
  color: var(--rr-heading-primary);
  transition: all .2s;
}
.blog-share__links a:hover { background: var(--rr-theme-primary); color: var(--rr-common-white); }

/* ---------- Previous / next ---------- */
.blog-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}
.blog-postnav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid #FFD8D0;
  border-radius: 12px;
  transition: all .2s;
}
.blog-postnav__item:hover { border-color: var(--rr-theme-primary); box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }
.blog-postnav__item--next { text-align: right; grid-column: 2; }
.blog-postnav__dir { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--rr-theme-primary); }
.blog-postnav__title { color: var(--rr-heading-primary); font-weight: var(--rr-fw-sbold); line-height: 1.4; }

/* ---------- Sidebar ---------- */
.blog-sidebar .sidebar__widget-title { font-size: 22px; }
.blog-categories { margin: 0; padding: 0; }
.blog-categories li { list-style: none; }
.blog-categories li + li { border-top: 1px dashed #FFD8D0; }
.blog-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: var(--rr-heading-primary);
  transition: color .2s;
}
.blog-categories a:hover,
.blog-categories a.is-active { color: var(--rr-theme-primary); }
.blog-categories__count {
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 14px;
  background: var(--rr-background-gray);
  font-size: 13px;
  text-align: center;
}
.blog-packages p { margin-bottom: 18px; }
.blog-packages__links { display: flex; flex-wrap: wrap; gap: 10px; }
.blog-packages__links .rr-btn { padding: 9px 22px; }
.blog-packages__links .blog-packages__alt { background: var(--rr-heading-primary); }

/* ---------- Related ---------- */
.blog-related { margin-top: 80px; }
.blog-related__title { font-size: 32px; line-height: 1.25; margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .blog-article__title { font-size: 32px; }
  .blog-toolbar__title { font-size: 30px; }
  .blog-search { max-width: none; }
  .blog-related { margin-top: 60px; }
}
@media (max-width: 575px) {
  .blog-article__title { font-size: 26px; }
  .blog-article__lead { font-size: 17px; }
  .blog-article__body,
  .blog-article__body p { font-size: 16px; }
  .blog-postnav { grid-template-columns: 1fr; }
  .blog-postnav__item--next { grid-column: auto; }
  .blog-card .blog-card__body { padding: 20px; }
}

/* main.css's base heading rule reads "h1, .h1 h2," so bare <h2> never gets the heading weight. */
.blog-toolbar__title,
.blog-article__title,
.blog-article__body h2,
.blog-article__body h3,
.blog-related__title,
.blog-sidebar .sidebar__widget-title {
  font-family: var(--rr-ff-heading);
  font-weight: var(--rr-fw-bold);
  color: var(--rr-heading-primary);
}

/* ---------- Photo gallery inside a post (links open in Magnific Popup via .popup-image) ---------- */
.blog-article__body .blog-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.blog-article__body .blog-gallery a {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  background: var(--rr-background-gray);
}
.blog-article__body .blog-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform .4s ease;
}
.blog-article__body .blog-gallery a:hover img { transform: scale(1.06); }
.blog-article__body .blog-gallery a::after {
  content: "\f00e";
  font-family: var(--rr-ff-fontawesome);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity .3s;
}
.blog-article__body .blog-gallery a:hover::after { opacity: 1; }
.blog-article__body .blog-gallery-note { font-size: 14px; color: var(--rr-text-body); }
@media (max-width: 575px) {
  .blog-article__body .blog-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
