/* ===================================================================
   CSS COMPLETO CON PALETTE SOLARI SAFETY APPLICATA
   =================================================================== */

/* Definiamo i nuovi colori per riferimento rapido */
:root {
  --primary-blue: #003366;  /* Blu scuro istituzionale */
  --accent-teal: #002244;    /* Teal/Azzurro per accenti */
}

/* HEADER fisso in cima */
.header-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 1100;
  padding: 15px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-logo {
  max-height: 60px;
}

.custom-navbar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* NUOVO GRADIENTE: dal blu scuro al teal, con trasparenza */
    background: linear-gradient(
        to bottom, 
        rgba(0, 43, 91, 0.8) 0%, /* --primary-blue con trasparenza */
        rgba(0, 34, 68, 0.8) 100% /* --accent-teal con trasparenza */
    );
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: background 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.custom-navbar.scrolled {
    background: linear-gradient(
        to bottom, 
        rgba(0, 43, 91, 0.8) 0%,
        rgba(0, 34, 68, 0.8) 100%
    );
    backdrop-filter: blur(10px);
    padding: 10px 0;
}

body {
  margin: 0;
  padding-top: 140px; 
  font-family: "Roboto", sans-serif;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff !important;
}

.navbar-nav .nav-link {
  color: #fff !important;
  font-size: 1.1rem;
  padding: 10px 15px;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: #37FFFC !important;
  transform: scale(1.1);
}

.navbar-nav .nav-link::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-teal);
  transition: width 0.3s;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=UTF8,%3csvg...");
}

@media (max-width: 768px) {
  .header-section { padding: 10px 0; }
  .custom-navbar { top: 60px; }
  body { padding-top: 120px; }
}

/* Effetto sfondo con NUOVO GRADIENTE */
.content-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    padding: 80px 0;
    color: #fff;
}

.content-title {
   font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.services-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    padding: 80px 0;
    color: #fff;
}

.services-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.services-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-box {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-img {
    width: 100px;
    margin-bottom: 15px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.service-box:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.service-box:hover .service-img {
    transform: rotate(5deg);
}

.portfolio-section {
    position: relative;
    background: linear-gradient(135deg, #001f44, #002244); /* Variazione del gradiente */
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    padding: 80px 0;
    color: #fff;
}

.portfolio-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.portfolio-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-box {
    perspective: 1000px;
}

.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    padding: 20px;
}

.product-card:hover {
    transform: rotateY(10deg) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.product-img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.product-info {
    margin-top: 10px;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.about-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    z-index: 1;
    padding: 20px;
    overflow: hidden;
}

.about-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 10%, 100% 90%, 0% 100%);
}

.bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.5); /* Overlay blu */
    z-index: 0;
}

/* MODAL - Schermata Sovraimpressione */
.about-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.8); /* Overlay blu */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    color: #333;
    padding: 30px;
    max-width: 600px;
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    z-index: 1001;
}

.close-modal {
    position: absolute;
    top: 15px; right: 25px;
    font-size: 2rem;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.contact-section {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    color: white;
}

#openContactModal {
    background: white;
    color: var(--primary-blue);
    border: none;
    padding: 12px 24px;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#openContactModal:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
}

.contact-modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.8); /* Overlay blu */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.contact-modal.show {
    opacity: 1;
    visibility: visible;
}

