/* responsive.css - Versione migliorata */

/* ===== BREAKPOINT GENERALI ===== */
/* Desktop grande: 1200px e oltre (nessuna modifica) */
/* Desktop medio: 992px-1199px */
/* Tablet: 768px-991px */
/* Mobile grande: 576px-767px */
/* Mobile piccolo: fino a 575px */

/* ===== STILE BASE RESPONSIVE ===== */
/* Assicurati che tutti gli elementi siano reattivi di default */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* ===== MENU MOBILE MIGLIORATO ===== */
@media (max-width: 991px) {
  /* Struttura base navbar */
  .navbar .container {
    width: 100%;
    padding: 0 15px;
  }
  
  .nav-content {
    position: relative;
    padding: 15px 0;
  }
  
  /* Hamburger button */
  .hamburger {
    display: block;
    position: relative;
    z-index: 1000;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 10px;
    transition: all 0.3s ease;
  }
  
  .hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #1a73e8;
    transition: all 0.3s ease-in-out;
  }
  
  /* Animazione hamburger */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Menu mobile slide-in */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    display: block;
    width: 100%;
    padding: 15px 25px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
  }
  
  .nav-links .btn {
    margin-top: 20px;
    width: calc(100% - 50px);
  }
  
  /* Overlay scuro per quando il menu è aperto */
  body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ===== GRID RESPONSIVE ===== */
/* Ottimizzazione delle grids per vari dispositivi */
@media (max-width: 991px) {
  .why-grid, .process-grid, .problems-grid, .pricing-grid, .team-grid, .case-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  /* Riposizionamento frecce processo */
  .process-card:not(:last-child)::after {
    width: 1rem;
    height: 1.5rem;
    right: -0.5rem;
  }
}

@media (max-width: 767px) {
  .why-grid, .process-grid, .problems-grid, .pricing-grid, .team-grid, .case-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Riorganizzazione hero section */
  .hero-content {
    flex-direction: column-reverse;
  }
  
  .hero-text, .hero-image {
    width: 100%;
  }
  
  .hero-image {
    margin-bottom: 20px;
  }
  
  /* Features box nella hero */
  .features-box {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  /* Adattamento sezione problem-solution */
  .problem-solution-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-logo, .footer-links, .footer-contact {
    width: 100%;
  }
  
  /* Process cards con frecce verticali */
  .process-card:not(:last-child)::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 20px;
    background-color: #1a73e8;
    top: auto;
    right: auto;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Pricing cards con spaziatura */
  .price-card {
    margin-bottom: 30px;
  }
  
  /* Pagamenti buttons in colonna */
  .payment-buttons {
    grid-template-columns: 1fr;
  }
}

/* ===== MIGLIORAMENTI SPECIFICI PER SEZIONI ===== */
/* Sezione Hero */
@media (max-width: 767px) {
  .hero {
    padding: 80px 0 40px;
  }
  
  .hero h1 {
    font-size: 28px;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .features-box {
    margin: 15px auto;
  }
  
  .feature i {
    font-size: 1.5rem;
  }
  
  .feature span {
    font-size: 0.9rem;
  }
}

/* ===== CORREZIONI SPECIFICHE PER SEZIONI MOBILE ===== */
@media (max-width: 576px) {
  /* Problemi comuni */
  .problem-card {
    padding: 15px;
  }
  
  .problem-card h3 {
    font-size: 18px;
  }
  
  /* FAQ section */
  .faq-question {
    font-size: 16px;
    padding: 12px;
  }
  
  /* Team section */
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  .team-member h3 {
    font-size: 18px;
  }
  
  /* Chat widget */
  .chat-widget {
    bottom: 0;
    right: 0;
    width: 100%;
    border-radius: 10px 10px 0 0;
  }
  
  /* Form di contatto */
  .contact-card {
    padding: 15px;
  }
}

/* ===== CORREZIONI SPECIFICHE PER MOBILE PICCOLO ===== */
@media (max-width: 360px) {
  .nav-content {
    padding: 10px 0;
  }
  
  .logo-container img {
    height: 40px;
  }
  
  .logo-text {
    font-size: 18px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}
