@import url('../main.css');

/* =================================================================
   NEWS PAGE
   Desktop-first structure with all responsive overrides collected
   at the end of the file.
================================================================== */

/* ===========================
   Hero
=========================== */
.hero-news {
  width: 100%;
  padding: 10% 5% 5%;
  text-align: left;
}

.hero-news-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 3rem;
}

.hero-news-copy {
  max-width: 1080px;
}

.hero-news-subtitle {
  margin: 0 0 2%;
  font-family: 'LEMON MILK', sans-serif;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-news-title {
  margin: 0;
  font-family: 'Lora', serif;
  font-size: clamp(3rem, 4.7vw, 3.875rem);
  line-height: 0.95;
  font-weight: 600;
  color: var(--color-accent);
}

.hero-news-search {
  justify-self: end;
  display: flex;
  align-items: center;
  width: 200px;
  height: 42px;
  margin-top: 8px;
  padding: 0 8px 0 14px;
  border: 1.5px solid #1d1d1d;
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
  transition: width 0.28s ease, background-color 0.2s ease;
}

.hero-news-search:focus-within {
  width: 220px;
  background-color: rgba(255, 255, 255, 0.8);
}

.hero-news-search-input {
  width: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  color: #111111;
  outline: none;
  transition: width 0.28s ease, opacity 0.18s ease, margin-right 0.28s ease;
}

.hero-news-search:focus-within .hero-news-search-input,
.hero-news-search-input:not(:placeholder-shown) {
  width: 100%;
  margin-right: 10px;
  opacity: 1;
}

.hero-news-search-input::placeholder {
  color: #666666;
}

.hero-news-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.hero-news-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
}

.hero-news-search-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===========================
   Updates Grid
=========================== */
.updates-news {
  width: 100%;
  padding: 1.5rem 5% 4.75rem;
}

.updates-news-inner {
  width: 100%;
}

.updates-news-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.updates-news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.updates-news-filter {
  min-width: 92px;
  padding: 0.66rem 1.2rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--color-accent);
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.88rem, 0.75vw, 0.95rem);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.updates-news-filter:hover,
.updates-news-filter:focus-visible,
.updates-news-filter.is-active {
  background: var(--color-accent);
  color: #ffffff;
}

.updates-news-filter:focus-visible {
  outline: 2px solid rgba(87, 26, 41, 0.25);
  outline-offset: 2px;
}

.updates-news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.updates-news-card {
  aspect-ratio: 321 / 279;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-about);
  border: 1px solid rgba(87, 26, 41, 0.08);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(26, 19, 16, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.updates-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(26, 19, 16, 0.12);
  border-color: rgba(87, 26, 41, 0.22);
}

.updates-news-card__media-link {
  flex: 0 0 50%;
  min-height: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

.updates-news-card__media {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ebe4dc;
}

.updates-news-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.58) 100%);
  pointer-events: none;
}

.updates-news-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

.updates-news-card__tag {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 0;
  padding: 0.38rem 0.8rem 0.38rem 0.9rem;
  border-radius: 0 999px 999px 0;
  background: rgba(255, 255, 255, 0.92);
  color: #2d2d2d;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.68rem, 0.65vw, 0.75rem);
  font-weight: 600;
  line-height: 1;
}

/* Lower half: tuned to fit the fixed card ratio cleanly. */
.updates-news-card__body {
  flex: 1 1 50%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.78rem 0.88rem 0.85rem;
}

.updates-news-card__date {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.6rem, 0.58vw, 0.65rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: #7c6b66;
  text-transform: uppercase;
}

.updates-news-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-family: 'LEMON MILK', sans-serif;
  font-size: clamp(0.8rem, 0.82vw, 0.92rem);
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.updates-news-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.updates-news-card__title-link:hover,
.updates-news-card__title-link:focus-visible {
  opacity: 0.78;
}

.updates-news-card__description {
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.7rem, 0.72vw, 0.78rem);
  line-height: 1.38;
  color: #4a403d;
}

.updates-news-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.1rem;
}

.updates-news-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.72rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-accent);
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.56rem, 0.55vw, 0.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.updates-news-empty {
  margin: 1rem 0 0;
  text-align: center;
  font-family: 'Lora', serif;
  font-size: clamp(1.5rem, 2vw, 1.625rem);
  color: var(--color-accent);
}

