:root {
  --color-primary: #fd9042;
  --color-primary-dark: #e57d31;
  --color-primary-soft: rgba(253, 144, 66, 0.14);

  --color-text: #5f5f5f;
  --color-heading: #1f1f1f;
  --color-muted: #8b8b8b;

  --color-light: #f5f5f5;
  --color-light-2: #fbfbfb;
  --color-border: #e5e5e5;

  --color-dark: #111111;
  --color-dark-soft: #1d1d1d;
  --color-dark-2: #2b2b2b;

  --shadow-sm: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.04);
  --shadow-md: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.08);

  --radius-md: 1rem;
  --radius-pill: 999px;

  --bevel-size: 10px;
  --bevel-border-width: 1px;
  --bevel-border-color: rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--color-text);
  overflow-x: hidden;
  background-color: #ffffff;
}

a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

p {
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", sans-serif;
  color: var(--color-heading);
}

img {
  max-width: 100%;
  height: auto;
}

main,
section {
  overflow: hidden;
}

.section-soft {
  background: var(--color-light);
}

/* Header */
#header {
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

#header.header-scrolled {
  box-shadow: var(--shadow-md);
}

#header .navbar {
  min-height: 72px;
}

#header .logo {
  display: inline-flex;
  align-items: center;
}

#header .logo img,
#header .navbar-brand img {
  max-height: 52px;
  width: auto;
}

#navbar .nav-link {
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
  text-transform: uppercase;
  transition: color 0.25s ease;
}

#navbar .nav-link:hover,
#navbar .nav-link.active {
  color: var(--color-primary) !important;
}

#topbar {
  min-height: 40px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#topbar a {
  color: inherit;
}

#topbar i {
  padding-right: 6px;
  line-height: 0;
}

.navbar-toggler {
  border: 0;
  box-shadow: none !important;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Hero home */
#hero {
  width: 100%;
  margin-top: 112px;
  background-color: rgba(0, 0, 0, 0.8);
  position: relative;
}

#hero .carousel-item {
  min-height: 78vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

#hero .carousel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
}

#hero .carousel-caption-wrap {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: flex;
  align-items: center;
}

#hero .hero-box {
  max-width: 760px;
  color: #ffffff;
}

#hero .hero-box h1,
#hero .hero-box h2 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1rem;
}

#hero .hero-box p {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.65;
}

#hero .carousel-control-prev,
#hero .carousel-control-next {
  width: 8%;
}

#hero .carousel-control-prev-icon,
#hero .carousel-control-next-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  background-size: 55% 55%;
  transition: all 0.25s ease;
}

#hero .carousel-control-prev:hover .carousel-control-prev-icon,
#hero .carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(253, 144, 66, 0.88);
}

#hero .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.55;
}

#hero .carousel-indicators .active {
  opacity: 1;
  background-color: var(--color-primary);
}

/* Page hero */
.page-hero {
  margin-top: 112px;
  min-height: 380px;
  background-size: cover;
  background-position: center center;
  position: relative;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  min-height: 380px;
  display: flex;
  align-items: center;
}

.page-hero-box {
  max-width: 760px;
  color: #ffffff;
}

.page-hero-box h1,
.page-hero-box h2,
.page-hero-box p {
  color: #ffffff;
}

/* Titles */
.section-title {
  text-align: center;
  margin-top: 25px;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  margin: 0 0 10px 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
  font-family: "Poppins", sans-serif;
}

.section-title h2::after {
  content: "";
  width: 120px;
  height: 1px;
  display: inline-block;
  background: var(--color-primary);
  margin: 4px 10px;
  vertical-align: middle;
}

.section-title p {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: "Poppins", sans-serif;
  color: var(--color-heading);
}

/* Generic blocks */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.att-card,
.service-card,
.contact-card,
.cta-box,
.support-card,
.contact-info-card,
.cta-card {
  border-radius: var(--radius-md);
}

.att-card,
.service-card,
.contact-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.contact-card i {
  color: var(--color-primary);
}

