/*!
 * I Porci Scomodi — BBQ Team
 * Stili custom — Bootstrap 5
 * Tema BBQ: colori caldi, font d'impatto, animazioni leggere
 */

/* ==================== CSS CUSTOM PROPERTIES ==================== */
:root {
  --color-ember:   #C0392B;   /* arancione bruciato — colore primario */
  --color-amber:   #E67E22;   /* ambra fuoco — accenti e hover */
  --color-smoke:   #1C1C1C;   /* nero fumé — sfondi scuri */
  --color-wood:    #5D4037;   /* marrone legno — secondario */
  --color-cream:   #FDF6EC;   /* bianco caldo — sfondi chiari */

  --font-heading:  'Oswald', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-ui:       'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body:     'Helvetica Neue', Helvetica, Arial, sans-serif;

  --transition-fast: 0.2s ease;
  --transition-std:  0.35s ease;
}


/* ==================== GLOBAL ==================== */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: var(--font-body);
  color: #2c2c2c;
}

p {
  line-height: 1.75;
}

a {
  color: var(--color-ember);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-amber);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
}

section {
  padding: 80px 0;
}

@media (min-width: 768px) {
  section {
    padding: 120px 0;
  }
}

/* Intestazioni di sezione */
.section-heading {
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.section-subheading {
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 60px;
  font-family: var(--font-body);
}

/* Utilità per testi su sfondo scuro */
.text-muted-light {
  color: rgba(255, 255, 255, 0.55) !important;
}

.bg-smoke {
  background-color: var(--color-smoke);
}


/* ==================== BUTTONS ==================== */

.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  transition: background-color var(--transition-std), border-color var(--transition-std), transform var(--transition-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-ember);
  border-color: var(--color-ember);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--color-wood) !important;
  border-color:     var(--color-wood) !important;
  color: #fff !important;
}

.btn-xl {
  font-size: 1.1rem;
  padding: 16px 36px;
}


/* ==================== NAVBAR ==================== */

#mainNav {
  background-color: var(--color-smoke);
  font-family: var(--font-ui);
  transition: padding var(--transition-std), background-color var(--transition-std);
}

#mainNav .navbar-brand {
  color: var(--color-amber);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

#mainNav .navbar-brand:hover {
  color: #fff;
}

#mainNav .navbar-toggler {
  font-size: 0.8rem;
  padding: 10px 14px;
  text-transform: uppercase;
  color: #fff;
  border: 0;
  background-color: var(--color-ember);
  font-family: var(--font-ui);
}

#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.75em 1em;
  transition: color var(--transition-fast);
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--color-amber);
}

/* Su desktop: navbar trasparente finché non si scrolla */
@media (min-width: 992px) {
  #mainNav {
    padding-top: 20px;
    padding-bottom: 20px;
    background-color: transparent;
  }

  #mainNav .navbar-brand {
    font-size: 1.6rem;
  }

  /* Stato shrink: applicato da JS al primo scroll */
  #mainNav.navbar-shrink {
    padding-top: 0;
    padding-bottom: 0;
    background-color: var(--color-smoke);
  }

  #mainNav.navbar-shrink .navbar-brand {
    font-size: 1.25rem;
  }
}


/* ==================== HERO / MASTHEAD ==================== */

header.masthead {
  position: relative;
  text-align: center;
  color: #fff;
  background-image: url("../img/header-bg.jpg");
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: center center;
  background-size: cover;
}

/* Overlay scuro per leggibilità del testo */
header.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 0;
}

header.masthead .container {
  position: relative;
  z-index: 1;
}

.intro-text {
  padding-top: 140px;
  padding-bottom: 100px;
}

.team-logo {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--color-amber);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  display: block;
  margin: 0 auto;
}

.intro-heading {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.65);
}

.intro-lead-in {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: var(--color-amber);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .intro-text {
    padding-top: 260px;
    padding-bottom: 160px;
  }

  .team-logo {
    width: 180px;
    height: 180px;
  }

  .intro-heading {
    font-size: 5rem;
  }

  .intro-lead-in {
    font-size: 1.5rem;
  }
}


/* ==================== SERVICES ==================== */

#services .service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--color-ember);
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  transition: background-color var(--transition-std), transform var(--transition-std);
}

#services .col-md-4:hover .service-icon {
  background-color: var(--color-wood);
  transform: scale(1.08) translateY(-4px);
}

.service-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ==================== TIMELINE — RISULTATI ==================== */

.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

/* Linea verticale centrale */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px;
  width: 2px;
  background-color: var(--color-ember);
}

.timeline > li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: 80px;
  margin-bottom: 50px;
}

.timeline > li:last-child {
  margin-bottom: 0;
}

/* Cerchio icona nella timeline */
.timeline-image {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--color-ember);
  border: 4px solid var(--color-amber);
  color: #fff;
  font-size: 1.6rem;
}

.timeline-panel {
  flex: 1;
  padding-left: 28px;
  padding-top: 8px;
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-amber);
  letter-spacing: 0.12em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.timeline-body p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.badge-result {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  background-color: var(--color-wood);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 6px;
}

.badge-result.gold {
  background: linear-gradient(135deg, #b8860b, #d4a017);
  color: #fff;
}

/* Timeline su schermi medi: layout biforcato */
@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline > li {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    min-height: 100px;
    margin-bottom: 70px;
  }

  .timeline > li.timeline-inverted {
    flex-direction: row-reverse;
  }

  .timeline-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }

  .timeline > li .timeline-panel {
    width: calc(50% - 80px);
    padding-left: 0;
    padding-right: 30px;
    text-align: right;
  }

  .timeline > li.timeline-inverted .timeline-panel {
    padding-right: 0;
    padding-left: 30px;
    text-align: left;
  }
}


/* ==================== TEAM ==================== */

.team-member {
  margin-bottom: 40px;
  text-align: center;
  transition: transform var(--transition-std);
}

.team-member:hover {
  transform: translateY(-6px);
}

.team-member img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 5px solid var(--color-amber);
  transition: border-color var(--transition-std), box-shadow var(--transition-std);
}

.team-member:hover img {
  border-color: var(--color-ember);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.3);
}

.team-member h4 {
  margin-top: 1rem;
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  text-transform: none;
}

.team-member p {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}


/* ==================== PARTNER / SPONSOR ==================== */

.sponsor-logo {
  max-height: 80px;
  filter: grayscale(30%);
  transition: filter var(--transition-std), transform var(--transition-std);
}

.sponsor-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* Foto di gruppo a piena larghezza */
.team-group-photo {
  display: block;
  max-height: 500px;
  object-fit: cover;
  object-position: center top;
}


/* ==================== INSTAGRAM CTA ==================== */

.instagram-cta {
  background: linear-gradient(135deg, #1C1C1C 0%, #3d1a2e 50%, #1C1C1C 100%);
}

.instagram-icon {
  display: block;
  font-size: 3.5rem;
  color: var(--color-amber);
  margin-bottom: 1rem;
}


/* ==================== CONTACT ==================== */

section#contact {
  background-color: var(--color-smoke);
  background-image: url("../img/map-image.png");
  background-repeat: no-repeat;
  background-position: center;
}

section#contact .section-heading {
  color: #fff;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-amber);
  margin-top: 1rem;
  transition: color var(--transition-fast);
}

.contact-email:hover {
  color: #fff;
}


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

footer {
  padding: 25px 0;
  background-color: var(--color-smoke);
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

footer span.copyright {
  font-size: 0.85rem;
  line-height: 40px;
  font-family: var(--font-ui);
}

footer ul.quicklinks {
  font-size: 0.85rem;
  line-height: 40px;
  font-family: var(--font-ui);
}

footer ul.quicklinks a {
  color: rgba(255, 255, 255, 0.55);
}

footer ul.quicklinks a:hover {
  color: var(--color-amber);
}

ul.social-buttons {
  margin-bottom: 0;
}

ul.social-buttons li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  color: #fff;
  background-color: #333;
  border-radius: 50%;
  transition: background-color var(--transition-std);
  text-decoration: none;
}

ul.social-buttons li a:hover {
  background-color: var(--color-ember);
}


/* ==================== FADE-IN ANIMATION ==================== */
/* Gli elementi con .fade-in partono invisibili;
   la classe .visible viene aggiunta da JS via IntersectionObserver */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ritardo progressivo per i tre servizi */
.fade-in:nth-child(2) { transition-delay: 0.15s; }
.fade-in:nth-child(3) { transition-delay: 0.30s; }
