.usecase-block {
  margin-top: 40px;
}
.service-desc-container {
  height: 250px;
  width: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-desc-container p {
  margin: 0;
  padding: 0 8px;
  text-align: center;
}
.service-img-container {
  max-height: 200px;
  height: 200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}
.service-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.service-list .service h3 {
  min-height: 3.5em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 8px;
}
/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: #333; background: #fff; }

/* COLOR PALETTE */
:root {
  --primary: #c62828; /* rosso */
  --secondary: #222;
  --light: #f5f5f5;
}

/* HEADER */
header {
  background: var(--light);
  color: black;
  padding: 15px 0;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
header .container .surname
{ 
  color: var(--primary); 
}
header .logo { font-weight: bold; font-size: 1.3em; }
header ul { list-style: none; display: flex; gap: 20px; }
header ul li a { color: black; text-decoration: none; font-weight: 800; }
header ul li a:hover { color: var(--primary); }

/* Top menu styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.logo img {
    height: 32px;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.2s, background 0.2s;
    padding: 8px 18px;
    border-radius: 6px;
    position: relative;
    z-index: 1;
}
.main-nav a:hover {
    color: #fff;
    background: #c62828;
    box-shadow: 0 2px 8px rgba(198,40,40,0.08);
}

@media (max-width: 700px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 10px;
  }
  header .logo {
    margin-bottom: 8px;
    font-size: 1.5em;
    width: 100%;
    text-align: left;
  }
  header nav {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100%;
    gap: 0 !important;
  }
  header nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-bottom: 8px;
  }
  header nav ul li {
    width: 100%;
  }
  header nav ul li a {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
    text-align: left;
  }
  header nav a img {
    margin-top: 8px;
    margin-bottom: 8px;
  }
}

/* HERO */
.hero {
  background: linear-gradient(120deg, #f9f9f9 0%, #e3eafc 100%);
  padding: 0;
  height: 350px;
  display: flex;
  align-items: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; margin-bottom: 20px; }
.btn {
  display: inline-block;
  padding: 12px 25px;
  background: white;
  color: var(--primary);
  border-radius: 5px;
  border: 1px solid var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: #a01717; color: white; }

/* HERO FLEX SPLIT */
.hero-flex {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  gap: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.hero-left {
  flex: 3 1 0;
  min-width: 260px;
}
.hero-left h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #222;
}
.hero-left p {
  font-size: 1.2rem;
  color: #444;
}
.hero-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}
.hero-right .btn {
  font-size: 1rem;
  padding: 8px 32px;
  background: #c62828;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(198,40,40,0.08);
  transition: background 0.2s;
  white-space: nowrap;
  min-width: 0;
  max-width: none;
}
.hero-right .btn:hover {
  background: #a01717;
}
@media (max-width: 900px) {
  .hero-flex {
    flex-direction: column;
    gap: 24px;
    padding: 0 12px;
  }
  .hero-left, .hero-right {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .hero-right {
    justify-content: center;
  }
}

/* HERO LINES */
.hero-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.hero-line, .hero-line.location {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1.5rem;
  color: #222;
    font-weight: 400;
    white-space: nowrap;
    text-align: left;
    line-height: 1;
    display: block;
    min-height: 1em; /* Reserve space for tallest term */
}
.hero-line.highlight {
  font-family: 'Pacifico', cursive;
  font-size: 3.3rem;
  color: #c62828;
  font-style: italic;
  font-weight: 400;
  white-space: nowrap;
  text-align: left;
  line-height: 1;
}

/* ARTICLE HERO - full width band for article pages */
.article-hero {
  background: linear-gradient(120deg, #f9f9f9 0%, #e3eafc 100%);
  padding: 24px 0; /* reduced height */
  width: 100%;
  display: block;
}
.article-hero .hero-flex {
  display: flex;
  align-items: center;
  gap: 18px;
}
.article-hero .hero-content {
  width: 70%;
}
.article-hero .hero-cta {
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-hero .hero-lines h1 {
  color: #222;
}
.article-hero .hero-lines p,
.article-hero .article-subtitle {
  color: #333; /* darker, readable */
}
.article-cta {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 26px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.article-cta:hover { background: #a01717 !important; }

@media (max-width: 700px) {
  .article-hero { padding: 20px 12px; }
  .article-hero .hero-lines h1 { font-size: 1.5rem; }
  .article-hero .hero-lines p { font-size: 0.95rem; }
  .article-hero .hero-flex { flex-direction: column; align-items: stretch; }
  .article-hero .hero-content { width: 100%; }
  .article-hero .hero-cta { width: 100%; margin-top: 12px; }
}

@media (max-width: 700px) {
  .hero-line.highlight {
    font-size: 2.1rem;
    max-width: 95vw;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;
    display: block;
  }
}

/* SECTIONS */
section { padding: 60px 20px; }
section h2 { margin-bottom: 20px; text-align: center; color: var(--primary); }

/* ABOUT */
.about-flex {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: row;
}
.about-flex img { border-radius: 10px; max-width: 300px; }
.about-flex p { max-width: 600px; font-size: 1.1rem; }

/* SERVICES */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.service {
  background: var(--light);
  padding: 20px;
  border-radius: 10px;
  width: 280px;
  text-align: center;
}

.service img { 
  width: 100%; 
  border-radius: 5px; 
  margin-bottom: 10px; 
  max-width: 240px;
}

/* PORTFOLIO */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.card {
  background: var(--light);
  padding: 20px;
  border-radius: 10px;
  width: 280px;
  text-align: center;
}
.card img { width: 100%; border-radius: 5px; margin-bottom: 10px; }

/* BLOG */
.blog {
  padding: 40px 20px;
}
.blog .container { max-width: 1100px; margin: 0 auto; }
.blog-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
}
.post-card {
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}
.post-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.post-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.post-body h3 {
  font-size: 1.05rem;
  margin: 0;
  color: #222;
}
.post-excerpt {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.3em;
  max-height: 2.6em; /* approx 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
}
.read-more {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .blog-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-strip { grid-template-columns: 1fr; }
  .post-card img { height: 200px; }
}

/* EVENTS */
.event-list {
  max-width: 700px;
  margin: 0 auto;
  list-style: none;
}
.event-list li {
  background: var(--light);
  padding: 15px;
  margin: 10px 0;
  border-radius: 5px;
}

/* CONTACT */
.contact p {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #555;
}
.contact .btn { display: block; width: fit-content; margin: 0 auto; }

.contact .container {
  max-width: 600px;
  margin: 0 auto;
}

/* FOOTER */
footer {
  background: var(--secondary);
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-size: 0.9rem;
}
footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }
