/* ============================================================
   FREE WEBSITE — custom.css
   Stile principale — sito-gratis.com palette
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary-color:   #3498DB;
  --secondary-color: #00396E;
  --accent-color:    #01ADC5;
  --primary-dark:    #00284F;
  --text-dark:       #333333;
  --text-light:      #ffffff;
  --text-muted:      #6c757d;
  --bg-light:        #f8f9fa;
  --bg-dark:         #001f3f;
  --gradient-hero:   linear-gradient(135deg, #00396E 0%, #01ADC5 100%);
  --gradient-cta:    linear-gradient(135deg, #3498DB 0%, #01ADC5 100%);
  --shadow-card:     0 8px 32px rgba(0,57,110,0.10);
  --shadow-hover:    0 16px 48px rgba(0,57,110,0.18);
  --radius:          12px;
  --transition:      0.3s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-dark);
  line-height: 1.65;
  background: #fff;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; }

a { color: var(--accent-color); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary-color); }

img { max-width: 100%; height: auto; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: transparent;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  z-index: 1030;
}

.navbar.scrolled {
  background: var(--secondary-color) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
}

.navbar-brand img { height: 90px; width: auto; }

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  transition: color var(--transition);
  position: relative;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 1px;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { transform: scaleX(1); }
.navbar-nav .nav-link:hover { color: #fff !important; }

.navbar-toggler { border-color: rgba(255,255,255,0.4); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-cta {
  background: var(--accent-color) !important;
  border-radius: 50px !important;
  color: #fff !important;
  padding: 0.45rem 1.4rem !important;
  margin-left: 0.5rem;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: #018fa3 !important;
  transform: translateY(-1px);
}
.nav-cta::after { display: none !important; }

/* ============================================================
   HERO — gradient + split layout
   ============================================================ */
#hero {
  background: var(--gradient-hero);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 80vw; height: 80vw;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 60vw; height: 60vw;
  border-radius: 50%;
  background: rgba(1,173,197,0.12);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(1,173,197,0.25);
  border: 1px solid rgba(1,173,197,0.5);
  color: #a8eef5;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.hero-title span { color: var(--accent-color); }

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-img-wrap {
  position: relative;
  z-index: 2;
}
.hero-img-wrap img {
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.3);
  width: 100%;
  object-fit: cover;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.hero-feature-tag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-feature-tag i { color: var(--accent-color); font-size: 0.75rem; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  text-align: center;
  animation: bounce 2s infinite;
}
.hero-scroll i { display: block; font-size: 1.2rem; margin-top: 4px; }

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(1,173,197,0.35);
}
.btn-primary-custom:hover {
  background: #018fa3;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(1,173,197,0.45);
}

.btn-outline-custom {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-outline-custom:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

.btn-cta-dark {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-cta-dark:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 90px 0; }

.section-label {
  display: inline-block;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-cta);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* ============================================================
   CARDS - VANTAGGI / SERVIZI
   ============================================================ */
.feature-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-cta);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(1,173,197,0.12), rgba(52,152,219,0.12));
  color: var(--accent-color);
  flex-shrink: 0;
}

.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.6rem;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   CONFRONTO TABLE
   ============================================================ */
#confronto { background: var(--bg-light); }

.comparison-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.comparison-col {
  background: #fff;
  border-right: 1px solid #e9ecef;
}
.comparison-col:last-child { border-right: none; }
.comparison-col.highlight {
  background: var(--secondary-color);
}

.comparison-head {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}
.comparison-col.highlight .comparison-head { border-bottom-color: rgba(255,255,255,0.15); }

.comparison-head .icon-wrap {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}
.comparison-head h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.comparison-row {
  display: flex;
  align-items: flex-start;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88rem;
  gap: 0.6rem;
}
.comparison-col.highlight .comparison-row { border-bottom-color: rgba(255,255,255,0.08); }
.comparison-row:last-child { border-bottom: none; }

.comparison-row i { flex-shrink: 0; margin-top: 2px; font-size: 0.9rem; }

/* ============================================================
   COME FUNZIONA — Steps
   ============================================================ */
.steps-wrap { position: relative; }

.step-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}
.step-item:last-child { margin-bottom: 0; }

.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(1,173,197,0.35);
}

.step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.35rem;
}
.step-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   CLIENTI / LOGHI
   ============================================================ */
#clienti { background: var(--bg-light); }

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.logo-grid img {
  max-height: 100px;
  width: auto;
  filter: grayscale(0.3) opacity(0.75);
  transition: all var(--transition);
}
.logo-grid img:hover {
  filter: none;
  transform: scale(1.05);
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  height: 100%;
}
.testimonial-card::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--accent-color);
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  line-height: 1;
  opacity: 0.3;
}
.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 1.25rem;
  padding-top: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.testimonial-author-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-color);
}
.testimonial-author-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.testimonial-stars { color: #f5c518; font-size: 0.8rem; margin-bottom: 0.3rem; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--gradient-hero);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 70vw; height: 70vw;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cta-banner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.cta-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* ============================================================
   CONTATTI
   ============================================================ */
#contatti { background: #fff; }

.contact-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  transition: all var(--transition);
}
.contact-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.contact-card h5 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.contact-card a, .contact-card p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin: 0;
}
.contact-card a:hover { color: var(--accent-color); }

/* Form */
.form-control, .form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(1,173,197,0.15);
}
.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-check-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-submit {
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.85rem 2.5rem;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
  width: 100%;
  box-shadow: 0 4px 20px rgba(52,152,219,0.3);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(52,152,219,0.4);
  color: #fff;
}
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.form-success, .form-error {
  display: none;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.form-success { background: #d4edda; color: #155724; }
.form-error   { background: #f8d7da; color: #721c24; }

/* Form validation */
.form-control.is-invalid,
.form-check-input.is-invalid { border-color: #dc3545 !important; box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25) !important; }
.form-check-input.is-invalid ~ .form-check-label { color: #dc3545; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.main-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.75);
  padding: 70px 0 0;
}

.footer-brand img { height: 150px; width: auto; margin-bottom: 1.25rem; }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-color);
  margin-bottom: 1.25rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a i { font-size: 0.75rem; color: var(--accent-color); }
.footer-links a:hover { color: #fff; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.footer-contact-item i { color: var(--accent-color); margin-top: 2px; flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,0.7); }
.footer-contact-item a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding: 1.5rem 0;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar { background: var(--secondary-color); padding: 40px 0; }

.stat-item { text-align: center; }
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-number span { color: var(--accent-color); }
.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* ============================================================
   ANIMATE ON SCROLL
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  #hero { min-height: auto; padding: 120px 0 80px; }
  .hero-img-wrap { margin-top: 3rem; }
  .comparison-wrap { grid-template-columns: 1fr; }
  .comparison-col { border-right: none; border-bottom: 1px solid #e9ecef; }
  .comparison-col.highlight { order: -1; }
  section { padding: 60px 0; }
}

@media (max-width: 767.98px) {
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; }
  .stat-number { font-size: 1.8rem; }
  .navbar-collapse { background: var(--secondary-color); padding: 1rem; border-radius: 0 0 12px 12px; }
  section { padding: 50px 0; }
  .cta-banner { padding: 60px 0; }
}

@media (max-width: 575.98px) {
  .hero-features { gap: 0.5rem; }
  .hero-feature-tag { font-size: 0.75rem; padding: 0.25rem 0.65rem; }
  .comparison-row { padding: 0.75rem 1rem; }
}
