.cooperative-page {
  background: #fbfcff;
}

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

.cooperative-hero {
  padding: clamp(2rem, 4vw, 3.2rem) 0;
  background:
    linear-gradient(135deg, rgba(9, 19, 45, 0.86), rgba(18, 33, 74, 0.82)),
    url("../assets/img/comunidad-educativa-cooperativa-estudiantes.png") center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.cooperative-hero-grid {
  display: block;
}

.cooperative-hero-copy {
  display: grid;
  justify-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.cooperative-kicker,
.cooperative-category {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0.28rem 0.78rem;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.cooperative-kicker {
  background: rgba(243, 194, 68, 0.18);
  color: var(--gold);
}

.cooperative-hero h1,
.cooperative-card h2,
.cooperative-framework-heading h2,
.cooperative-next h2 {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  letter-spacing: 0;
}

.cooperative-hero h1 {
  margin-top: 0.85rem;
  max-width: none;
  font-size: clamp(2.1rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
}

.cooperative-hero p {
  max-width: 70ch;
  margin: 0.95rem auto 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.55;
}

.cooperative-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  margin-top: 1.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 800;
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease;
}

.cooperative-home-button:hover,
.cooperative-home-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

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

.cooperative-intro,
.cooperative-framework,
.cooperative-next {
  padding: clamp(2.2rem, 5vw, 4.2rem) 0;
}

.cooperative-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: clamp(1rem, 3vw, 1.4rem);
  align-items: stretch;
}

.cooperative-card,
.cooperative-function {
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(8, 21, 52, 0.09);
}

.cooperative-card {
  padding: clamp(1.35rem, 4vw, 2.3rem);
}

.cooperative-card-main {
  border-left: 4px solid var(--green);
}

.cooperative-category {
  background: rgba(13, 114, 52, 0.1);
  color: var(--green-deep);
}

.cooperative-card h2,
.cooperative-framework-heading h2,
.cooperative-next h2 {
  color: var(--navy-deep);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.1;
}

.cooperative-card h2 {
  margin-top: 1rem;
}

.cooperative-card p,
.cooperative-framework-heading p,
.cooperative-next p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.68;
}

.cooperative-values {
  background:
    radial-gradient(circle at 20% 18%, rgba(243, 194, 68, 0.14), transparent 34%),
    linear-gradient(135deg, #fff, #eef3fb);
}

.cooperative-values h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.cooperative-values ul {
  display: grid;
  gap: 0.65rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.cooperative-values li {
  padding: 0.72rem 0.85rem;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy);
  font-weight: 800;
}

.cooperative-framework {
  background: #fff;
}

.cooperative-framework-heading {
  display: grid;
  gap: 0.65rem;
  max-width: 940px;
}

.cooperative-framework-heading p {
  max-width: 82ch;
}

.cooperative-function-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.1rem);
  margin-top: clamp(1.4rem, 4vw, 2rem);
}

.cooperative-function {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: clamp(1rem, 2.4vw, 1.25rem);
  box-shadow: 0 12px 30px rgba(8, 21, 52, 0.07);
}

.cooperative-function span {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: rgba(13, 114, 52, 0.1);
  color: var(--green-deep);
  font-weight: 800;
}

.cooperative-function p {
  margin: 0;
  color: var(--text);
  line-height: 1.58;
}

.cooperative-next-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.1fr);
  gap: clamp(1.2rem, 4vw, 2.3rem);
  align-items: start;
}

.cooperative-next p {
  margin-top: 0;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(8, 21, 52, 0.08);
}

.cooperative-blog-section {
  padding: clamp(2.2rem, 5vw, 4.2rem) 0;
  background: #ffffff;
}

.cooperative-loading,
.cooperative-empty {
  width: 100%;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid rgba(17, 32, 61, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 32px rgba(8, 21, 52, 0.06);
}

.cooperative-section-heading {
  display: grid;
  gap: 0.65rem;
  margin-bottom: clamp(1.2rem, 3vw, 1.8rem);
}

.cooperative-section-heading h2,
.cooperative-featured-copy h2,
.cooperative-post-card h3,
.publication-modal-content h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: "Montserrat", Arial, sans-serif;
  letter-spacing: 0;
}

.cooperative-section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.12;
}

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

.cooperative-featured-post.has-no-image {
  grid-template-columns: 1fr;
}

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

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

.cooperative-featured-media img,
.cooperative-post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.cooperative-featured-copy p,
.cooperative-post-card p {
  color: var(--muted);
  line-height: 1.55;
}

.cooperative-featured-copy p {
  margin: 1rem 0 0;
  font-size: 1.04rem;
}

.cooperative-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.cooperative-author,
.cooperative-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.cooperative-author span,
.cooperative-post-meta strong {
  color: var(--green-deep);
  font-weight: 800;
}

.cooperative-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-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.cooperative-card-footer .cooperative-link {
  margin-top: 0;
}

.cooperative-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);
}

.cooperative-post-grid[hidden] {
  display: none;
}

.cooperative-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;
}

.cooperative-post-card.has-no-image {
  grid-template-rows: 1fr;
}

.cooperative-post-card:hover,
.cooperative-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);
}

.cooperative-post-media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
}

.cooperative-post-media img {
  transition: transform 0.32s ease;
}

.cooperative-post-card:hover .cooperative-post-media img {
  transform: scale(1.045);
}

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

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

.cooperative-post-meta {
  margin: 0.85rem 0 0;
}

.cooperative-post-meta time::before {
  content: "";
  display: inline-block;
  width: 0.32rem;
  height: 0.32rem;
  margin: 0 0.3rem 0.12rem 0;
  border-radius: 50%;
  background: var(--gold);
}

.cooperative-post-summary {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.cooperative-page-control,
.cooperative-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);
}

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

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

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

.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%, 860px);
  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 {
  display: block;
  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-deep);
  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,
.publication-modal-body li {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.publication-modal-body {
  margin-top: 1rem;
  color: var(--muted);
}

.publication-modal-body > *:first-child {
  margin-top: 0;
}

.publication-modal-body h1,
.publication-modal-body h2,
.publication-modal-body h3,
.publication-modal-body h4 {
  margin: 1.35rem 0 0;
  color: var(--navy-deep);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.18;
}

.publication-modal-body h1 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.publication-modal-body h2,
.publication-modal-body h3,
.publication-modal-body h4 {
  font-size: clamp(1.22rem, 2.4vw, 1.55rem);
}

.publication-modal-body ul,
.publication-modal-body ol {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.publication-modal-body figure {
  margin: 1.25rem auto 0;
  width: min(100%, 720px);
}

.publication-modal-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 8px;
}

.publication-modal-body iframe,
.publication-modal-body video,
.publication-modal-body embed {
  display: block;
  width: min(100%, 720px);
  margin: 1.25rem auto 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-alt);
}

.publication-modal-body iframe,
.publication-modal-body embed {
  aspect-ratio: 16 / 9;
  height: min(56.25vw, 405px);
  min-height: 220px;
}

.publication-modal-body video {
  height: auto;
}

.publication-modal-body a {
  color: var(--green-deep);
  font-weight: 800;
}

.publication-carousel {
  position: relative;
  margin-top: clamp(1.25rem, 3vw, 1.8rem);
  margin-inline: auto;
  width: min(100%, 720px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-alt);
}

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

.publication-carousel-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.publication-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 21, 52, 0.74);
  color: #ffffff;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

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

.publication-carousel-control.is-prev {
  left: 0.85rem;
}

.publication-carousel-control.is-next {
  right: 0.85rem;
}

.publication-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transform: translateX(-50%);
}

.publication-carousel-dots[hidden],
.publication-carousel-count[hidden] {
  display: none;
}

.publication-carousel-dot {
  width: 0.68rem;
  height: 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  padding: 0;
}

.publication-carousel-dot.is-active {
  background: #ffffff;
}

.publication-carousel-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.78rem;
  z-index: 2;
  min-width: 3.4rem;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: rgba(8, 21, 52, 0.74);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 980px) {
  .cooperative-hero-grid,
  .cooperative-intro-grid,
  .cooperative-next-grid,
  .cooperative-featured-post,
  .cooperative-post-grid {
    grid-template-columns: 1fr;
  }

  .cooperative-featured-post::before {
    width: 100%;
    height: 4px;
    right: 0;
    bottom: auto;
  }

  .cooperative-featured-media {
    min-height: 290px;
  }

  .cooperative-hero h1 {
    max-width: 15ch;
  }

  .cooperative-function-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cooperative-hero h1 {
    font-size: clamp(2.1rem, 11vw, 3.1rem);
  }

  .cooperative-function {
    grid-template-columns: 1fr;
  }

  .cooperative-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .publication-modal {
    padding: 0.75rem;
  }

  .publication-modal-card {
    max-height: 94vh;
  }

  .publication-modal-image {
    aspect-ratio: 16 / 10;
  }

  .publication-carousel-control {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.65rem;
  }
}
