.junta-page {
  background: #fbfcff;
}

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

.junta-hero {
  padding: clamp(2.8rem, 6vw, 4.8rem) 0 clamp(2.2rem, 5vw, 3.4rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 252, 0.9)),
    linear-gradient(135deg, rgba(13, 114, 52, 0.12), rgba(243, 194, 68, 0.2));
  text-align: center;
}

.junta-hero-copy {
  display: grid;
  justify-items: center;
}

.junta-hero .section-tag {
  margin-bottom: 0.75rem;
}

.junta-hero h1 {
  position: relative;
  margin: 0;
  color: var(--navy-deep);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.junta-hero h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.8rem;
  width: 138px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(13, 114, 52, 0.12), var(--green), var(--gold));
  transform: translateX(-50%);
}

.junta-hero p:not(.section-tag) {
  max-width: 62ch;
  margin: 1.7rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.junta-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(18, 33, 74, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy-deep);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(8, 21, 52, 0.08);
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.junta-home-button:hover,
.junta-home-button:focus-visible {
  border-color: rgba(13, 114, 52, 0.42);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(8, 21, 52, 0.12);
  transform: translateY(-2px);
}

.junta-home-button svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2;
}

.junta-blog-section {
  padding-top: clamp(2rem, 5vw, 3.6rem);
  background: #ffffff;
}

.junta-featured {
  position: relative;
}

.junta-main-post {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(360px, 0.9fr);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(8, 21, 52, 0.1);
}

.junta-main-post::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--green);
}

.junta-main-media {
  min-height: clamp(310px, 36vw, 420px);
  background: var(--surface-alt);
}

.junta-main-media img,
.junta-post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.junta-main-content {
  display: grid;
  align-content: center;
  padding: clamp(1.65rem, 4vw, 2.6rem);
}

.junta-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0.28rem 0.78rem;
  border-radius: 4px;
  background: rgba(13, 114, 52, 0.11);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.junta-main-content h2,
.junta-post-card h3,
.junta-panel-heading h2,
.junta-document-item h3,
.publication-modal-content h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: "Montserrat", Arial, sans-serif;
  letter-spacing: 0;
}

.junta-main-content h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.14;
}

.junta-main-content p,
.junta-post-card p,
.junta-document-item p {
  color: var(--muted);
  line-height: 1.55;
}

.junta-main-content p {
  margin: 1rem 0 0;
  font-size: 1.04rem;
}

.junta-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.junta-post-meta span {
  color: var(--green);
  font-weight: 800;
}

.junta-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.2rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.junta-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.35rem);
  margin-top: clamp(1.6rem, 4vw, 2rem);
}

.junta-post-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-bottom: 2px solid var(--green);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(8, 21, 52, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.junta-post-card[hidden] {
  display: none;
}

.junta-post-card:hover,
.junta-post-card:focus-within {
  border-color: rgba(13, 114, 52, 0.26);
  box-shadow: 0 20px 46px rgba(8, 21, 52, 0.12);
  transform: translateY(-4px);
}

.junta-post-card img {
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
}

.junta-post-card-body {
  display: grid;
  align-content: start;
  padding: clamp(1.15rem, 3vw, 1.45rem);
}

.junta-post-card h3 {
  margin-top: 1rem;
  font-size: clamp(1.08rem, 2.2vw, 1.28rem);
  line-height: 1.28;
}

.junta-post-card p {
  margin: 0.75rem 0 0;
}

.junta-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: clamp(2rem, 5vw, 3.2rem);
}

.junta-page-control,
.junta-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy-deep);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(8, 21, 52, 0.08);
}

.junta-page-number.is-active,
.junta-page-control:hover,
.junta-page-number:hover {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.junta-page-control:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.junta-page-control:disabled:hover {
  border-color: rgba(17, 32, 61, 0.08);
  background: #ffffff;
  color: var(--navy-deep);
}

.junta-management-section {
  background: #eef3f1;
}

.junta-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: clamp(1.2rem, 4vw, 2rem);
  align-items: start;
}

.junta-documents-panel,
.junta-publish-panel {
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(8, 21, 52, 0.08);
}

.junta-documents-panel {
  padding: clamp(1.35rem, 3vw, 1.8rem);
}

.junta-publish-panel {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.junta-panel-heading {
  display: grid;
  gap: 0.8rem;
}

.junta-panel-heading h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.14;
}

.junta-document-list,
.junta-publish-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.junta-document-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-radius: 8px;
  background: #fbfcff;
}

.junta-document-item > span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(243, 194, 68, 0.22);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.junta-document-item h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.junta-document-item p {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
}

.junta-document-item a {
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.junta-publish-form label {
  display: grid;
  gap: 0.38rem;
  color: var(--navy-deep);
  font-weight: 800;
}

.junta-publish-form input,
.junta-publish-form select,
.junta-publish-form textarea {
  width: 100%;
  border: 1px solid rgba(17, 32, 61, 0.12);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--text);
  font: inherit;
}

.junta-publish-form input,
.junta-publish-form select {
  min-height: 48px;
  padding: 0 0.85rem;
}

.junta-publish-form input[type="file"] {
  padding: 0.7rem 0.85rem;
}

.junta-publish-form textarea {
  min-height: 126px;
  padding: 0.85rem;
  resize: vertical;
}

.junta-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.junta-submit:hover {
  background: var(--green-deep);
  box-shadow: 0 14px 30px rgba(8, 21, 52, 0.14);
  transform: translateY(-2px);
}

.publication-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

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

.publication-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 52, 0.62);
  backdrop-filter: blur(6px);
}

.publication-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(92vh, 820px);
  overflow: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(8, 21, 52, 0.28);
}

.publication-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 21, 52, 0.72);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.publication-modal-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  background: var(--surface-alt);
}

.publication-modal-content {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.publication-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  color: var(--green);
  font-weight: 800;
}

.publication-modal-content h2 {
  margin-top: 0.85rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.12;
}

.publication-modal-content p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .junta-main-post,
  .junta-post-grid,
  .junta-management-layout {
    grid-template-columns: 1fr;
  }

  .junta-main-post::before {
    right: 0;
    bottom: auto;
    width: auto;
    height: 4px;
  }
}

@media (max-width: 680px) {
  .junta-document-item {
    grid-template-columns: 1fr;
  }

  .junta-document-item > span {
    width: fit-content;
    min-width: 48px;
  }

  .junta-document-item a {
    white-space: normal;
  }
}
