:root {
  --bg: #060B08;
  --bg-soft: #0A130E;
  --bg-panel: #0E1912;
  --ink: #EEF3EE;
  --ink-dim: #9FB0A4;
  --ink-dim-2: #9fb0a438;
  --ink-dark: #122018;
  --muted: #66746A;
  --paper: #F3F7F1;
  --paper-2: #EAF1EA;
  --paper-p: #eef3eec7;
  --paper-meta: #ffffff9d;
  --brand: #2F6B3E;
  --brand-dark: #1E4628;
  --brand-bright: #4E9A5C;
  --cyan: #7FE0CB;
  --cyan-2: #31a88e;
  --amber: #E8B94A;
  --red: #C1440E;
  --hairline: rgba(238, 243, 238, .15);
  --hairline-dark: rgba(18, 32, 24, .13);
  --glass: rgba(238, 243, 238, .07);
  --glass-strong: rgba(238, 243, 238, .12);
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 26px;
  --x-color-b: #061009;
  --x-color-w: #ffffff;
  --verde-obscuro: #1e4628;
}

/* Página de noticias */
.news-page {
    background: var(--paper);
}

.news-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 460px;
    padding: 190px 0 90px;
    color: var(--ink);
    background: linear-gradient(135deg, #07110c, #163421 58%, #23533b);
}

.news-hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.news-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.035);
    transition:
        opacity 1.4s ease,
        transform 7s linear;
}

.news-hero-slide.is-active {
    opacity: 1;
    transform: scale(1.09);
}

.news-hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(.72) contrast(1.08) brightness(.62);
}

.news-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(4, 11, 7, .94) 0%, rgba(5, 16, 10, .82) 42%, rgba(10, 35, 21, .57) 100%),
        linear-gradient(180deg, rgba(3, 9, 6, .26), rgba(4, 13, 8, .72));
    pointer-events: none;
}

.news-page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at 75% 20%, rgba(127, 224, 203, .16), transparent 35%);
}

.news-page-hero > .geo-grid {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.news-page-hero .section-inner {
    position: relative;
    z-index: 4;
}

.news-page-hero .kicker {
    color: var(--cyan);
}

.news-page-hero .display {
    max-width: 800px;
}

.news-page-hero .lead {
    max-width: 680px;
    color: rgba(238, 243, 238, .72);
}

.news-archive {
    padding-top: 72px;
}

.news-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 20px;
    margin-bottom: 34px;
    scrollbar-width: thin;
}

.news-filters a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid var(--hairline-dark);
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: .88rem;
    transition: .2s ease;
}

.news-filters a:hover,
.news-filters a.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* .news-archive-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--brand-dark) !important;
    border-radius: 28px;
    background: transparent !important;
    box-shadow: 0 16px 44px rgba(18, 32, 24, .06);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
    backdrop-filter: blur(1px);
}

.news-archive-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 56px rgba(18, 32, 24, .12);
    backdrop-filter: blur(90px);
    border: 1px solid var(--paper) !important;
} */

.news-archive-card {
  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(127, 224, 203, 0.16) !important;
  border-radius: 28px;

  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(78, 154, 92, 0.16),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(14, 25, 18, 0.92),
      rgba(6, 11, 8, 0.82)
    ) !important;

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(238, 243, 238, 0.05);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  cursor: pointer;

  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.news-archive-card:hover,
.news-archive-card:focus-within {
  transform: translateY(-6px);

  border-color: rgba(127, 224, 203, 0.42) !important;

  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(78, 154, 92, 0.24),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(18, 38, 26, 0.96),
      rgba(7, 15, 10, 0.9)
    ) !important;

  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.38),
    0 0 32px rgba(127, 224, 203, 0.08),
    inset 0 1px 0 rgba(238, 243, 238, 0.08);
}

@media (max-width: 760px) {
  .news-archive-card {
    border-radius: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .news-archive-card:hover,
  .news-archive-card:focus-within {
    transform: translateY(-3px);
  }
}

.news-archive-image {
    aspect-ratio: 16 / 10;
    background: #dfe8df var(--news-image) center / cover no-repeat;
}

.news-archive-copy {
    padding: 24px;
}

.news-archive-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--paper-meta) !important;
    font: 500 .72rem 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.news-archive-copy h2 {
    margin: 15px 0 10px;
    font: 600 1.35rem/1.16 'Space Grotesk', sans-serif;
    overflow-wrap: anywhere;
    color: var(--paper);
}

.news-archive-copy p {
    color: var(--paper-p);
    line-height: 1.6;
}

/* .news-read-more {
    display: inline-flex;
    gap: 8px;
    margin-top: 20px;
    color: var(--cyan-2);
    font-weight: 700;
}

.news-read-more:hover {
    display: inline-flex;
    gap: 8px;
    margin-top: 20px;
    color: var(--cyan-2);
    font-weight: 700;
} */

.news-read-more {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 20px;

  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.news-read-more::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;

  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-read-more:hover,
.news-read-more:focus-visible {
  color: var(--cyan);
  transform: translateX(3px);
}

.news-read-more:hover::after,
.news-read-more:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}




.news-pagination {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
}

.news-pagination a {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--brand);
    color: white;
    text-decoration: none;
}

