/* -------------------- RESET -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* -------------------- BASE -------------------- */
body {
  font-family: "Oxanium", sans-serif;
  background: linear-gradient(to left, #045b99, #02223b);
  color: white;
  overflow-x: hidden;
  letter-spacing: 0.5px;
  padding-top: 120px; /* Altezza navbar */
}

/* -------------------- COMPONENT CONTAINER -------------------- */
.component-container {
  margin-top: 30px;
  position: relative;
  width: 100%;
  padding: 50px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to left, #045b99, #02223b);
  color: white;
  overflow: hidden;
}

/* Cerchio decorativo */
.circle {
  position: absolute;
  width: 450px;
  height: 450px;
  background-color: #b3c6ff;
  border-radius: 50%;
  right: -100px;
  z-index: 1;
}

/* -------------------- CONTENT -------------------- */
.content {
  font-family: "Oxanium", sans-serif;
  font-weight: 100;
  font-style: normal;
  font-size: 30px;
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 600px;
  letter-spacing: 0.4px;
}

.content h1 {
  font-size: 36px;
  margin-bottom: 5px;
}

.main-text {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 100;
}

.sub-text {
  font-size: 18px;
  color: #e0e0e0;
}

/* -------------------- IMAGE CONTAINER -------------------- */
.image-container {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  margin-left: 40px;
  z-index: 20;
  top: 50px;
  right: -30px;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* -------------------- SERVICES -------------------- */
.services-container {
  margin-top: 200px;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  text-align: center;
  flex-wrap: wrap;
}

/* -------------------- CARD -------------------- */
.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 100px;
  margin-bottom: 100px;
  font-family: "Oxanium", sans-serif;
  letter-spacing: 0.4px;
  flex-wrap: wrap;
}

.card {
  position: relative;
  width: 314px;
  height: 614px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.card-border {
  border: 2px solid #b3c6ff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Sfondo card con immagine */
.card-bg::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

.card1.card-bg::before { background-image: url('images/sicurezza.jpeg'); }
.card2.card-bg::before { background-image: url('images/gestionereti.jpg'); }
.card3.card-bg::before { background-image: url('images/hotel.JPEG'); }
.card4.card-bg::before { background-image: url('images/pcassemble.jpg'); }

.card-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
}

.card-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
}

.card-title {
  font-size: 1.7em;
  margin: 0;
  color: #ffffff;
  font-weight: 1000;
}

.card-description {
  font-size: 1em;
  margin-top: 2px;
  color: #ffffff;
}

/* -------------------- LOGO GRID -------------------- */
.logo-container {
  position: relative;
  padding: 60px 20px;
  background: linear-gradient(to left, #045b99, #02223b);
  text-align: center;
  margin-bottom: 50px;
}

/* Cerchio decorativo arancione */
.orange-circle {
  width: 250px;
  height: 250px;
  background-color: #b3c6ff;
  border-radius: 50%;
  position: absolute;
  top: -50px;
  left: -50px;
  z-index: 0;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.logo-item {
  background-color: #013554;
  padding: 20px;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.logo-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.logo-item:hover img {
  filter: brightness(1.1) drop-shadow(0 0 5px #b3c6ffaa);
}

/* -------------------- FOOTER -------------------- */
.footer {
  background: linear-gradient(to left, #045b99, #02223b);
  color: white;
  padding: 40px 20px 20px;
  font-family: "Oxanium", sans-serif;
  border-top: 1.5px solid #ffffff;
  letter-spacing: 0.4px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}

.footer-logo img {
  width: 100px;
  margin-bottom: 10px;
}

.footer-logo p {
  max-width: 200px;
  font-size: 13px;
}

.footer-links,
.footer-contatti {
  min-width: 200px;
  margin-bottom: 20px;
}

.footer-links h4,
.footer-contatti h4 {
  font-size: 22px;
  margin-bottom: 10px;
  color: white;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links a,
.footer-contatti a {
  color: white;
  text-decoration: none;
}

.footer-links a:hover,
.footer-contatti a:hover {
  color: #b3c6ff;
  transition: color 0.3s;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 15px;
}

/* -------------------- ANIMATED GIF -------------------- */
.animated-gif-wrapper {
  position: relative;
  width: 100vw;
  height: 700px;
  overflow: hidden;
  background: linear-gradient(to left, #045b99, #02223b);
}

.animated-gif {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  object-fit: cover;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  z-index: 1;
}

.gif-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  max-width: 90vw;
  padding: 0 20px;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* -------------------- MEDIA QUERIES -------------------- */

/* Desktop */
@media (min-width: 1025px) {
  .component-container {
    flex-direction: row;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .component-container {
    flex-direction: column;
    padding: 40px 15px;
  }
  .circle {
    width: 300px;
    height: 300px;
    right: -70px;
  }
  .content {
    font-size: 24px;
    max-width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
  .content h1 {
    font-size: 28px;
  }
  .main-text {
    font-size: 20px;
  }
  .sub-text {
    font-size: 16px;
  }
  .image-container {
    width: 250px;
    height: 250px;
    margin-left: 0;
    top: 30px;
    right: 0;
  }
  .card {
    width: 280px;
    height: 550px;
  }
}

/* Smartphone */
@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
  .component-container {
    flex-direction: column;
    padding: 30px 10px;
  }
  .circle {
    display: none;
  }
  .content {
    font-size: 20px;
    max-width: 100%;
    text-align: center;
    margin-bottom: 15px;
  }
  .content h1 {
    font-size: 24px;
  }
  .main-text {
    font-size: 18px;
  }
  .sub-text {
    font-size: 14px;
  }
  .image-container {
    width: 200px;
    height: 200px;
    margin-left: 0;
    top: 20px;
    right: 0;
  }
  .card {
    width: 90vw;
    height: auto;
    min-height: 450px;
  }
  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Smartphone piccolo */
@media (max-width: 480px) {
  .logo-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
  }
  .footer-links,
  .footer-contatti {
    min-width: auto;
    width: 100%;
    margin-bottom: 15px;
    text-align: center;
  }
}
