/* =========================================================
   VARIABLES
   ========================================================= */

.event-titlebar,
.event-hero {
  --event-blue: #7297aa;
  --event-blue-dark: #675BB4;
  --event-text: #263c4c;
  --event-muted: #68747d;
  --event-accent: #c89524;
  --event-bg-soft: #faf8f3;
  --event-border: rgba(38, 60, 76, 0.10);
  --event-shadow: 0 18px 45px rgba(34, 55, 69, 0.13);
}


/* =========================================================
   SHARED CONTAINER
   ========================================================= */

.event-container {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
}


/* =========================================================
   TITLE BAR
   ========================================================= */

.event-titlebar {
  position: relative;
  padding: 48px 0 130px;
  background: var(--event-blue);
  color: #fff;
  overflow: hidden;
}


/* Optional decorative background */

.event-titlebar::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 4%;
  width: 330px;
  height: 180px;
  opacity: 0.11;
  background:
    linear-gradient(
      135deg,
      transparent 45%,
      rgba(255,255,255,0.8) 45%,
      rgba(255,255,255,0.8) 46%,
      transparent 46%
    );
  pointer-events: none;
}



.event-titlebar__title {
  position: relative;
  z-index: 1;

  margin: 0;

  color: #fff;

  font-size: clamp(42px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}


/* =========================================================
   EVENT HERO
   ========================================================= */

.event-hero {
  position: relative;

  margin-top: -60px;
  padding-bottom: 60px;
}


/* =========================================================
   CARD
   ========================================================= */

.event-hero__card {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;

  overflow: hidden;

  background: #fff;
  box-shadow: var(--event-shadow);
}


/* =========================================================
   LEFT AREA
   ========================================================= */

.event-hero__main {
  padding: 54px 58px;

  background:
    linear-gradient(
      90deg,
      #ffffff 0%,
      var(--event-bg-soft) 100%
    );
}


.event-hero__eyebrow {
  display: block;

  margin-bottom: 17px;

  color: var(--event-blue-dark);

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}


.event-hero__title {
  max-width: 660px;

  margin: 0;

  color: var(--event-blue-dark);

  font-size: clamp(40px, 5vw, 60px);
  font-weight: 300;
  line-height: 1.05;

  letter-spacing: -0.025em;
}


.event-hero__divider {
  display: block;

  width: 42px;
  height: 3px;

  margin: 28px 0;

  background: var(--event-accent);
}


.event-hero__description {
  max-width: 560px;

  margin: 0;

  color: var(--event-text);

  font-size: 17px;
  line-height: 1.65;
}


.event-hero__highlight {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 34px;

  color: var(--event-text);

  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}


.event-hero__highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  color: var(--event-blue-dark);

  font-size: 20px;
}


/* =========================================================
   RIGHT AREA
   ========================================================= */

.event-hero__info {
  display: flex;
  flex-direction: column;

  padding: 52px 36px;

  background: #ffffff;

  border-left: 1px solid var(--event-border);
}



/* =========================================================
   EVENT INFO LIST
   ========================================================= */

.event-info {
  display: flex;
  flex-direction: column;
  gap: 25px;

  margin: 0;
  padding: 0;

  list-style: none;
}


.event-info__item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;

  align-items: start;

  color: var(--event-text);

  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.event-info__item i:first-child {
  justify-self: start;
  color: var(--event-blue-dark);
}

.event-info__item div {
  text-align: left;
}


.event-info__item strong {
  display: block;

  margin-bottom: 2px;

  font-weight: 600;
}


.event-info__item span {
  display: block;

  color: var(--event-muted);
}


.event-info__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 28px;
  height: 28px;

  color: var(--event-blue-dark);

  font-size: 20px;
}


.event-info__item a {
  color: var(--event-text);
  text-decoration: none;

  transition: color 150ms ease;
}


.event-info__item a:hover {
  color: var(--event-blue-dark);
}

/* =========================================================
   CTA
   ========================================================= */

.event-hero__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;

  margin-top: 20px;
  padding: 14px 22px;

  background: var(--event-blue-dark);
  color: #fff;

  font-size: 14px;
  font-weight: 700;

  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;

  border-top-left-radius:7px;
  border-top-right-radius:7px;
  border-bottom-left-radius:7px;
  border-bottom-right-radius:7px;
  
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}


.event-hero__cta:hover {
  background: #1e4054;
  color: #fff;
  text-decoration: none;
}


.event-hero__cta span:last-child {
  font-size: 22px;
  font-weight: 300;
}


/* SOLD OUT */

.event-hero__cta--sold-out {
  background: #CB1E1E;
  color: #fff;
  border-color: #777;
  cursor: default;
  border-top-left-radius:7px;
  border-top-right-radius:7px;
  border-bottom-left-radius:7px;
  border-bottom-right-radius:7px;
  pointer-events: none;
}

.event-hero__cta--sold-out:hover {
  background: #CB1E1E;
  color: #fff;
  border-color: #777;
  transform: none;
}

