/* ================= NOTICEBOARD – FSS STYLE ================= */

.noticeboard {
  /* background: linear-gradient(180deg, #1f1f1f 0%, #232323 100%); */
  background: linear-gradient(180deg, #232323 0%, #1f1f1f 100%);
  color: #f5f5f5;
  padding: 5rem 1rem;
}

/* Contenidor central */
.noticeboard-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Article */
.notice {
  padding: 3rem 2rem;
  border-radius: 12px;
  background-color: rgba(255,255,255,0.03);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.notice-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.notice:hover {
  transform: translateY(-6px);
  background-color: rgba(255, 255, 255, 0.06);
}


/* ================= HEADER ================= */

.notice-header {
  margin-bottom: 1.5rem;
}

.notice-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.notice-date {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  background-color: #c71313;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ================= BODY ================= */

.notice-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.notice-image {
  width: 160px;
  max-height: 140px;
  border-radius: 10px;
  overflow: hidden; /* fa que el border-radius afecti tota la box */
  background-color: #111; /* color de fons */
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* l’imatge omple tota la box i es recorta si cal */
  display: block;
}

/* .notice-image img {
  width: 160px;
  max-height: 140px;
  object-fit: contain;
  border-radius: 10px;
} */

/* Quan no hi ha imatge */
.notice-body:not(:has(.notice-image)) {
  grid-template-columns: 1fr;
}

.notice-text {
  /* margin: 0;
  width: 100%; */
  font-size: 1.05rem;
  line-height: 1.75;
  color: #d1d5db;
  text-align: justify;
}

/* ================= FOOTER ================= */

.notice-footer {
  margin-top: 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notice-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.6rem;
  background-color: transparent;
  border: 2px solid #c71313;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.notice-readmore:hover {
  background-color: #c71313;
  color: #ffffff;
}

.notice-author {
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .notice-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .notice-image {
    width: 100%;
    max-width: 300px;
    max-height: 220px;
    margin-bottom: 1rem;
    object-fit: contain;
  }

  .notice-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .notice-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .notice-footer-right {
    align-self: flex-end;
    text-align: right;
  }
}



/* ================= BEGIN: HEADER ================= */

.noticeboard-header.press-style {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

.noticeboard-header.press-style h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.noticeboard-header.press-style p {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ================= END: HEADER ================= */



/* ================= BEGIN: PINNED ================= */

.notice-header {
  position: relative; /* important perquè el badge sigui absolut respecte a l'header */
}

.notice-pinned {
  border: 2px solid #c71313;
  background: linear-gradient(
    180deg,
    rgba(199,19,19,0.12),
    rgba(255,255,255,0.04)
  );
  box-shadow: 0 0 0 1px rgba(199,19,19,0.4),
              0 10px 30px rgba(0,0,0,0.4);
}

.notice-pin {
  position: absolute; /* Desktop: a dalt a la dreta */
  top: 0;
  right: 0;
  background-color: #c71313;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: all 0.25s ease;
}

.notice-pin i {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .notice-pin {
    position: relative;
    display: flex;
    justify-content: center;  /* centra horitzontalment */
    margin: 0 auto 1rem auto;
    min-width: 36px;
    max-width: 20%;
    text-align: center;   
  }

  .notice-pin i {
    display: block;
    width: 100%;
    text-align: center;
  }
}




/* ================= END: PINNED ================= */