/* --------------------------------- */
/* 1. CSS HERO PARTNERS */
/* --------------------------------- */

/* --- SETUP BASE DELLA PAGINA --- */
.bg-beige {
  background-color: var(--color-bg-beige);
}

/* --- TASTO CHIUDI/BACK --- */
.btn-back {
  position: fixed;
  bottom: 2.5rem; /* bottom-10 */
  right: 2.5rem; /* right-10 */
  z-index: 60;
  width: 4rem; /* w-16 */
  height: 4rem; /* h-16 */
  background-color: var(--color-brand-brown); /* bg-[#3E342B] */
  color: var(--color-bg-beige); /* text-[#E6DED1] */
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(62, 52, 43, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.1s ease;
  /* Stati iniziali per l'animazione di entrata */
  opacity: 0;
  transform: scale(0);
}

.btn-back:hover {
  background-color: var(--color-brand-green);
}

.btn-back:active {
  transform: scale(0.95);
}

.btn-back svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* --- STAGE FISSO --- */
.fixed-stage {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 0; /* Dietro al contenuto che scorrerà */
}

.stage-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Lascia passare i click allo spacer sottostante se necessario */
  will-change: transform, opacity, filter; /* Ottimizzazione hardware */
}

/* --- INTRO LAYER --- */
.intro-layer {
  padding: 1.5rem;
  text-align: center;
  /* Valori iniziali */
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
}

.intro-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem; /* xs */
  color: var(--color-brand-brown);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .intro-tag {
    font-size: 0.875rem;
  } /* sm */
}

