/* ═══════════════════════════════════════════
   Design tokens
═══════════════════════════════════════════ */
:root {
  --accent:        #00a8ff;
  --accent-dark:   #0090e0;
  --bg-dark:       #1a2332;
  --bg-dark-2:     #222d3e;
  --text-light:    #e0e6f0;
  --text-muted:    #8a9bae;
  --section-bg:    #f5f7fa;
  --card-bg:       #ffffff;
  --radius:        10px;
  --shadow:        0 4px 20px rgba(0, 0, 0, 0.08);
  --transition:    0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--section-bg);
  color: #2c3e50;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

/* ═══════════════════════════════════════════
   Navbar
═══════════════════════════════════════════ */
#mainNavbar {
  background-color: var(--bg-dark);
  border-bottom: 2px solid rgba(0, 168, 255, 0.15);
  padding: 0.6rem 0;
  z-index: 1030;
}

#mainNavbar .navbar-brand {
  color: var(--accent) !important;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: opacity var(--transition);
}

#mainNavbar .navbar-brand:hover { opacity: 0.85; }

#mainNavbar .nav-link {
  color: var(--text-light) !important;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem !important;
  position: relative;
  transition: color var(--transition);
}

/* Underline accent on active / hover */
#mainNavbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

#mainNavbar .nav-link:hover::after,
#mainNavbar .nav-link.active::after { width: 70%; }

#mainNavbar .nav-link.active { color: var(--accent) !important; }
#mainNavbar .nav-link:hover  { color: var(--accent) !important; }

/* Hamburger tint */
#mainNavbar .navbar-toggler {
  border-color: rgba(0, 168, 255, 0.4);
}

#mainNavbar .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(0,168,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ═══════════════════════════════════════════
   Social icons  (header + footer)
═══════════════════════════════════════════ */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

.social-link:hover {
  color: var(--accent);
  background-color: rgba(0, 168, 255, 0.12);
}

/* ═══════════════════════════════════════════
   Tab content
═══════════════════════════════════════════ */
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.show.active { display: block; }

/* ═══════════════════════════════════════════
   Page sections
═══════════════════════════════════════════ */
.page-section {
  padding: 4rem 0 5rem;
  background-color: var(--section-bg);
  min-height: calc(100vh - 140px);
}

/* ═══════════════════════════════════════════
   Shared typography
═══════════════════════════════════════════ */
.section-title {
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.section-subtitle {
  color: #6c757d;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   Chi sono
═══════════════════════════════════════════ */
.profile-img-wrapper {
  display: inline-block;
}

.profile-img {
  width: 100%;
  max-width: 380px;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px solid rgba(0, 168, 255, 0.2);
}

.lead-text {
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.body-text {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.body-text em {
  color: var(--accent-dark);
}

/* ═══════════════════════════════════════════
   Cosa faccio — service cards
═══════════════════════════════════════════ */
.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-top-color var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-top-color: var(--accent);
}

.service-icon {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-title {
  font-weight: 700;
  color: #1a2332;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.service-desc {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   Contatti — info cards
═══════════════════════════════════════════ */
.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.contact-icon {
  font-size: 1.75rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-label {
  font-weight: 700;
  color: #1a2332;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.contact-value {
  color: #4a5568;
  font-size: 0.9rem;
  margin-bottom: 0;
  text-decoration: none;
}

a.contact-value:hover { color: var(--accent); }

/* Contact form wrapper */
.contact-form-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-intro {
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
  margin-bottom: 0;
}

/* Form controls */
.spa-input {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  color: #2c3e50;
  background-color: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.spa-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.15);
  outline: none;
}

.spa-input::placeholder { color: #adb5bd; }

/* Submit button */
.spa-btn-primary {
  background-color: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--transition), transform 0.1s ease;
}

.spa-btn-primary:hover  { background-color: var(--accent-dark); transform: translateY(-1px); }
.spa-btn-primary:active { transform: translateY(0); }

/* Privacy checkbox */
.privacy-label {
  font-size: 0.82rem;
  color: #6c757d;
}

.spa-link {
  color: var(--accent);
  text-decoration: none;
}

.spa-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   Footer
═══════════════════════════════════════════ */
#mainFooter {
  background-color: var(--bg-dark);
  color: var(--text-muted);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  border-top: 2px solid rgba(0, 168, 255, 0.12);
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-nav a {
  color: var(--text-light);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--accent); }

#mainFooter .social-icons { justify-content: center; }

#mainFooter .social-link {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════
   Responsive
═══════════════════════════════════════════ */
@media (max-width: 767.98px) {
  .page-section {
    padding: 2.5rem 0 3rem;
  }

  .section-title { font-size: 1.6rem; }

  .profile-img {
    height: 280px;
    max-width: 100%;
  }

  .contact-form-wrapper { padding: 1.5rem; }

  #mainNavbar .social-icons {
    justify-content: center;
    margin-bottom: 0.5rem;
  }
}


.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    text-decoration: none;
    animation: whatsapp-pulse 2.5s infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .whatsapp-float:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

    .whatsapp-float i {
        color: #fff;
        font-size: 32px;
    }

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Tooltip laterale, visibile solo su hover e solo da desktop in su */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #075E54;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

    .whatsapp-tooltip::after {
        content: "";
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        border: 6px solid transparent;
        border-left-color: #075E54;
    }

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Su mobile nascondiamo il tooltip: poco utile col touch e rischia di sovrapporsi */
@media (max-width: 576px) {
    .whatsapp-tooltip {
        display: none;
    }

    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 16px;
        right: 16px;
    }

        .whatsapp-float i {
            font-size: 28px;
        }
}
