/* =============================================
   NOTICIAS PAGE — Corkboard Bulletin Board
   Uses home.css design tokens
============================================= */

/* =============================================
   PAGE HEADER
============================================= */
.news-header {
  min-height: 60vh;
  background: linear-gradient(140deg, #fff8e6 0%, #fde8fa 50%, #e8f9fd 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 0 0;
}

.news-header::before {
  content: '';
  position: absolute;
  top: -8rem;
  right: -6rem;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #ffc842 0%, transparent 65%);
  border-radius: 50%;
  opacity: 0.22;
  pointer-events: none;
}

.news-header__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.news-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: floatDot 6s ease-in-out infinite;
}

.news-header__content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding-bottom: 4rem;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
  opacity: 0;
}

.news-header__title {
  font-size: clamp(2.8rem, 5.5vw, 5.5rem) !important;
  margin-bottom: 1rem !important;
}

.news-header__desc {
  font-family: var(--body-font);
  font-size: 1.35rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* =============================================
   BULLETIN BOARD SECTION
============================================= */
.news-section {
  background-color: #ffc842;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.07) 1px, transparent 0),
    radial-gradient(circle at 13px 13px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  padding: 5rem 0 7rem;
  position: relative;
}

/* Top rail */
.news-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(to bottom, #e04e1f 0%, #ff6634 60%, #ffc842 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Bottom rail */
.news-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(to top, #e04e1f 0%, #ff6634 60%, #ffc842 100%);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================
   SECTION HEADER ON CORKBOARD
============================================= */
.news-section-header {
  margin-bottom: 3.5rem;
  position: relative;
}

/* Giant ghost text behind */
.news-section-header::before {
  content: 'NOTICIAS';
  position: absolute;
  top: -1.5rem;
  left: -1rem;
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.02em;
  line-height: 1;
}

.news-section-header .k-label,
.news-section-header .k-heading {
  position: relative;
  z-index: 1;
}

/* Override text colors for yellow background */
.news-section .k-heading {
  color: #2a1f14;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.news-section .k-label {
  background: rgba(255, 255, 255, 0.35);
  color: #2a1f14;
  border-color: rgba(255, 255, 255, 0.5);
}

.news-section .clr-teal {
  color: #1580a8;
}

/* =============================================
   NEWS GRID — CSS Columns Masonry
============================================= */
.news-grid {
  columns: 3;
  column-gap: 2rem;
}

/* =============================================
   NEWS CARD — Pinned Paper Note
============================================= */
.news-card {
  background: #fffef7;
  border-radius: 3px;
  overflow: visible;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  position: relative;
  break-inside: avoid;
  margin-bottom: 2.25rem;
  padding: 1.1rem 1.1rem 1.6rem;
  rotate: var(--rotation, -2deg);
  transition:
    rotate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    translate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.4s ease;
  animation: pinDrop 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  cursor: pointer;
  /* Subtle paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

.news-card:hover {
  rotate: 0deg;
  translate: 0 -8px;
  scale: 1.02;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.12),
    0 24px 56px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  z-index: 10;
}

/* =============================================
   PUSHPIN
============================================= */
.news-card-pin {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pin-color, var(--orange));
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.3),
    inset 3px 3px 7px rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 5;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pin shine */
.news-card-pin::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

/* Pin needle shadow */
.news-card-pin::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 3px 3px;
  filter: blur(1px);
}

.news-card:hover .news-card-pin {
  transform: translateX(-50%) translateY(-2px);
}

/* =============================================
   POLAROID IMAGE
============================================= */
.news-card-polaroid {
  background: #fff;
  padding: 5px 5px 14px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
  rotate: -0.8deg;
  transition: rotate 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.news-card:hover .news-card-polaroid {
  rotate: 0deg;
}

.news-card-polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* =============================================
   CARD BODY
============================================= */
.news-card-body {
  padding: 0 0.3rem;
}

.news-card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--pin-color, var(--text));
  margin: 0 0 0.55rem;
  line-height: 1.3;
}

.news-card-text {
  font-family: var(--body-font);
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin: 0 0 0.75rem;
  max-height: 5.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.news-card-read-more {
  font-family: var(--body-font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pin-color, var(--orange));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.news-card:hover .news-card-read-more {
  opacity: 1;
}

/* =============================================
   ENTRY ANIMATION
============================================= */
@keyframes pinDrop {
  from {
    opacity: 0;
    translate: 0 -28px;
    scale: 0.88;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

/* =============================================
   EMPTY STATE
============================================= */
.news-empty {
  column-span: all;
  text-align: center;
  padding: 5rem 1rem;
  color: #fff8ee;
  font-family: var(--body-font);
  font-size: 1.15rem;
}

.news-empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 1rem;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1100px) {
  .news-grid {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .news-grid {
    columns: 1;
  }

  .news-card {
    rotate: 0deg;
  }

  .news-card:hover {
    rotate: 0deg;
    translate: 0 -4px;
    scale: 1.01;
  }

}

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-card-polaroid,
  .news-card-pin {
    animation: none !important;
    transition: none !important;
    rotate: 0deg !important;
  }

  @keyframes pinDrop {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* =============================================
   MODAL
============================================= */
.nmodal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.nmodal[hidden] {
  display: none;
}

.nmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: nmodalFadeIn 0.25s ease both;
}

.nmodal__card {
  position: relative;
  background: #fffef7;
  border-radius: 3px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 2rem 2.5rem;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.2),
    0 32px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: nmodalCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nmodal__pin {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pin-color, var(--orange));
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.3),
    inset 3px 3px 7px rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.nmodal__pin::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.nmodal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.nmodal__close:hover {
  background: rgba(0, 0, 0, 0.16);
  transform: scale(1.1);
}

.nmodal__close:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.nmodal__polaroid {
  background: #fff;
  padding: 6px 6px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin-bottom: 1.5rem;
}

.nmodal__polaroid img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.nmodal__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--pin-color, var(--text));
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.nmodal__text {
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin: 0;
}

@keyframes nmodalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes nmodalCardIn {
  from { opacity: 0; translate: 0 20px; scale: 0.96; }
  to   { opacity: 1; translate: 0 0;    scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nmodal__backdrop,
  .nmodal__card {
    animation: none;
  }
}
