/* Congresso ISI - responsive layout from desktop/mobile PSD */

:root {
  --navy: #163559;
  --navy-dark: #1a334b;
  --navy-light: #2a4a72;
  --red: #b5121b;
  --grey: #5f6772;
  --grey-light: #8a929c;
  --white: #ffffff;
  --card-shadow: 0 4px 24px rgba(22, 53, 89, 0.12);
  --max-width: 1140px;
  --hero-bg-fade-height: clamp(140px, 20vh, 260px);
  --font-sans: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--grey);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  overflow-x: hidden;
}

/* Header logos */
.site-header {
  padding: 1.25rem 1rem 0;
  background: var(--white);
}

.site-header__logos {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header__logos img {
  width: 100%;
}

/* Intro: hero + link CTA + note organizzative con sfondo condiviso */
.intro {
  position: relative;
  overflow: hidden;
}

.intro__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: var(--white);
  background-image: url("../assets/bg-waves-mobile.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right 28%;
}

@media (min-width: 640px) {
  .intro__bg {
    background-image: url("../assets/bg-waves.jpg");
    background-position: right 32%;
  }
}

.intro__bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--hero-bg-fade-height);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.95) 100%
  );
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1rem 1.25rem;
}

.hero__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero__logo-isi {
  width: min(100%, 280px);
  margin-bottom: 1rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
}

.hero__content {
  min-width: 0;
}

.hero__heading {
  width: min(100%, 320px);
  margin-bottom: 0.5rem;
}

.hero__occasion {
  width: min(100%, 260px);
  margin-bottom: 1rem;
}

.hero__theme {
  width: min(100%, 340px);
  margin-bottom: 1rem;
}

.hero__location {
  width: min(100%, 280px);
}

.hero__visual {
  width: clamp(120px, 38vw, 200px);
  flex-shrink: 0;
}

.hero__visual img {
  width: 100%;
  border-radius: 50%;
}

/* CTA cards */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1rem 2.5rem;
}

.cta-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.cta-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(22, 53, 89, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cta-card:hover,
.cta-card:focus-within {
  box-shadow: 0 8px 32px rgba(22, 53, 89, 0.16);
  transform: translateY(-1px);
}

.cta-card__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.cta-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cta-card__label {
  min-width: 0;
}

.cta-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-transform: uppercase;
}

.cta-card__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--grey-light);
  line-height: 1.35;
}

.cta-card__action {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--navy-light);
  min-height: 3rem;
}

.cta-card__arrow {
  width: 22px;
  height: 18px;
  flex-shrink: 0;
}

.cta-card__link {
  font-size: clamp(0.68rem, 2.4vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--red);
  text-transform: uppercase;
  line-height: 1.25;
}

.cta-card__link:hover,
.cta-card__link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Notes section */
.notes {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem 2.5rem;
  background: var(--white);
}

.notes__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.notes__heading {
  width: min(100%, 520px);
  margin-bottom: 1.75rem;
}

.notes__grid {
  display: grid;
  gap: 1.5rem;
}

.contacts {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--grey);
}

.contacts h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
  text-transform: uppercase;
}

.contacts h3 + p,
.contacts p {
  margin: 0 0 1.25rem;
}

.contacts a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contacts a:hover {
  color: var(--red);
}

.notes__lingue {
  width: min(100%, 560px);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 1.35rem 1rem;
  font-size: clamp(0.72rem, 2.5vw, 0.9rem);
  letter-spacing: 0.02em;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 479px) {
  .cta-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 0.9rem 1rem;
  }

  .cta-card__action {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 2px solid var(--navy-light);
    padding: 0.75rem 0 0;
    min-height: auto;
  }
}

/* Tablet */
@media (min-width: 640px) {
  .site-header {
    padding: 1.75rem 1.5rem 0;
  }

  .hero {
    padding: 2rem 1.5rem 3rem;
  }

  .hero__grid {
    grid-template-columns: 1fr min(42%, 320px);
    gap: 1.5rem 2rem;
    align-items: center;
  }

  .hero__logo-isi {
    width: min(100%, 420px);
    margin-bottom: 1.25rem;
  }

  .hero__heading {
    width: min(100%, 520px);
  }

  .hero__occasion {
    width: min(100%, 480px);
  }

  .hero__theme {
    width: min(100%, 560px);
  }

  .hero__location {
    width: min(100%, 480px);
  }

  .hero__visual {
    width: 100%;
    justify-self: end;
  }

  .cta-section {
    padding: 0 1.5rem 3rem;
  }

  .cta-card {
    grid-template-columns: auto minmax(140px, 220px) 1fr;
    padding: 1.1rem 1.5rem;
    gap: 1rem 1.5rem;
  }

  .cta-card__icon {
    width: 64px;
    height: 64px;
  }

  .cta-card__title {
    font-size: 1.05rem;
  }

  .cta-card__action {
    justify-content: flex-start;
    padding-left: 1.25rem;
  }

  .notes {
    padding: 3rem 1.5rem 2.5rem;
  }

  .notes__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Desktop layout */
@media (min-width: 960px) {
  .site-header {
    padding-top: 2rem;
  }

  .hero {
    padding: 2.5rem 2rem 3.5rem;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 2rem 3rem;
  }

  .hero__logo-isi {
    width: min(100%, 560px);
  }

  .hero__visual {
    max-width: 420px;
  }

  .cta-section {
    padding: 0 2rem 3.5rem;
  }

  .cta-section__inner {
    gap: 1.15rem;
  }

  .cta-card {
    padding: 1.15rem 2rem;
  }

  .cta-card__link {
    font-size: 0.85rem;
  }

  .notes {
    padding: 3.5rem 2rem 2.5rem;
  }

  .notes__grid {
    grid-template-columns: 1fr minmax(280px, 420px);
    align-items: end;
    gap: 2rem 3rem;
  }

  .notes__lingue {
    justify-self: end;
    align-self: end;
  }
}

@media (min-width: 1200px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}