.news-state {
    margin-top: 44px;
    padding: 38px;
    border: 1px solid var(--hairline-dark);
    border-radius: 26px;
    background: rgba(255, 255, 255, .7);
    text-align: center;
}

.news-state p {
    margin-top: 8px;
    color: var(--muted);
}

/* Modal de lectura */
body.news-modal-open {
    overflow: hidden;
}

.news-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    place-items: center;
    padding: 24px;
}

.news-modal.is-open {
    display: grid;
}

.news-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 7, .78);
    backdrop-filter: blur(10px);
}

.news-modal-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 30px;
    background: var(--paper);
    color: var(--ink-dark);
    box-shadow: 0 30px 100px rgba(0, 0, 0, .44);
}

.news-modal-close {
    position: sticky;
    z-index: 5;
    top: 16px;
    float: right;
    width: 44px;
    height: 44px;
    margin: 16px 16px -60px 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(6, 11, 8, .72);
    color: white;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.news-modal-loading {
    min-height: 360px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.news-modal-image {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    background: #dfe8df;
}

.news-modal-body {
    padding: clamp(26px, 5vw, 60px);
}

.news-modal-meta {
    margin-bottom: 16px;
    color: var(--brand);
    font: 500 .78rem 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.news-modal-body>h2 {
    max-width: 780px;
    margin-bottom: 30px;
    font: 650 clamp(2rem, 5vw, 3.7rem)/1.02 'Space Grotesk', sans-serif;
    letter-spacing: -.04em;
}

.news-modal-content {
    color: #34443a;
    font-size: 1.02rem;
    line-height: 1.8;
}

.news-modal-content>*+* {
    margin-top: 1.2em;
}

.news-modal-content h2,
.news-modal-content h3,
.news-modal-content h4 {
    color: var(--ink-dark);
    line-height: 1.2;
}

.news-modal-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    border-radius: 18px;
}

.news-modal-content iframe,
.news-modal-content video {
    display: block;
    width: 100%;
    max-width: 100%;
}

.news-modal-content table,
.news-modal-content pre {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.news-modal-content a {
    color: var(--brand);
    text-underline-offset: 3px;
}

.news-modal-content ul,
.news-modal-content ol {
    padding-left: 1.4em;
}

.news-modal-content blockquote {
    padding-left: 20px;
    border-left: 3px solid var(--brand);
    color: var(--muted);
}

@media (max-width: 1000px) {
    .news-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .news-page-hero {
        min-height: 390px;
        padding: calc(128px + env(safe-area-inset-top)) 0 64px;
    }

    .news-page-hero::before {
        background: linear-gradient(180deg, rgba(4, 12, 8, .82), rgba(5, 19, 11, .9));
    }

    .news-hero-slide img {
        filter: saturate(.68) contrast(1.05) brightness(.48);
    }

    .news-archive {
        padding-top: 48px;
    }

    .news-archive-grid {
        grid-template-columns: 1fr;
    }

    .news-modal {
        padding: 0;
    }

    .news-modal-dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .news-modal-close {
        top: calc(10px + env(safe-area-inset-top));
        margin-top: 10px;
        margin-right: 10px;
    }

    .news-modal-body {
        padding: 28px 20px calc(48px + env(safe-area-inset-bottom));
    }

    .news-modal-body>h2 {
        margin-bottom: 22px;
        font-size: clamp(1.8rem, 9vw, 2.7rem);
        overflow-wrap: anywhere;
    }

    .news-archive-card {
        border-radius: 22px;
    }

    .news-archive-copy {
        padding: 20px;
    }

    .news-filters {
        margin-inline: -2px;
        padding-bottom: 14px;
        scroll-snap-type: x proximity;
    }

    .news-filters a {
        scroll-snap-align: start;
    }

    .news-home-actions {
        justify-content: stretch;
    }

    .news-home-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.news-list {
    display: grid;
    gap: 16px;
}

.news-card {
    background: white;
    border: 1px solid var(--hairline-dark);
    border-radius: 24px;
    padding: 24px;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    align-items: center;
    transition: .25s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 46px rgba(18, 32, 24, .08);
}

.news-date {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: var(--paper-2);
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--brand);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .12em;
}

.news-date b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    letter-spacing: -.05em;
    display: block;
    color: var(--ink-dark);
}

.news-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.news-card p {
    color: var(--muted);
    line-height: 1.55;
    font-size: .95rem;
}

@media (max-width: 640px) {
    .news-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
        border-radius: 20px;
    }

    .news-date {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .news-date b {
        font-size: 1.65rem;
    }

    .news-card h4,
    .news-card p {
        overflow-wrap: anywhere;
    }

    .news-pagination {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 36px;
    }
}

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

    .news-date {
        width: 100%;
        height: auto;
        min-height: 58px;
        grid-auto-flow: column;
        justify-content: center;
        gap: 8px;
  }
}

@media (max-width: 900px) and (max-height: 600px) and (orientation: landscape) {
    .news-modal {
        padding: 8px;
    }

    .news-modal-dialog {
        width: min(920px, 100%);
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 18px;
    }

    .news-modal-image {
        max-height: 58dvh;
    }
}