.material-card {
  height: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.material-card img {
  max-height: 110px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

/* Shared buttons */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius-pill);
  padding: 0.95rem 1.55rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  box-shadow: 0 0.45rem 1.1rem rgba(0, 0, 0, 0.08);
  min-height: 52px;
}

.site-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.site-btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(253, 144, 66, 0.2);
}

.site-btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #ffab6a 100%);
  color: #1f1f1f;
  border-color: rgba(0, 0, 0, 0.04);
}

.site-btn-primary:hover {
  color: #1f1f1f;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #f5964f 100%);
  box-shadow: 0 0.75rem 1.45rem rgba(253, 144, 66, 0.25);
}

.site-btn-secondary {
  background: linear-gradient(135deg, #2a2a2a 0%, #424242 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.04);
}

.site-btn-secondary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #1f1f1f 0%, #363636 100%);
  box-shadow: 0 0.75rem 1.45rem rgba(0, 0, 0, 0.2);
}

.site-btn-lg {
  padding: 1.15rem 1.8rem;
  font-size: 1.025rem;
}

.att-card .site-btn {
  margin-top: auto;
}

/* Bevel border continuo */
.bevel-box {
  --bevel-size-current: var(--bevel-size);
  position: relative;
  padding: var(--bevel-border-width);
  background: var(--bevel-border-color);
  clip-path: polygon(
    var(--bevel-size-current) 0,
    calc(100% - var(--bevel-size-current)) 0,
    100% var(--bevel-size-current),
    100% calc(100% - var(--bevel-size-current)),
    calc(100% - var(--bevel-size-current)) 100%,
    var(--bevel-size-current) 100%,
    0 calc(100% - var(--bevel-size-current)),
    0 var(--bevel-size-current)
  );
}

.bevel-surface {
  height: 100%;
  clip-path: polygon(
    var(--bevel-size-current) 0,
    calc(100% - var(--bevel-size-current)) 0,
    100% var(--bevel-size-current),
    100% calc(100% - var(--bevel-size-current)),
    calc(100% - var(--bevel-size-current)) 100%,
    var(--bevel-size-current) 100%,
    0 calc(100% - var(--bevel-size-current)),
    0 var(--bevel-size-current)
  );
}

.bevel-surface-white {
  background: #ffffff;
}

.bevel-surface-light {
  background: #f8f9fa;
}

.bevel-card {
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bevel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.1);
}

/* reset contenuti dentro shape smussata */
.bevel-surface.att-card,
.bevel-surface.service-card,
.bevel-surface.contact-card,
.bevel-surface.cta-box,
.bevel-surface.support-card,
.bevel-surface.contact-info-card,
.bevel-surface.cta-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Home */
.home-preview-gallery .preview-item {
  display: flex;
}

.home-preview-gallery .portfolio-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  background: #f4f4f4;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
}

.home-preview-gallery .portfolio-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.home-preview-gallery .portfolio-wrap:hover img {
  transform: scale(1.04);
}

.home-main-pages .main-pages-card-title,
.strength-card-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.home-main-pages .main-pages-card-title i,
.strength-card-title i {
  font-size: 1.2rem;
  color: #6c757d;
  line-height: 1;
  flex-shrink: 0;
  filter: grayscale(100%);
  opacity: 0.95;
}

.home-main-pages .main-pages-card {
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.home-main-pages .main-pages-card p {
  margin-bottom: 1.35rem;
  color: #495057;
}

.home-main-pages .main-pages-card .site-btn {
  margin-top: auto;
}

.home-strengths .strength-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.strength-card-title {
  margin-bottom: 0.85rem;
}

.strength-card-title i {
  font-size: 1.1rem;
}

.home-company-box,
.home-cta-box {
  border-radius: 0;
}

/* Solutions / contacts specific */
.portfolio-container .portfolio-item {
  display: flex;
}

.portfolio-container .portfolio-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  background: #f4f4f4;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
}

