:root {
  --agriteca-dark: #0e1511;
  --agriteca-accent: #8bcf4b;
  --nav-height: 73px; /* ~56px * 1.3 */
  --nav-hero-gap: 10px;
  --nav-top-offset: 10px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: calc(var(--nav-height) + (var(--nav-top-offset) * 2));
}

body {
  font-family: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Coming Soon', sans-serif;
  background-color: #eed8d6;
  color: #444;
  overflow-x: hidden;
}

.section-padding {
  padding: 5rem 0;
}

.bg-light {
  background-color: #eed8d6 !important;
}

.hero {
  min-height: calc(100vh - var(--nav-height) - 32px);
  background-image: url('../img/intro.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 4rem 1.25rem 4rem;
}

.hero + main {
  padding-top: calc(var(--nav-height) + 1.5rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 2rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(3px);
  z-index: 1;
}

.logo-mark {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.hero-nav {
  z-index: 50;
  border-radius: 999px;
  width: min(960px, calc(100% - 2rem));
  background: #7f2f50;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  position: fixed;
  top: var(--nav-top-offset);
  left: 50%;
  transform: translateX(-50%);
  transition: box-shadow 0.3s ease;
}

.hero-nav.nav-solid {
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.35);
}

.hero-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.hero-nav .nav-link:hover,
.hero-nav .nav-link:focus {
  color: #fff;
}

.hero-logo {
  max-width: 440px; /* raddoppiato */
  width: 100%;
}

.hero-nav .navbar-brand {
  display: inline-flex;
  align-items: center;
}

.nav-logo {
  height: calc(var(--nav-height) - 24px);
  width: auto;
  max-height: 100%;
}

.hero-nav .navbar-nav .nav-link {
  padding: 0 0.85rem;
  line-height: var(--nav-height);
}

.hero-nav .navbar-collapse {
  background-color: transparent;
  border-radius: 1rem;
  padding: 0;
  margin-top: 0;
  box-shadow: none;
}

.nav-placeholder {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
}

@media (max-width: 991.98px) {
  .hero-nav .navbar-nav .nav-link {
    line-height: 1.4;
    padding: 0.5rem 0;
  }

  .hero-nav {
    border-radius: 1.5rem;
    width: calc(100% - 1.5rem);
  }

  .hero-nav .navbar-collapse {
    background-color: rgba(127, 47, 80, 0.95);
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--nav-height) + 0.35rem);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - var(--nav-height) - 24px);
    overflow: hidden;
    border-radius: 1.25rem;
    z-index: 60;
  }
  
  .hero-nav .navbar-collapse.show,
  .hero-nav .navbar-collapse.collapsing {
    padding: 0;
    background-color: rgba(127, 47, 80, 0.95);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
    border-radius: 1.25rem;
  }

  .hero-nav .navbar-collapse.show {
    overflow-y: auto;
  }

  .hero-nav .navbar-collapse .navbar-nav {
    padding: 0.85rem 1rem;
  }

}

@media (max-width: 767.98px) {
  .section-padding {
    padding: 3.25rem 0;
  }

  #articoli.section-padding {
    padding-bottom: 0;
  }

  .hero {
    min-height: calc(100vh - var(--nav-height) - 8px);
    padding-bottom: 2rem;
  }

  .hero-nav {
    top: 8px;
  }

  .article-card {
    padding-bottom: 0;
  }
}

/* Carousel 16:9 fisso */
.carousel-fixed .carousel-inner {
  aspect-ratio: 16 / 9;
}

.carousel-fixed .carousel-item,
.carousel-fixed .carousel-item img {
  height: 100%;
}

.carousel-fixed .carousel-item img {
  width: 100%;
  object-fit: cover;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--agriteca-accent);
}

.feature-card {
  background: #fff;
  border: 1px solid rgba(15, 15, 15, 0.05);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 207, 75, 0.12);
  color: var(--agriteca-accent);
  font-size: 1.4rem;
}

.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--agriteca-accent);
  background: #fff;
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
}

.gallery-card {
  min-height: 320px;
}

.gallery-card figcaption {
  background: #fff;
  font-weight: 500;
}

.review-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
}

.review-card .stars i {
  margin-right: 0.15rem;
}

.social-links .btn {
  border-radius: 2rem;
  font-size: 0.95rem;
}

.article-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card h2,
.article-card h3 {
  margin: 0 0 0.75rem !important;
}

.article-card p {
  margin: 0 0 0.75rem !important;
}

.article-card p:last-child {
  margin-bottom: 0 !important;
}

.shadow-soft {
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.2);
}

.social-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.facebook-iframe {
  max-width: 520px;
  width: 100% !important;
  height: 480px !important;
  margin: 0 auto;
  display: block;
  border: 0;
}

.social-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#TA_selfserveprop484,
#TA_selfserveprop484 .TA_links,
#CDSWIDSSP {
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

#CDSWIDSSP > div {
  width: min(100%, 420px) !important;
}

@media (max-width: 767.98px) {
  .facebook-iframe {
    height: 450px !important;
    min-height: 450px;
  }
}

.object-fit-cover,
img {
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.white-space-pre {
  white-space: pre-line;
}

.footer-info {
  font-family: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Coming Soon', sans-serif;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.footer-bar,
footer {
  background: #7f2f50;
  color: rgba(255, 255, 255, 0.85); /* come le voci della navbar */
}

.footer-bar .footer-info a,
.footer-info a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-bar .footer-info a:hover,
.footer-info a:hover,
.footer-bar .footer-info a:focus,
.footer-info a:focus {
  color: #fff;
  text-decoration: underline;
}
