:root {
  --colore-primario: #b53f33; /* Rosso logo */
  --colore-secondario: #9ba3b6; /* Grigio lavanda */
  --colore-accento: #5f6676; /* Grigio scuro */
  --colore-sfondo: #f1f1f1; /* Sfondo chiaro */
  --colore-testo: #2c2c2c; /* Testi scuri */
  --colore-IGC: #b59759;
}

/* RESET BASE e TIPOGRAFIA */
h1,
.h1 {
  font-size: var(--font-size-5xl);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  margin-bottom: 1.5rem;
}

h2,
.h2 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  margin-bottom: 2rem;
  color: var(--colore-testo);
}

h3,
.h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1rem;
}

p {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  margin-bottom: 1rem;
}

/* Case Studies Hero Section */
#case-studies-hero {
  position: relative;
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  margin-top: 90px; /* Per la navbar fixed */
}

#case-studies-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#case-studies-hero .hero-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#case-studies-hero .hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#case-studies-hero .hero-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  color: white;
}

#case-studies-hero .hero-content h1 {
  font-size: calc(var(--font-size-base) * 4.375); /* 70px con base 16px */
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.5);
}

/* Case Studies Intro Section */
.case-studies-intro {
  padding: 4rem 2rem;
  text-align: center;
  background-color: #f8f9fa;
}

.case-studies-intro h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: 1.5rem;
  color: var(--colore-testo);
}

.case-studies-intro p {
  font-size: var(--font-size-lg);
  color: var(--colore-testo);
  max-width: 800px;
  margin: 0 auto;
  line-height: var(--line-height-normal);
}

/* Case Studies Grid */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.case-study-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-5px);
}

.case-study-card a {
  text-decoration: none;
  color: inherit;
}

.case-study-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.case-study-content {
  padding: 1.5rem;
  background-color: white;
}

.case-study-content h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: 1rem;
  color: var(--colore-testo);
}

.case-study-content p {
  font-size: var(--font-size-md);
  color: var(--colore-testo);
  margin-bottom: 1rem;
  line-height: var(--line-height-normal);
}

.read-more {
  color: var(--colore-primario);
  font-weight: var(--font-weight-semibold);
  display: inline-block;
}

/* Media Queries */
@media (max-width: 1100px) {
  #case-studies-hero .hero-content h1 {
    font-size: calc(var(--font-size-base) * 3.75); /* 60px */
  }

  h2,
  .h2,
  .case-studies-intro h2 {
    font-size: calc(var(--font-size-base) * 2.5); /* 40px */
    margin-bottom: 1.5rem;
  }

  h3,
  .h3,
  .case-study-content h3 {
    font-size: var(--font-size-xl); /* 20px */
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 768px) {
  #case-studies-hero .hero-content h1 {
    font-size: calc(var(--font-size-base) * 3); /* 48px */
  }

  h2,
  .h2,
  .case-studies-intro h2 {
    font-size: calc(var(--font-size-base) * 2); /* 32px */
    margin-bottom: 1.2rem;
  }

  h3,
  .h3,
  .case-study-content h3 {
    font-size: var(--font-size-lg); /* 18px */
    margin-bottom: 0.8rem;
  }

  p,
  .case-studies-intro p,
  .case-study-content p {
    font-size: var(--font-size-md);
  }

  .case-studies-grid {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  #case-studies-hero .hero-content h1 {
    font-size: calc(var(--font-size-base) * 2.5); /* 40px */
  }

  h2,
  .h2,
  .case-studies-intro h2 {
    font-size: calc(var(--font-size-base) * 1.8); /* 29px */
    margin-bottom: 1rem;
  }

  h3,
  .h3,
  .case-study-content h3 {
    font-size: calc(var(--font-size-base) * 1.1); /* 18px */
    margin-bottom: 0.8rem;
  }

  p,
  .case-studies-intro p,
  .case-study-content p {
    font-size: var(--font-size-md);
  }

  .case-study-card img {
    height: 200px;
  }
}

.intro-grid img {
  margin-top: 100px;
}