.event-hero__cta--sold-out:active {
  transform: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

  .event-titlebar {
    padding: 42px 0 105px;
  }

  .event-hero {
    margin-top: -65px;
  }

  .event-hero__card {
    grid-template-columns: 1fr;
  }

  .event-hero__info {
    border-top: 1px solid var(--event-border);
    border-left: 0;
  }

  .event-hero__main,
  .event-hero__info {
    padding: 44px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 599px) {

  .event-container {
    width: calc(100% - 32px);
  }

  .event-titlebar {
    padding: 34px 0 88px;
  }

  .event-breadcrumb {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .event-titlebar__title {
    font-size: 42px;
  }

  .event-hero {
    margin-top: -54px;
    padding-bottom: 54px;
  }

  .event-hero__main,
  .event-hero__info {
    padding: 32px 26px;
  }

  .event-hero__title {
    font-size: 40px;
  }

  .event-hero__description {
    font-size: 16px;
  }

  .event-info {
    gap: 20px;
  }

}

/* =========================================================
   CHEFS SECTION
   ========================================================= */

.event-chefs {
  --chefs-text: #233a4d;
  --chefs-muted: #6a747d;
  --chefs-accent: #c6922d;
  --chefs-card-bg: #ffffff;
  --chefs-border: rgba(35, 58, 77, 0.1);
  --chefs-shadow: 0 12px 32px rgba(24, 45, 61, 0.1);

  width: 100%;
  padding: 80px 24px;
  background: #ffffff;
  box-sizing: border-box;
}

.event-chefs *,
.event-chefs *::before,
.event-chefs *::after {
  box-sizing: border-box;
}


/* =========================================================
   SECTION HEADER
   ========================================================= */

.event-chefs__header {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.event-chefs__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--chefs-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-chefs__title {
  margin: 0;
  color: var(--chefs-text);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.1;
}

.event-chefs__intro {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--chefs-muted);
  font-size: 17px;
  line-height: 1.65;
}


/* =========================================================
   RESPONSIVE GRID
   ========================================================= */
.chefs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}

/* 1 chef: stessa larghezza di una card della griglia a 3 */
.chefs-grid[data-count="1"] {
  grid-template-columns: minmax(0, calc((100% - 48px) / 3));
  justify-content: center;
}

/* 2 chef: entrambe mantengono la stessa larghezza */
.chefs-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, calc((100% - 48px) / 3)));
  justify-content: center;
}

/* 3, 4, 5, 6 chef */
.chefs-grid[data-count="3"],
.chefs-grid[data-count="4"],
.chefs-grid[data-count="5"],
.chefs-grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* =========================================================
   CHEF CARD
   ========================================================= */

.chef-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--chefs-card-bg);
  border: 1px solid var(--chefs-border);
  box-shadow: var(--chefs-shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.chef-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(24, 45, 61, 0.16);
}


/* =========================================================
   IMAGE
   ========================================================= */

.chef-card__media {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #edf1f3;
}

.chef-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 350ms ease;
}

.chef-card:hover .chef-card__image {
  transform: scale(1.025);
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.chef-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 18px 22px;
}

.chef-card__name {
  margin: 0 0 8px;
  color: #202934;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.chef-card__restaurant {
  margin: 0 0 10px;
  color: #3d4a56;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.chef-card__details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: var(--chefs-muted);
  font-size: 14px;
  line-height: 1.5;
  list-style: none;
}

.chef-card__details li {
  display: block;
}

.chef-card__details li:not(:last-child)::after {
  content: none;
}


/* =========================================================
   OPTIONAL BADGE
   ========================================================= */

.chef-card__badge {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 14px 0 0;
  color: #46545f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.chef-card__badge::before {
  content: "★";
  display: inline-block;
  margin-right: 6px;
  color: var(--chefs-accent);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {
  .event-chefs {
    padding: 64px 24px;
  }

  .chefs-grid,
  .chefs-grid[data-count="3"],
  .chefs-grid[data-count="4"],
  .chefs-grid[data-count="5"],
  .chefs-grid[data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }

  .chefs-grid[data-count="5"] .chef-card:nth-child(4),
  .chefs-grid[data-count="5"] .chef-card:nth-child(5) {
    grid-column: auto;
  }

  /*
    Con 5 chef, l'ultima card viene centrata.
  */

  .chefs-grid[data-count="5"] .chef-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 12px);
    justify-self: center;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 599px) {
  .event-chefs {
    padding: 52px 18px;
  }

  .event-chefs__header {
    margin-bottom: 32px;
  }

  .event-chefs__intro {
    font-size: 16px;
  }

  .chefs-grid,
  .chefs-grid[data-count="1"],
  .chefs-grid[data-count="2"],
  .chefs-grid[data-count="3"],
  .chefs-grid[data-count="4"],
  .chefs-grid[data-count="5"],
  .chefs-grid[data-count="6"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 420px;
  }

  .chefs-grid[data-count="5"] .chef-card:last-child {
    grid-column: auto;
    width: 100%;
  }

  .chef-card__content {
    padding: 20px;
  }

  .chef-card__name {
    font-size: 20px;
  }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .chef-card,
  .chef-card__image {
    transition: none;
  }

  .chef-card:hover {
    transform: none;
  }

  .chef-card:hover .chef-card__image {
    transform: none;
  }
}