.intro-title {
  font-family: var(--font-primary); /* font-title */
  font-size: 2.5rem; /* 5xl */
  color: var(--color-brand-brown);
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

@media (min-width: 768px) {
  .intro-title {
    font-size: 6rem;
  } /* 8xl */
}

.text-green {
  color: var(--color-brand-green);
}

.intro-separator {
  width: 6rem; /* w-24 */
  height: 1px;
  background-color: rgba(62, 52, 43, 0.3); /* brand-brown/30 */
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.intro-desc {
  font-family: var(--font-secondary);
  color: rgba(62, 52, 43, 0.7);
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.625;
}

@media (min-width: 768px) {
  .intro-desc {
    font-size: 1rem;
  }
}

/* Scroll Prompt */
.scroll-prompt {
  position: absolute;
  bottom: 3rem; /* bottom-12 */
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 50;
  pointer-events: auto; /* Riattiva i click per questo elemento */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.scroll-btn-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(62, 52, 43, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(230, 222, 209, 0.1);
  backdrop-filter: blur(2px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.scroll-prompt:hover .scroll-btn-circle {
  transform: scale(1.1);
  border-color: var(--color-brand-green);
  background-color: rgba(122, 153, 57, 0.1);
}

.arrow-down {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-brand-brown);
  transition: color 0.3s ease;
  animation: bounceArrow 1.5s ease-in-out infinite;
}

.scroll-prompt:hover .arrow-down {
  color: var(--color-brand-green);
}

@keyframes bounceArrow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-brand-brown);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.scroll-prompt:hover .scroll-label {
  opacity: 1;
  color: var(--color-brand-green);
}

/* --- HERO LOGO LAYER --- */
.hero-layer {
  /* Valori iniziali (nascosto all'inizio) */
  opacity: 0;
  transform: scale(1.2);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(230, 222, 209, 0.4);
  mix-blend-mode: overlay;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.hero-bg-pattern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 16rem; /* h-64 */
  background: linear-gradient(to top, var(--color-bg-beige), transparent);
}

.hero-logo-wrapper {
  position: relative;
  z-index: 10;
  width: 16rem; /* w-64 */
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
}

@media (min-width: 768px) {
  .hero-logo-wrapper {
    width: 24rem;
  } /* md:w-96 */
}

.hero-logo-wrapper img {
  width: 100%;
  height: auto;
}

/* --- SCROLL SPACER --- */
.scroll-spacer {
  position: relative;
  width: 100%;
  height: 150vh;
  pointer-events: none;
}

/* --------------------------------- */
/* 2. CSS BODY PARTNERS */
/* --------------------------------- */

/* --- CONTENT LIST (Il contenitore che sale da sotto) --- */
.content-list {
  position: relative;
  z-index: 10; /* Questo lo fa scorrere SOPRA la Hero (z-index: 0) */
  background-color: var(--color-bg-beige);
  width: 100%;
  margin-top: -50vh;
  padding-top: 6rem; /* pt-24 */
  padding-bottom: 10rem; /* pb-40 */
  padding-left: 1.5rem; /* px-6 */
  padding-right: 1.5rem;
  min-height: 100vh;
  /* Ombra massiccia verso l'alto per fondersi con la Hero */
  box-shadow: 0 -50px 100px rgba(230, 222, 209, 1);
}

@media (min-width: 768px) {
  .content-list {
    padding-left: 3rem;
    padding-right: 3rem;
  } /* md:px-12 */
}

.content-wrapper {
  max-width: 80rem; /* max-w-7xl */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6rem; /* space-y-24 (distanza tra i Tier) */
}

/* --- SEZIONI PARTNER --- */
.partner-section {
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-primary);
  font-size: 1.875rem; /* 3xl */
  color: var(--color-brand-brown);
  text-transform: uppercase;
  letter-spacing: -0.025em;
  font-weight: 400;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  } /* 4xl */
}

.badge-exclusive {
  background-color: var(--color-brand-green);
  color: var(--color-bg-beige);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-desc {
  font-family: var(--font-secondary);
  color: rgba(62, 52, 43, 0.6); /* brand-brown/60 */
  max-width: 36rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(62, 52, 43, 0.1);
}

/* --- GRIGLIE LAYOUT --- */
.partner-grid {
  display: grid;
  gap: 1.5rem;
}

/* Main Partner */
.layout-single {
  max-width: 56rem;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
/* Premium */
.layout-highlight {
  max-width: 42rem;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
/* Standard & Istituzionali */
.layout-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .layout-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .layout-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* Media & Tecnici */
.layout-compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .layout-compact {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1024px) {
  .layout-compact {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --- LE CARD DEI PARTNER --- */
.partner-card {
  position: relative;
  background-color: #ffffff;
  border-radius: 0.75rem; /* rounded-xl */
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(62, 52, 43, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Hover Animation Framer Motion (mentre sali il cursore) */
.partner-card:hover {
  /* transform: translateY(-5px); */
  /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); */
  border-color: rgba(62, 52, 43, 0.2);
}

/* Dimensioni Card */
.size-lg {
  height: 12rem;
} /* h-48 */
@media (min-width: 768px) {
  .size-lg {
    height: 16rem;
  }
} /* h-64 */

.size-md {
  height: 8rem;
} /* h-32 */
@media (min-width: 768px) {
  .size-md {
    height: 10rem;
  }
} /* h-40 */

.size-sm {
  height: 6rem;
} /* h-24 */
@media (min-width: 768px) {
  .size-sm {
    height: 7rem;
  }
} /* h-28 */

.card-inner {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .card-inner {
    padding: 2rem;
  }
}

/* Gestione delle Immagini all'interno (Quando aggiungerai i tag <img>) */
.card-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* filter: grayscale(100%); */
  /* opacity: 0.8; */
  transition: all 0.5s ease;
}

.partner-card:hover .card-inner img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Placeholder */
.logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb; /* gray-50 */
  text-align: center;
  padding: 1rem;
}
.logo-placeholder span {
  font-family: var(--font-primary);
  color: rgba(62, 52, 43, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ------------------------ */
/* 3. MODAL PAGE */
/* ------------------------ */

/* --- HOVER OVERLAY "SCOPRI DI PIÙ" SULLE CARD --- */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(62, 52, 43, 0.8);
  backdrop-filter: blur(2px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.partner-card:hover .card-hover-overlay {
  opacity: 1;
}

.hover-btn-text {
  color: var(--color-bg-beige);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--color-bg-beige);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.partner-card:hover .hover-btn-text {
  transform: scale(1);
}

/* --- MODALE PARTNER --- */
.partner-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none; /* Disattivo click quando nascosto */
}

@media (min-width: 768px) {
  .partner-modal {
    padding: 2rem;
  }
}

.partner-modal[aria-hidden="false"] {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(62, 52, 43, 0.6); /* #3E342B/60 */
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.partner-modal[aria-hidden="false"] .modal-backdrop {
  opacity: 1;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 42rem; /* max-w-2xl */
  background-color: #f9f7f2;
  border-radius: 1rem; /* rounded-2xl */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  /* Animazione spring (CSS puro) */
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-modal[aria-hidden="false"] .modal-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-header {
  height: 10rem; /* h-40 */
  background-color: var(--color-bg-beige);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(62, 52, 43, 0.1);
}

.modal-texture {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: var(--tex-wood, url("https://www.transparenttextures.com/patterns/wood-pattern.png"));
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-brown);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 1);
}

.modal-logo-container {
  position: relative;
  z-index: 5;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-logo-container img {
  height: inherit;
  width: inherit;
  object-fit: contain;
}

.modal-logo-text {
  font-family: var(--font-primary);
  font-size: 1.875rem;
  color: rgba(62, 52, 43, 0.2);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.modal-content {
  padding: 2rem;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal-content {
    padding: 2.5rem;
  }
}

.modal-body-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-title {
  font-family: var(--font-primary);
  font-size: 1.875rem;
  color: var(--color-brand-brown);
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.modal-website {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-brand-green);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.modal-website:hover {
  color: var(--color-brand-brown);
}

.modal-website.hidden {
  display: none;
}

.modal-divider {
  width: 4rem;
  height: 4px;
  background-color: rgba(62, 52, 43, 0.1);
  border-radius: 9999px;
}

.modal-desc {
  font-family: var(--font-secondary);
  color: rgba(62, 52, 43, 0.8);
  line-height: 1.625;
}

.modal-footer-stripe {
  height: 0.5rem;
  width: 100%;
  background-color: var(--color-brand-green);
}