.updates-news-footer {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.updates-news-more {
  min-width: 160px;
  margin-top: 2%;
  padding: 1rem 1.4rem;
  border: 1.5px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  font-family: 'Roboto', sans-serif;
  font-size: clamp(0.95rem, 0.9vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.updates-news-more:hover,
.updates-news-more:focus-visible {
  background: var(--color-accent);
  color: #ffffff;
}

.updates-news-more[hidden] {
  display: none;
}

/* ===========================
   Recent Showcase Carousel
=========================== */
.recent-showcase {
  width: 100%;
  padding: 2rem 5% 5.75rem;
}

.recent-showcase__header {
  display: flex;
  justify-content: center;
  margin-bottom: 2.4rem;
}

.recent-showcase__title {
  margin: 2% 0 3%;
  font-family: 'LEMON MILK', sans-serif;
  font-size: clamp(2.375rem, 4vw, 3.5rem);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-accent);
}

.recent-showcase__shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(52px, 88px) minmax(0, 1164px) minmax(52px, 88px);
  justify-content: center;
  align-items: center;
  column-gap: clamp(0.75rem, 3vw, 3.4rem);
}

.recent-showcase__viewport {
  width: 100%;
  max-width: 1164px;
  overflow: hidden;
}

.recent-showcase__track {
  display: flex;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.recent-showcase__slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 1550 / 670;
  overflow: hidden;
  background: #ddd3cb;
}

.recent-showcase__slide-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.recent-showcase__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Desktop overlay stays editorial and bottom-weighted. */
.recent-showcase__overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 73.35%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.9rem;
  padding: clamp(1.5rem, 2vw, 2rem) clamp(1.6rem, 3.2vw, 2.45rem) clamp(1.4rem, 2.4vw, 2rem);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.82) 100%);
}