.about-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.6); /* Overlay blu */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal-content {
    position: relative;
    border-radius: 15px;
    padding: 3px;
    max-width: 600px;
    width: 90%;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(#fff, #fff), 
        linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal:hover {
    color: var(--accent-teal);
}

.modal-header h5 {
    font-size: 1.75rem; font-weight: bold; margin-bottom: 20px; text-align: center;
}
.modal-body {
    font-size: 1.1rem; line-height: 1.6; color: #555;
}
.modal-footer {
    margin-top: 20px; text-align: center;
}

.content-section img.hover-effect, .hover-main-effect {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content-section img.hover-effect:hover, .hover-main-effect:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-teal), #002244);
    border: none; color: #fff; font-size: 1rem;
    font-weight: 600; padding: 10px 20px; border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.btn-primary:active, .btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(rgba(0, 34, 68, 0.8)); /* Alone teal */
}
.btn-primary:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.btn-info {
  background: linear-gradient(135deg, var(--primary-blue), #002244); /* Gradiente blu */
  border: none; color: #fff; font-size: 1rem;
  font-weight: 600; padding: 10px 20px; border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-info:hover, .btn-info:focus {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #003a75, var(--primary-blue));
}

#promoTrigger {
  position: fixed;
  bottom: 20px;
  right: 35%;
  min-width: 30%;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: none;
  z-index: 1002;
  font-weight: bold;
}
  
#promoOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 43, 91, 0.7); /* Overlay blu */
  backdrop-filter: blur(5px);
  display: none;
  z-index: 1001;
}
  
#promoModal {
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 90%; height: 80vh;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: auto;
  animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: translateX(-50%) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.promo-content {
  position: relative;
}

.close-promo {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  z-index: 1004;
}

.promo-banner {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.promo-details {
  padding: 20px;
  text-align: center;
}

.promo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.promo-text {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.promo-image {
  flex: 1;
  min-width: 200px;
  text-align: right;
}

.promo-secondary {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.promo-details h3 {
  margin-bottom: 15px;
  color: var(--primary-blue);
}

.promo-details p {
  font-size: 1.1rem;
  color: #555;
}

.promo-timed {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  color: var(--primary-blue);
  font-size: 1.1rem;
  font-weight: bold;
}

.promo-timed i {
  margin-right: 8px;
  font-size: 1.2rem;
}

.promo-highlight {
  background: linear-gradient(135deg, var(--accent-teal), #008a7d);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

.promo-details .btn {
  background: linear-gradient(135deg, var(--primary-blue), #004d9a);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-details .btn:hover, .promo-details .btn:focus {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #003a75, var(--primary-blue));
}

.contact-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.8); /* Overlay blu */
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 9999;
}

.form-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.form-control-custom {
    width: 100%; 
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent-teal);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-teal), var(--primary-blue));
    border: none;
    color: #fff;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

#preloader {
    position: fixed;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top: 6px solid #ffffff;
    border-right: 6px solid #ffffff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-logo {
    position: absolute;
    top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 120px;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out forwards;
}

.custom-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 43, 91, 0.7); /* Overlay blu */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.footer-section  a {
    color: #fff !important;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer-section a:hover {
    color: var(--accent-teal) !important;
}

.contact-section a {
    color: #fff !important;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.contact-section a:hover {
    color: var(--accent-teal) !important;
}

@media (max-width: 768px) {
    .content-section, .services-section, .portfolio-section, .about-bg {
        clip-path: none !important;
    }

    .about-section {
        height: auto;
        padding: 60px 20px;
    }
}


/* =======================================================
   STILI RESPONSIVE PER MENU MOBILE
   ======================================================= */

/* Stile dell'icona hamburger per renderla più visibile */
.navbar-toggler {
    border: 2px solid var(--accent-teal) !important;
    border-radius: 5px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 167, 157, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* --- Media Query per Mobile (sotto i 992px) --- */
@media (max-width: 991.98px) {
    
    /* Nascondi l'header principale e adatta il padding del body */
    .header-section {
        display: none;
    }
    body {
        padding-top: 70px; /* Adatta all'altezza della sola navbar */
    }

    /* Posiziona la navbar in cima */
    .custom-navbar {
        top: 0;
        padding: 10px 0;
    }

    /* Stile del menu a tendina quando aperto */
    .navbar-collapse {
        background-color: rgba(0, 43, 91, 0.98); /* Sfondo solido per leggibilità */
        border-radius: 0 0 8px 8px;
        margin-top: 10px;
        padding: 15px;
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:hover, .navbar-nav .nav-item.active .nav-link {
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Rimuove l'effetto hover della linea sotto */
    }
    
    .nav-item-highlight {
        margin-top: 10px;
    }
}

