/* ========================================
   LARIOTEK SERVICE - MODERN THEME
   Versione ottimizzata per mobile e design moderno
   ======================================== */

:root {
  /* Bootstrap colors */
  --bs-primary: #15c9ca;
  --bs-secondary: #6c757d;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  
  /* Custom modern variables */
  --gradient-primary: linear-gradient(135deg, #22e2ad 0%, #09b0e8 100%);
  --gradient-primary-hover: linear-gradient(135deg, #1fc99e 0%, #0899d1 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.overflow-hidden {
  overflow: hidden;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-lt {
  background-color: rgba(255,255,255,0.2);
  color: white;
  transition: var(--transition);
}

.btn-lt:hover {
  background-color: rgba(255,255,255,0.3);
  color: white;
  transform: scale(1.05);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background-color: #ffffff !important;
  border: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-lt {
  border-radius: var(--border-radius);
  background-color: #ffffff;
}

/* ========================================
   NAVBAR
   ======================================== */

nav {
  height: 64px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

nav.scrolled {
  box-shadow: var(--shadow-md);
}

#logo {
  width: auto;
  max-height: 50px;
  min-height: 40px;
  transition: var(--transition);
}

.navbar-divider {
  position: absolute;
  z-index: -1;
  width: 70%;
  height: 64px;
  right: 0px;
  background: var(--gradient-primary);
  top: 0px;
}

.navbar-divider-triangle {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 64px 64px 0 0;
  border-color: white transparent transparent transparent;
}

.navbar-collapse {
  max-width: 570px;
}

.nav-link {
  color: white;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: white;
  transition: var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.menu {
  background-color: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  display: flex;
  border-radius: 8px;
  transition: var(--transition);
}

.menu:hover {
  background-color: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.line {
  fill: none;
  stroke: white;
  stroke-width: 6;
  transition: stroke-dasharray 500ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line1 {
  stroke-dasharray: 60 207;
  stroke-width: 6;
}

.line2 {
  stroke-dasharray: 60 60;
  stroke-width: 6;
}

.line3 {
  stroke-dasharray: 60 207;
  stroke-width: 6;
}

.opened .line1 {
  stroke-dasharray: 90 207;
  stroke-dashoffset: -134;
  stroke-width: 6;
}

.opened .line2 {
  stroke-dasharray: 1 60;
  stroke-dashoffset: -30;
  stroke-width: 6;
}

.opened .line3 {
  stroke-dasharray: 90 207;
  stroke-dashoffset: -134;
  stroke-width: 6;
}

/* ========================================
   CAROUSEL
   ======================================== */

#carouselMain .carousel-item {
  position: relative;
}

#carouselMain .carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4); /* intensità del layer */
  z-index: 1;
}


   
#carouselMain .carousel-item img {
  object-fit: cover;
  object-position: center;
  height: 650px;
  overflow: hidden;
  
}

#carouselMain .carousel-item:before {
  content: "";
  background-image: linear-gradient(to bottom, transparent 20%, rgba(0, 0, 0, 0.75));
  display: block;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#carouselMain .carousel-caption {
  z-index: 2;
}

#carouselMain .carousel-caption h1 {
  font-weight: 700;
  animation: fadeInUp 0.8s ease-out;
}

#carouselMain .carousel-caption h2 {
  font-weight: 400;
  animation: fadeInUp 1s ease-out 0.2s both;
}

#carouselMain .carousel-caption p,
#carouselMain .carousel-caption .lead {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1.2s ease-out 0.4s both;
}

#carouselMain .carousel-caption .btn {
  animation: fadeInUp 1.4s ease-out 0.6s both;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#carouselMain .carousel-control-prev,
#carouselMain .carousel-control-next {
  z-index: 3;
  transition: var(--transition);
}

#carouselMain .carousel-control-prev:hover,
#carouselMain .carousel-control-next:hover {
  opacity: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   IMAGES & ICONS
   ======================================== */

/* Migliora rendering immagini */
img {
  image-rendering: -webkit-optimize-contrast;
  -ms-interpolation-mode: bicubic;
  max-width: 100%;
  height: auto;
}

/* Smooth rendering per foto (non loghi) */
.carousel-item img,
.img-team,
.img-fluid {
  image-rendering: auto;
  image-rendering: high-quality;
}

.grey {
  filter: grayscale(1);
  transition: filter 0.5s ease;
}

.grey:hover {
  filter: grayscale(0);
}

.img-slider {
  width: 220px;
  height: 55px;
  object-fit: contain;
}

.img-slider-ass {
  width: 330px;
  height: 82px;
  object-fit: contain;
}

.img-team {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.img-team:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   BACKGROUNDS
   ======================================== */

.bg-lt {
  background: var(--gradient-primary) !important;
}

.bg-lt-op {
  background: linear-gradient(135deg, rgba(34, 226, 173, 0.4) 0%, rgba(9, 176, 232, 0.4) 100%) !important;
}

.text-primary {
  color: #15c9ca !important;
}

.title {
  
  background-image: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 500;
  filter: drop-shadow(4px 4px 3px 4px white) ;
 

}



/* ========================================
   UTILITIES
   ======================================== */

.list-group-item {
  background-color: #f8f9fa !important;
  border: none;
  margin-bottom: 4px;
  border-radius: 8px;
}

.rounded-4 {
  border-radius: var(--border-radius) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

hr {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 992px) {
  .navbar-divider {
    width: 80%;
  }

  .navbar-collapse {
    position: fixed;
    top: 64px;
    right: -350px;
    width: 350px;
    height: 100vh;
    background-color: rgba(255,255,255,0.95);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    z-index: 1000;
  }
  
  .navbar-collapse.show {
    right: 0;
  }

  .navbar-nav > .nav-item > .nav-link {
    line-height: 48px;
    font-size: 18px;
    background: white;
    transition: var(--transition);
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 4px 12px;
    border-radius: 8px;
    padding: 8px 16px !important;
    position: relative;
    z-index: 10;
    cursor: pointer;
  }

  .navbar-nav > .nav-item > .nav-link:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: white;
    color: white;
  }

  .btn-lt {
    height: 50px;
  }

  #carouselMain .carousel-item img {
    height: 450px;
  }

  #carouselMain .carousel-caption .display-1 {
    font-size: 2.5rem;
  }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 767.98px) {
  nav {
    background: var(--gradient-primary);
  }

  #logo {
    filter: brightness(0) invert(1);
  }

  #carouselMain .carousel-item img {
    height: 350px;
  }

  #carouselMain .carousel-caption .display-1 {
    font-size: 2rem;
  }

  #carouselMain .carousel-caption h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .navbar-collapse {
    max-width: 100%;
    width: 100%;
    right: -100%;
  }
  
  .img-slider-ass {
    width: 260px;
  }

  .img-slider {
    width: 180px;
  }

  .img-team {
    width: 240px;
  }

  #carouselMain .carousel-item img {
    height: 280px;
  }

  #carouselMain .carousel-caption .display-1 {
    font-size: 1.5rem;
  }

  #carouselMain .carousel-caption h2 {
    font-size: 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 308px) {
  .btn-lt {
    display: none;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid #15c9ca;
  outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .navbar,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators,
  footer {
    display: none !important;
  }
}