.portfolio-container .portfolio-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.portfolio-container .portfolio-wrap:hover img {
  transform: scale(1.04);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

/* Portfolio */
.portfolio-filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.portfolio-item {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.portfolio-hidden {
  display: none !important;
}

.portfolio-wrap {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
}

.portfolio-wrap img {
  transition: transform 0.35s ease;
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.portfolio-wrap:hover img {
  transform: scale(1.04);
}

.modal-portfolio-image {
  width: 100%;
  border-radius: 0.75rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.1;
  transition: all 0.25s ease;
  box-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(253, 144, 66, 0.5);
  color: var(--color-primary);
  box-shadow: 0 0.6rem 1.2rem rgba(253, 144, 66, 0.12);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--color-primary) 0%, #ffab6a 100%);
  color: #1f1f1f;
  border-color: transparent;
  box-shadow: 0 0.7rem 1.4rem rgba(253, 144, 66, 0.18);
}

/* Footer */
#footer {
  color: #ffffff;
  font-size: 14px;
  background: var(--color-dark);
}

#footer .footer-top {
  padding: 60px 0 30px 0;
  background: var(--color-dark-soft);
}

#footer a {
  color: var(--color-primary);
}

#footer a:hover {
  color: #ffb27a;
}

#footer address {
  font-size: 14px;
  line-height: 24px;
  margin-bottom: 0;
  font-family: "Roboto", sans-serif;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links-list i {
  color: var(--color-primary);
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1035;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-left {
  transform: translateX(-28px);
}

.reveal.reveal-right {
  transform: translateX(28px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Responsive */
@media (min-width: 1024px) {
  #hero .carousel-control-prev,
  #hero .carousel-control-next {
    width: 5%;
  }
}

@media (max-width: 991.98px) {
  #header .navbar {
    min-height: 64px;
  }

  #navbarMain.show,
  #navbarMain.collapsing {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-top: 1px solid var(--color-border);
  }

  #hero,
  .page-hero {
    margin-top: 104px;
  }

  #hero .carousel-item,
  #hero .carousel-caption-wrap {
    min-height: 70vh;
  }

  .page-hero,
  .page-hero-content {
    min-height: 320px;
  }

  #hero .hero-box h1 {
    font-size: 2rem;
  }

  #hero .hero-box h2,
  .page-hero-box h1 {
    font-size: 1.75rem;
  }

  #navbar .nav-link {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .home-preview-gallery .portfolio-wrap,
  .portfolio-container .portfolio-wrap {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  .section-title {
    margin-top: 15px;
    margin-bottom: 1.5rem;
  }

  .section-title h2 {
    font-size: 15px;
    color: var(--color-heading);
  }

  .section-title p {
    font-size: 30px;
    font-weight: 600;
  }

  #hero .hero-box p,
  .page-hero-box p {
    font-size: 0.98rem;
  }

  #topbar {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  :root {
    --bevel-size: 12px;
  }

  .section-title p {
    font-size: 28px;
  }

  #hero .carousel-item,
  #hero .carousel-caption-wrap {
    min-height: 64vh;
  }

  #hero .hero-box h1,
  .page-hero-box h1 {
    font-size: 1.7rem;
  }

  #hero .hero-box h2 {
    font-size: 1.5rem;
  }

  #hero .carousel-control-prev-icon,
  #hero .carousel-control-next-icon {
    width: 44px;
    height: 44px;
  }

  .portfolio-filter-buttons {
    gap: 0.5rem;
  }

  .site-btn,
  .site-btn-lg,
  .filter-btn {
    width: 100%;
  }

  .home-preview-gallery .portfolio-wrap,
  .portfolio-container .portfolio-wrap {
    min-height: 240px;
    aspect-ratio: 1 / 1;
  }

  .home-main-pages .main-pages-card-title,
  .strength-card-title {
    gap: 0.6rem;
  }

  .home-main-pages .main-pages-card-title i,
  .strength-card-title i {
    font-size: 1.05rem;
  }

  .map-wrap iframe {
    height: 320px;
  }
}