/* 
 * Navarro Sistemi - Stylesheet principale
 * Version: 1.0
 * Author: Navarro Sistemi
 */

/* ==========================================================================
   1. Importazioni e Variabili
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary: #dc3545;
  --secondary: #2c3e50;
  --accent: #e74c3c;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gradient: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

/* ==========================================================================
   2. Reset e Base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  background-color: #ffffff;
}

/* ==========================================================================
   3. Preloader
   ========================================================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   4. Navbar
   ========================================================================== */
.navbar {
  background: rgba(26, 26, 46, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background: rgba(26, 26, 46, 0.98) !important;
}

.navbar-brand img {
  height: 60px;
  transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
  height: 50px;
}

.nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 15px;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero {
  background: url('assets/header.png') center center/cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(220, 53, 69, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

.btn-hero {
  padding: 15px 40px;
  margin: 10px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-hero-primary {
  background: var(--gradient);
  color: white;
  border: none;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.4);
  color: white;
}

.btn-hero-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-hero-outline:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-3px);
}

/* ==========================================================================
   6. Particles Animation
   ========================================================================== */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-100px) translateX(100px); }
  66% { transform: translateY(100px) translateX(-100px); }
}

/* ==========================================================================
   7. Services Section
   ========================================================================== */
.services {
  padding: 100px 0;
  background: #f8f9fa;
  position: relative;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 3rem;
}

.service-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(220, 53, 69, 0.2);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: var(--gradient);
  transform: rotateY(360deg);
}

.service-icon i {
  font-size: 35px;
  color: var(--primary);
  transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
  color: white;
}

.service-card h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark);
}

.service-card p {
  color: #666;
  line-height: 1.8;
}

/* ==========================================================================
   8. Network Section
   ========================================================================== */
.network-section {
  position: relative;
  overflow: hidden;
}

.network-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>') repeat;
  animation: float 20s linear infinite;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.network-card {
  background: white;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.network-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.15);
}

.mini-stat {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.mini-stat:hover {
  background: var(--gradient);
  transform: scale(1.05);
}

.mini-stat:hover h3,
.mini-stat:hover p {
  color: white !important;
}

.floating-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  animation: pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   9. Security Section
   ========================================================================== */
.security-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.security-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.security-card:hover::before {
  transform: scaleX(1);
}

.security-card:hover {
  transform: translateX(10px);
  box-shadow: 0 15px 40px rgba(220, 53, 69, 0.2);
}

.security-icon {
  width: 60px;
  height: 60px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.security-card:hover .security-icon {
  background: var(--gradient);
  color: white;
  transform: rotateY(360deg);
}

.security-monitor {
  background: #1a1a2e;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.monitor-screen {
  background: #0f0f1e;
  border-radius: 15px;
  padding: 20px;
}

.camera-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.camera-feed {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 10px;
  height: 80px;
  position: relative;
  overflow: hidden;
  animation: flicker 5s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.camera-feed::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: rgba(220, 53, 69, 0.3);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.security-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.9rem;
}

.security-badge {
  position: absolute;
  top: 20px;
  right: -20px;
  background: var(--gradient);
  color: white;
  padding: 10px 30px;
  border-radius: 20px;
  transform: rotate(15deg);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.security-badge i {
  margin-right: 5px;
}

.security-benefits {
  list-style: none;
  padding: 0;
}

.security-benefits li {
  padding: 8px 0;
  color: #666;
  transition: all 0.3s ease;
}

.security-benefits li:hover {
  color: var(--primary);
  transform: translateX(10px);
}

/* ==========================================================================
   10. Custom Section
   ========================================================================== */
.custom-section {
  background: url('assets/sumisura.png') center center/cover no-repeat;
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  color: white;
}

.custom-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(220, 53, 69, 0.8) 100%);
}

.custom-content {
  position: relative;
  z-index: 2;
}

.feature-box {
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
  border-radius: 20px;
  padding: 30px;
  height: 100%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-box i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* ==========================================================================
   11. Stats Section
   ========================================================================== */
.stats-section {
  background: var(--gradient);
  padding: 80px 0;
  color: white;
}

.stat-box {
  text-align: center;
  padding: 30px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-text {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ==========================================================================
   12. Ticket Section
   ========================================================================== */
.ticket-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
}

.ticket-card {
  background: white;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.ticket-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.15);
}

.ticket-header {
  background: var(--gradient);
  padding: 30px;
  text-align: center;
  color: white;
}

.ticket-header i {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* ==========================================================================
   13. Forms
   ========================================================================== */
.form-control, .form-select {
  border-radius: 15px;
  border: 2px solid #e0e0e0;
  padding: 15px 20px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.btn-submit {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 50px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
  color: white;
}

/* ==========================================================================
   14. Brands Section
   ========================================================================== */
.brands-section {
  padding: 80px 0;
  background: white;
}

.brand-carousel {
  overflow: hidden;
  position: relative;
}

.brand-track {
  display: flex;
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-item {
  flex: 0 0 200px;
  margin: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-item img {
  max-width: 120px;
  max-height: 60px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.brand-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* ==========================================================================
   15. Contact Section
   ========================================================================== */
.contact-section {
  padding: 100px 0;
  background: #f8f9fa;
}

.contact-info {
  background: white;
  border-radius: 20px;
  padding: 40px;
  height: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.contact-info-icon {
  width: 60px;
  height: 60px;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.contact-info-icon i {
  font-size: 1.5rem;
  color: var(--primary);
}

/* ==========================================================================
   16. Footer
   ========================================================================== */
footer {
  background: var(--dark);
  color: white;
  padding: 50px 0 20px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-social i {
  color: white;
  font-size: 1.2rem;
}

/* ==========================================================================
   17. Mobile Navigation
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1030;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  }
  
  .mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
  }
  
  .mobile-nav a:hover {
    color: var(--primary);
    transform: scale(1.1);
  }
  
  .mobile-nav i {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

/* ==========================================================================
   18. Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   19. Scroll to Top Button
   ========================================================================== */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-top.active {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

/* ==========================================================================
   20. reCAPTCHA Styles
   ========================================================================== */
.g-recaptcha {
  margin-bottom: 20px;
}

/* ==========================================================================
   21. Alert Messages
   ========================================================================== */
.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* ==========================================================================
   22. Utility Classes
   ========================================================================== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-white { color: white !important; }
.text-muted { color: #6c757d !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }