/* ============================================================
   REVIEWS.CSS — стилове само за страницата „Отзиви"
   ------------------------------------------------------------
   Общ файл за четирите езика (bg/en/de/pl).
   Използва съществуващите цветове/шрифтове от site.css (:root).
   ============================================================ */

.reviews-page {
  padding: 32px 0 64px;
}

#google_translate_element {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 28px;
  text-align: center;
}

#google_translate_element .goog-te-gadget {
  width: fit-content;
  text-align: center;
}

.reviews-intro {
  max-width: 780px;
  margin: 0 auto 28px;
  text-align: center;
}

.reviews-subtitle {
  color: var(--text-dark);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
  text-wrap: pretty;
}

.reviews-lead {
  color: var(--text-light);
  font-size: 1.02rem;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Бутон „Публикувай отзив" */
.reviews-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.reviews-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  background: var(--orange);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.reviews-publish-btn:hover,
.reviews-publish-btn:focus-visible {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  outline: none;
}

/* ------------------------------------------------------------
   ГРИД С КАРТИ
   ------------------------------------------------------------ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.reviews-grid[aria-busy="true"] {
  min-height: 200px;
}

/* Карта на отзив */
.review-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Аватар с инициал */
.review-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.review-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  word-break: break-word;
}

.review-type {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--orange-dark);
}

/* Ред „Държава: <стойност>" (в картата и в модала) */
.review-country {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-light);
  word-break: break-word;
}

.review-country-label {
  font-weight: 600;
  color: var(--green-dark);
}

.review-country-value {
  color: var(--text-dark);
}

.review-quote-icon {
  color: var(--gray);
  font-size: 1.5rem;
  line-height: 1;
}

.review-content {
  color: var(--text-dark);
  font-size: 0.98rem;
  line-height: 1.65;
  white-space: pre-line; /* запазва новите редове безопасно */
  word-break: break-word;
}

.review-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.review-date {
  font-size: 0.82rem;
  color: var(--text-light);
}

.review-lang-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--gray-light);
  border-radius: 6px;
  padding: 2px 8px;
}

/* Бутон „Прочети още" */
.review-readmore {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--orange-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.review-readmore:hover,
.review-readmore:focus-visible {
  color: var(--orange);
  text-decoration: underline;
  outline: none;
}

/* Състояния */
.reviews-status {
  margin: 40px auto 0;
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
}

.reviews-status.is-error {
  color: var(--brown);
}

/* ------------------------------------------------------------
   МОДАЛ (пълен отзив)
   ------------------------------------------------------------ */
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 54, 32, 0.92); /* var(--green-dark) с прозрачност */
}

.review-modal.is-open {
  display: flex;
}

.review-modal-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  box-shadow: var(--shadow-lg);
}

.review-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.review-modal-close:hover,
.review-modal-close:focus-visible {
  background: var(--orange);
  color: var(--white);
  outline: none;
}

.review-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-right: 40px;
}

.review-modal-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
}

.review-modal-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  word-break: break-word;
}

.review-modal-type {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange-dark);
}

/* Държава в модала (по-голям вариант на реда) */
.review-modal-country {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.review-modal-content {
  color: var(--text-dark);
  font-size: 1.02rem;
  line-height: 1.7;
  white-space: pre-line; /* запазва новите редове безопасно */
  word-break: break-word;
}

.review-modal-date {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-light);
}

body.review-modal-open {
  overflow: hidden;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 992px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .review-modal-box { padding: 30px 20px 24px; }
}

/* ------------------------------------------------------------
   ПАГИНАЦИЯ (номера на страници под отзивите)
   ------------------------------------------------------------ */
.reviews-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.reviews-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--white);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.reviews-page-btn:hover:not(:disabled):not(.is-active) {
  background: var(--gray-light);
  transform: translateY(-1px);
}
.reviews-page-btn.is-active {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
  cursor: default;
}
.reviews-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.reviews-page-arrow {
  font-size: 1.3rem;
  line-height: 1;
}