.recent-showcase__date {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(1.125rem, 2.25vw, 2rem);
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.recent-showcase__headline {
  margin: 0;
  max-width: none;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(2.125rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.17;
  text-transform: uppercase;
  color: #ffffff;
}

.recent-showcase__description {
  margin: 0;
  max-width: 990px;
  font-family: 'Roboto', sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  font-weight: 400;
  line-height: 1.17;
  color: #ffffff;
}

.recent-showcase__arrow {
  width: 88px;
  height: 124px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
  transition: transform 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.recent-showcase__arrow:hover,
.recent-showcase__arrow:focus-visible {
  color: var(--color-accent);
  opacity: 0.9;
}

.recent-showcase__arrow--prev:hover,
.recent-showcase__arrow--prev:focus-visible {
  transform: translateX(-4px);
}

.recent-showcase__arrow--next:hover,
.recent-showcase__arrow--next:focus-visible {
  transform: translateX(4px);
}

.recent-showcase__arrow svg {
  width: 42px;
  height: 114px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recent-showcase__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.recent-showcase__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.recent-showcase__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(87, 26, 41, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.recent-showcase__dot:hover,
.recent-showcase__dot:focus-visible,
.recent-showcase__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.05);
}

/* =================================================================
   Responsive Overrides
================================================================== */

/* Laptop piccoli */
@media (max-width: 1200px) {
  .hero-news {
    padding: 128px 40px 22px;
  }

  .hero-news-title {
    font-size: clamp(2.75rem, 4.8vw, 3.5rem);
  }

  .updates-news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recent-showcase__shell {
    grid-template-columns: 68px minmax(0, 1fr) 68px;
    column-gap: 1.5rem;
  }

  .recent-showcase__headline {
    font-size: clamp(2rem, 4.2vw, 3.5rem);
  }
}

/* Tablet grandi */
@media (max-width: 992px) {
  .hero-news {
    padding: 116px 30px 20px;
  }

  .hero-news-inner {
    gap: 1.25rem;
  }

  .hero-news-subtitle {
    font-size: clamp(1.125rem, 2.6vw, 1.5rem);
  }

  .hero-news-title {
    max-width: 660px;
    font-size: clamp(2.375rem, 5vw, 3rem);
  }

  .hero-news-search {
    margin-top: 4px;
  }

  .updates-news {
    padding-top: 1rem;
    padding-bottom: 4rem;
  }

  .updates-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .updates-news-card__tag {
    font-size: clamp(0.78rem, 1.25vw, 0.86rem);
  }

  .updates-news-card__date {
    font-size: clamp(0.7rem, 1vw, 0.8rem);
  }

  .updates-news-card__title {
    font-size: clamp(1rem, 1.55vw, 1.12rem);
  }

  .updates-news-card__description {
    font-size: clamp(0.86rem, 1.2vw, 0.96rem);
  }

  .updates-news-card__cta {
    font-size: clamp(0.68rem, 0.95vw, 0.76rem);
  }

  .recent-showcase {
    padding-top: 1.25rem;
    padding-bottom: 4.5rem;
  }

  .recent-showcase__shell {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    column-gap: 0.8rem;
  }

  .recent-showcase__slide {
    aspect-ratio: 1108 / 454;
  }

  /* On tablet the overlay must cover the full slide area. */
  .recent-showcase__overlay {
    inset: 0;
    min-height: 100%;
    gap: 0.7rem;
    padding: 1.35rem 1.45rem 1.45rem;
  }

  .recent-showcase__date {
    font-size: clamp(1rem, 2vw, 1.5rem);
  }

  .recent-showcase__headline {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.08;
  }

  .recent-showcase__description {
    max-width: 42ch;
    font-size: clamp(0.95rem, 1.8vw, 1.125rem);
    line-height: 1.22;
  }

  .recent-showcase__arrow {
    width: 64px;
    height: 96px;
  }

  .recent-showcase__arrow svg {
    width: 34px;
    height: 82px;
  }
}

/* Tablet piccoli e smartphone grandi */
@media (max-width: 768px) {
  .hero-news {
    padding: 84px 20px 18px;
  }

  .hero-news-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-news-title {
    font-size: clamp(1.875rem, 8vw, 2.625rem);
    line-height: 0.98;
  }

  .hero-news-search,
  .hero-news-search:focus-within {
    justify-self: start;
    width: min(100%, 280px);
    background-color: rgba(255, 255, 255, 0.82);
  }

  .hero-news-search-input,
  .hero-news-search:focus-within .hero-news-search-input,
  .hero-news-search-input:not(:placeholder-shown) {
    width: 100%;
    margin-right: 10px;
    opacity: 1;
  }

  .updates-news {
    padding-top: 0.75rem;
    padding-bottom: 3.5rem;
  }

  .updates-news-filters {
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .updates-news-filter {
    min-width: 84px;
    padding: 0.58rem 1rem;
    font-size: 0.88rem;
  }

  .updates-news-card__body {
    gap: 0.42rem;
    padding: 0.72rem 0.8rem 0.8rem;
  }

  .updates-news-card__title {
    font-size: clamp(0.98rem, 2.9vw, 1.06rem);
    line-height: 1.16;
  }

  .updates-news-card__description {
    font-size: clamp(0.84rem, 2.4vw, 0.9rem);
    line-height: 1.42;
  }

  .recent-showcase {
    padding-top: 1rem;
    padding-bottom: 4rem;
  }

  .recent-showcase__header {
    margin-bottom: 1.35rem;
  }

  .recent-showcase__shell {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .recent-showcase__viewport {
    width: 100%;
  }

  .recent-showcase__slide {
    aspect-ratio: 4 / 3;
  }

  .recent-showcase__overlay {
    inset: 0;
    min-height: 72%;
    gap: 0.55rem;
    padding: 1.15rem 1rem;
  }

  .recent-showcase__date {
    font-size: clamp(0.94rem, 4vw, 1.125rem);
    line-height: 1.15;
  }

  .recent-showcase__headline {
    font-size: clamp(1.375rem, 7vw, 2.125rem);
    line-height: 1.06;
  }

  .recent-showcase__description {
    max-width: none;
    font-size: clamp(0.84rem, 2.6vw, 0.92rem);
    line-height: 1.3;
  }

  .recent-showcase__arrow {
    position: absolute;
    top: calc(50% - 41px);
    z-index: 2;
    width: 46px;
    height: 82px;
  }

  .recent-showcase__arrow--prev {
    left: 4px;
  }

  .recent-showcase__arrow--next {
    right: 4px;
  }

  .recent-showcase__arrow svg {
    width: 26px;
    height: 60px;
  }
}

/* Smartphone grandi */
@media (max-width: 560px) {
  .updates-news-grid {
    grid-template-columns: 1fr;
  }

  .updates-news-more {
    width: 100%;
    max-width: 260px;
  }

  .recent-showcase__title {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  .recent-showcase__slide {
    aspect-ratio: 5 / 6;
  }

  .recent-showcase__date {
    font-size: 0.875rem;
  }
}

/* Smartphone piccoli */
@media (max-width: 480px) {
  .hero-news {
    padding: 68px 16px 14px;
  }

  .hero-news-subtitle {
    font-size: clamp(1rem, 5vw, 1.25rem);
    margin-bottom: 8px;
  }

  .hero-news-title {
    font-size: clamp(1.5rem, 8.8vw, 2.125rem);
  }

  .hero-news-search,
  .hero-news-search:focus-within {
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding-left: 12px;
  }

  .hero-news-search-input {
    font-size: 0.875rem;
  }
}
