/* News module */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.news-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(74, 52, 40, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 14px 32px rgba(74, 52, 40, 0.09);
  color: inherit;
  text-decoration: none;
}

.news-card:hover,
.news-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(74, 52, 40, 0.14);
  outline: none;
  border-color: rgba(138, 86, 0, 0.28);
}

.news-card__media {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  background: #fff3cf;
  color: #8a5600;
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__media i {
  font-size: 34px;
}

.news-card__body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.news-card__body small {
  color: #776554;
  font-size: 12px;
  font-weight: 800;
}

.news-card__body strong {
  color: #3b291a;
  font-size: 18px;
  line-height: 1.35;
}

.news-card__body em {
  color: #5f5143;
  font-style: normal;
  line-height: 1.5;
}

.news-detail {
  display: grid;
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}

.news-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.news-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.news-detail__cover {
  width: 100%;
  aspect-ratio: 1200 / 640;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 20px 55px rgba(85, 55, 20, 0.14);
}

.news-detail__head,
.news-rich-content,
.news-source {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

.news-detail__head {
  display: grid;
  gap: 10px;
  text-align: center;
}

.news-detail__head h1 {
  margin: 0;
  color: #2f2116;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.news-detail__head p,
.news-rich-content {
  color: #5f5143;
  line-height: 1.75;
}

.news-detail__head p {
  margin-inline: auto;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  color: #776554;
  font-size: 14px;
  font-weight: 800;
}

.news-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.news-meta a {
  color: #7a4c00;
}

.news-rich-content {
  font-size: 17px;
}

.news-rich-content h1,
.news-rich-content h2,
.news-rich-content h3,
.news-rich-content h4,
.news-rich-content h5,
.news-rich-content h6 {
  color: #3b291a;
  line-height: 1.28;
  text-wrap: auto;
}

.news-rich-content h1 {
  margin: 1.4em 0 0.55em;
  font-size: clamp(26px, 3vw, 34px);
}

.news-rich-content h2 {
  margin: 1.35em 0 0.5em;
  font-size: clamp(23px, 2.4vw, 30px);
}

.news-rich-content h3 {
  margin: 1.25em 0 0.45em;
  font-size: clamp(20px, 2vw, 25px);
}

.news-rich-content h4 {
  margin: 1.15em 0 0.4em;
  font-size: clamp(18px, 1.6vw, 21px);
}

.news-rich-content h5,
.news-rich-content h6 {
  margin: 1em 0 0.35em;
  font-size: 17px;
}

.news-rich-content a {
  color: #7a4c00;
  font-weight: 800;
}

.news-rich-content figure.image {
  margin: 22px 0;
}

.news-rich-content figure.image img,
.news-rich-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(74, 52, 40, 0.10);
}

.news-rich-content figure.image-style-side {
  float: right;
  max-width: min(42%, 340px);
  margin: 6px 0 16px 20px;
}

.news-rich-content figcaption {
  margin-top: 8px;
  color: #776554;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.news-rich-content figure.table {
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.news-rich-content figure.table table,
.news-rich-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.news-rich-content th,
.news-rich-content td {
  border: 1px solid rgba(74, 52, 40, 0.14);
  padding: 12px 14px;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.news-rich-content th {
  background: rgba(217, 137, 0, 0.12);
  color: #3b291a;
  font-weight: 800;
}

.news-rich-content td {
  background: rgba(255, 253, 247, 0.72);
}

.news-source {
  display: grid;
  gap: 22px;
  margin-top: 10px;
  border: 1px solid rgba(74, 52, 40, 0.10);
  border-radius: 20px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(255, 248, 230, 0.94), rgba(255, 255, 255, 0.92)),
    url("data:image/svg+xml,%3Csvg width='96' height='84' viewBox='0 0 96 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23b97900' stroke-opacity='0.08' stroke-width='1.2'%3E%3Cpath d='M24 2 48 16 48 44 24 58 0 44 0 16Z'/%3E%3Cpath d='M72 2 96 16 96 44 72 58 48 44 48 16Z'/%3E%3Cpath d='M48 44 72 58 72 86 48 100 24 86 24 58Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 96px 84px;
  box-shadow: 0 16px 38px rgba(85, 55, 20, 0.10);
  color: #5f5143;
}

.news-source__meta {
  display: grid;
  gap: 18px;
}

.news-source__meta::before,
.news-share-actions::before {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #f6b21a, #d98900);
  color: #3b291a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(217, 137, 0, 0.16);
}

.news-source__meta::before {
  content: "დამატებითი ინფორმაცია";
}

.news-share-actions::before {
  content: "გაზიარება";
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.news-share-actions::after {
  content: "";
  flex: 1 0 100%;
  order: 1;
}

.news-share-actions .button,
.news-share-actions a {
  order: 2;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.news-source__item-label,
.news-source__item > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid rgba(74, 52, 40, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #4a3428;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(85, 55, 20, 0.08);
}

.news-tags .news-source__item-label {
  margin-right: 2px;
}

.news-tags span:not(.news-source__item-label) {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(246, 178, 26, 0.34);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff8e6;
  color: #7a4c00;
  font-size: 12px;
  font-weight: 850;
}

.news-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid rgba(74, 52, 40, 0.10);
  padding-top: 18px;
}

.facebook-share-button {
  border-color: #1877f2 !important;
  background: #1877f2 !important;
  color: #ffffff !important;
}

.facebook-share-button:hover {
  border-color: #166fe5 !important;
  background: #166fe5 !important;
  color: #ffffff !important;
}

.whatsapp-share-button {
  border-color: #25d366 !important;
  background: #25d366 !important;
  color: #0b2f18 !important;
}

.whatsapp-share-button:hover {
  border-color: #20bd5a !important;
  background: #20bd5a !important;
  color: #072410 !important;
}

.news-source__item {
  display: grid;
  gap: 9px;
  align-items: start;
}

.news-source__empty {
  margin: 0;
  color: #776554;
  font-size: 14px;
  font-weight: 800;
}

.news-source a,
.news-source strong {
  color: #7a4c00;
  font-weight: 850;
}

.news-source__item a,
.news-source__item strong {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.78);
}

.page-news-detail .landing-module-section,
.news-related {
  width: min(1100px, 100%);
  margin: clamp(30px, 5vw, 56px) auto 0;
}

.page-news-detail .landing-section-head,
.news-related__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px 18px;
  margin-bottom: 18px;
}

.page-news-detail .landing-section-head h2,
.news-related__head h2 {
  margin: 10px 0 0;
  color: #3b291a;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.page-news-detail .landing-inline-link,
.news-related__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  border: 1px solid rgba(217, 137, 0, 0.24);
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff3cf;
  color: #4a3428;
  font-weight: 900;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.page-news-detail .landing-inline-link:hover,
.page-news-detail .landing-inline-link:focus-visible,
.news-related__link:hover,
.news-related__link:focus-visible {
  border-color: rgba(217, 137, 0, 0.46);
  background: linear-gradient(135deg, #f6b21a, #d98900);
  color: #3b291a;
  box-shadow: 0 10px 22px rgba(217, 137, 0, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.news-grid--compact {
  gap: 18px;
}

.news-form-panel .ck-editor__editable {
  min-height: 340px;
}

.news-form-panel .rich-editor-image-button {
  justify-self: start;
  width: fit-content;
  margin-top: 10px;
  background: #fff3cf;
  color: #6d4200;
}

.news-engagement-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(16px, 3vw, 34px);
}

.news-engagement-modal[hidden] {
  display: none;
}

.news-engagement-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(47, 33, 22, 0.24);
  cursor: pointer;
}

.news-engagement-modal__dialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(440px, 100%);
  border: 1px solid rgba(74, 52, 40, 0.14);
  border-radius: 24px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(255, 244, 214, 0.96)),
    url("data:image/svg+xml,%3Csvg width='96' height='84' viewBox='0 0 96 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d98900' stroke-opacity='0.10' stroke-width='1.2'%3E%3Cpath d='M24 2 48 16 48 44 24 58 0 44 0 16Z'/%3E%3Cpath d='M72 2 96 16 96 44 72 58 48 44 48 16Z'/%3E%3Cpath d='M48 44 72 58 72 86 48 100 24 86 24 58Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 96px 84px;
  box-shadow: 0 26px 70px rgba(47, 33, 22, 0.26);
  color: #4a3428;
}

.news-engagement-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(74, 52, 40, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #4a3428;
  cursor: pointer;
}

.news-engagement-modal__close:hover,
.news-engagement-modal__close:focus-visible {
  border-color: rgba(217, 137, 0, 0.34);
  background: #fff3cf;
  outline: none;
}

.news-engagement-modal__icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #f6b21a, #d98900);
  color: #3b291a;
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(217, 137, 0, 0.22);
}

.news-engagement-modal__intro {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 42px;
}

.news-engagement-modal .landing-eyebrow {
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.25;
}

.news-engagement-modal h2,
.news-engagement-modal p {
  margin: 0;
}

.news-engagement-modal h2 {
  color: #2f2116;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.14;
}

.news-engagement-modal p:not(.landing-eyebrow) {
  color: #5f5143;
  line-height: 1.6;
}

.news-engagement-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.news-engagement-modal__actions .submit,
.news-engagement-modal__actions .button {
  min-height: 42px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .news-engagement-modal {
    align-items: center;
    justify-items: center;
    padding: 14px;
  }

  .news-engagement-modal__dialog {
    border-radius: 20px;
    padding: 22px 18px;
  }

  .news-engagement-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .news-engagement-modal__actions .submit,
  .news-engagement-modal__actions .button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .news-hero {
    grid-template-columns: 1fr;
  }

  .news-hero-actions {
    justify-content: flex-start;
  }

  .news-hero-actions .submit,
  .news-hero-actions .button {
    width: 100%;
  }

  .news-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .news-card__media {
    width: 74px;
    height: 74px;
  }

  .news-source {
    gap: 18px;
    padding: 16px;
  }

  .news-rich-content figure.image-style-side {
    float: none;
    max-width: 100%;
    margin: 18px 0;
  }

  .news-rich-content figure.table {
    margin-right: -4px;
    padding-bottom: 6px;
  }

  .news-rich-content th,
  .news-rich-content td {
    padding: 10px 11px;
    font-size: 15px;
  }

  .news-share-actions .button,
  .news-share-actions a {
    flex: 1 1 150px;
  }

  .page-news-detail .landing-section-head,
  .news-related__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-news-detail .landing-inline-link,
  .news-related__link {
    width: 100%;
  }
}
