/* inCloud S.r.l. - Custom Styles */
/* Elegant Gold palette — Burgundy brand + warm gold accents */

/* ===== Web Font (self-hosted, app/assets/fonts) =====
   Ganky: titolone hero (display), come incloud.srl */
@font-face {
  font-family: 'Ganky';
  src: url("/assets/ganky-regular-f9dcec05.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== CSS Variables ===== */
:root {
  /* Primary gradient colors — Elegant Gold */
  --gradient-start: #7f1f29;
  --gradient-mid: #5a1620;
  --gradient-end: #b4841b;

  /* Primary colors */
  --primary: #7f1f29;
  --primary-dark: #5a1620;
  --primary-light: #d4a853;

  /* Accent colors */
  --accent: #b4841b;
  --accent-light: #c79b3b;

  /* Neutral colors */
  --text-dark: #1c1917;
  --text-muted: #57534e;
  --text-light: #f7fafc;
  --bg-light: #fcfcfb;
  --bg-dark: #1c1917;
  --white: #ffffff;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(127, 31, 41, 0.08);
  --shadow-md: 0 8px 30px rgba(127, 31, 41, 0.12);
  --shadow-lg: 0 20px 60px rgba(127, 31, 41, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--accent) 50%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Sections ===== */
section {
  padding: 6rem 0;
  position: relative;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.section-gradient {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 100%);
  color: var(--text-light);
}

.section-gradient p {
  color: rgba(255, 255, 255, 0.9);
}

.section-light {
  background: var(--bg-light);
}

/* ===== Navbar ===== */
.navbar-incloud {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(127, 31, 41, 0.08);
  padding: 1rem 0;
  transition: var(--transition-normal);
}

.navbar-incloud.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand img {
  height: auto;
  max-height: 80px;
  transition: var(--transition-fast);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--accent));
  transition: var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link:hover {
  color: var(--primary) !important;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2d1a1a 50%, var(--gradient-mid) 100%);
  position: relative;
  overflow: hidden;
  padding-top: 7rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(127, 31, 41, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(180, 132, 27, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(212, 168, 83, 0.12) 0%, transparent 40%);
  animation: pulse-bg 8s infinite alternate;
}

@keyframes pulse-bg {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-top: 8rem;
  max-width: 640px;
}

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: clamp(2.1rem, 4vw, 3.1rem);
}

.hero p.lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
}

/* ===== Hero a due colonne (testo + video), stile incloud.srl ===== */
/* Titolo hero col font display Ganky, come incloud.srl */
.hero h1.hero-title {
  font-family: 'Ganky', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.2;
  color: var(--text-light);
  text-wrap: balance;
  margin-bottom: 0;
  font-size: clamp(2.1rem, 1.55rem + 2.6vw, 2.5rem);
}

/* md/lg: il testo divide la hero col video → titolo piu' compatto su una colonna */
@media (min-width: 768px) {
  .hero h1.hero-title {
    font-size: 1.95rem;
  }
}

@media (min-width: 1200px) {
  .hero h1.hero-title {
    font-size: 2.5rem;
  }
}

/* Occhiello arancione sopra il titolo (palette compatibile con oro/bordeaux) */
.hero-kicker {
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e8912f;
  margin-bottom: 1rem;
}

/* Titolo hero su due tonalita' di bianco (come negli altri siti) */
.hero-title-line1 {
  color: rgba(255, 255, 255, 0.72);
}

.hero-title-line2 {
  color: #ffffff;
}

/* Sottotitolo/descrizione hero, come incloud.srl */
.hero .hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 48ch;
  margin-top: 1.75rem;
  margin-bottom: 2.25rem;
}

.hero .hero-subtitle strong {
  color: #ffffff;
}

/* Colonna video: su md/lg allineata a destra */
.hero-media {
  position: relative;
  z-index: 2;
}

.hero-media .ric-hero-video-frame {
  max-width: 560px;
  width: 100%;
}

@media (min-width: 768px) {
  /* video allineato a destra su schermi medium e large */
  .hero-media .ric-hero-video-frame {
    margin-left: auto;
    margin-right: 0;
  }

  .hero-content {
    margin-top: 0;
  }
}

/* Sotto md il testo e' centrato e il sottotitolo si centra */
@media (max-width: 767.98px) {
  .hero .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-logo {
  max-width: 280px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 30px rgba(127, 31, 41, 0.4));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* ===== Buttons ===== */
.btn-gradient {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--accent) 100%);
  border: none;
  color: var(--text-light);
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-normal);
  box-shadow: 0 4px 20px rgba(127, 31, 41, 0.35);
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(127, 31, 41, 0.5);
  color: var(--text-light);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--text-light);
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-normal);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-light);
  color: var(--text-light);
  transform: translateY(-3px);
}

/* ===== Cards ===== */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  transition: var(--transition-normal);
}

.card-glass:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-service {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  height: 100%;
  transition: var(--transition-normal);
  border: 1px solid rgba(127, 31, 41, 0.08);
  box-shadow: var(--shadow-sm);
}

.card-service:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-service .icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--gradient-start), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--text-light);
}

/* ===== Project Cards ===== */
.card-project {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-project:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card-project .project-header {
  background: linear-gradient(135deg, var(--gradient-start), var(--accent));
  padding: 2rem;
  text-align: center;
}

.card-project .project-logo {
  max-height: 60px;
  max-width: 200px;
  filter: brightness(0) invert(1);
}

.card-project .project-body {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-project .project-body p {
  flex-grow: 1;
}

/* ===== Feature List ===== */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ===== Why Choose Us ===== */
.why-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  transition: var(--transition-normal);
}

.why-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.why-item .icon-box {
  width: 60px;
  height: 60px;
  min-width: 60px;
  background: linear-gradient(135deg, var(--gradient-start), var(--accent));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* ===== Tech Stack ===== */
.tech-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.tech-icon:hover {
  transform: translateY(-5px);
}

.tech-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition-normal);
}

.tech-icon:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Treat <i> like <img> for tech icons */
.tech-icon i {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition-normal);
  display: block;
  margin-bottom: 0.75rem;
}

.tech-icon:hover i {
  filter: grayscale(0%);
  opacity: 1;
}

.tech-icon span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Contact Form ===== */
.contact-form {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

.contact-form h4 {
  color: var(--text-dark);
}

.form-control {
  border: 2px solid rgba(127, 31, 41, 0.08);
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  transition: var(--transition-fast);
}


.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(127, 31, 41, 0.08);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer h5 {
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 3rem;
}

.footer-logo {
  max-height: 60px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ===== Flash Messages ===== */
.alert-flash {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  section {
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
    padding: 8rem 0 4rem;
  }

  .hero-logo {
    max-width: 200px;
  }
}

@media (max-width: 767.98px) {

  .card-service,
  .contact-form {
    padding: 1.5rem;
  }

  .why-item {
    flex-direction: column;
    text-align: center;
  }

  .why-item .icon-box {
    margin: 0 auto;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gradient-start), var(--accent));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== NEW ANIMATION STYLES ===== */

/* Scroll Reveal Animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Typing Effect */
.typing-text {
  display: inline-block;
  min-width: 200px;
}

.typing-text::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--primary-light);
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Cursor glow rimosso (ombreggiava i poster video). */

/* Hero Image Animation */
.hero-illustration {
  max-width: 100%;
  animation: floatRotate 8s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(127, 31, 41, 0.25));
}

@keyframes floatRotate {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-15px) rotate(2deg);
  }

  50% {
    transform: translateY(-25px) rotate(0deg);
  }

  75% {
    transform: translateY(-15px) rotate(-2deg);
  }
}

/* Glow Pulse Effect */
.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(127, 31, 41, 0.3);
  }

  50% {
    box-shadow: 0 0 60px rgba(127, 31, 41, 0.4), 0 0 100px rgba(180, 132, 27, 0.2);
  }
}

/* Shimmer Effect on Buttons */
.btn-gradient {
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

/* Card Service Enhanced Hover */
.card-service {
  position: relative;
  overflow: hidden;
}

.card-service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--accent), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.card-service:hover::before {
  transform: scaleX(1);
}

/* Icon Rotation on Hover */
.card-service:hover .icon {
  transform: rotateY(180deg);
}

.card-service .icon {
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

/* Project Card Image Zoom */
.card-project .project-header {
  overflow: hidden;
}

.card-project:hover .project-header {
  background-size: 110%;
}

/* Feature List Animation */
.feature-list li {
  transition: all 0.3s ease;
}

.feature-list li:hover {
  padding-left: 2.5rem;
  color: var(--primary);
}

/* Tech Icon Bounce */
.tech-icon:hover img,
.tech-icon:hover i {
  animation: bounce 0.5s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  25% {
    transform: translateY(-10px);
  }

  50% {
    transform: translateY(-5px);
  }

  75% {
    transform: translateY(-8px);
  }
}

/* Stats Counter Style */
.stat-item {
  text-align: center;
  padding: 2rem;
}

.counter-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-start), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Divider */
.section-divider {
  height: 100px;
  background: linear-gradient(to bottom right, transparent 49%, var(--bg-light) 50%);
}

/* Background Pattern */
.bg-pattern {
  background-image:
    radial-gradient(circle at 25px 25px, rgba(127, 31, 41, 0.04) 2%, transparent 0%),
    radial-gradient(circle at 75px 75px, rgba(180, 132, 27, 0.04) 2%, transparent 0%);
  background-size: 100px 100px;
}

/* Team Image Style */
.team-illustration {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s ease;
}

.team-illustration:hover {
  transform: scale(1.02);
}

/* Security/AI Images */
.feature-image {
  max-width: 300px;
  margin: 0 auto;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.feature-image:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 20px 40px rgba(127, 31, 41, 0.3));
}

/* Loading Animation */
body:not(.loaded) {
  overflow: hidden;
}

body:not(.loaded)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-dark);
  z-index: 99999;
}

body.loaded::before {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Why Item Glow Border */
.why-item {
  border: 1px solid transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, var(--gradient-start), var(--accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Navbar Logo Glow */
.navbar-logo {
  transition: filter 0.3s ease;
}

.navbar-logo:hover {
  filter: drop-shadow(0 0 10px rgba(127, 31, 41, 0.4));
}

/* ===== New Section Styles ===== */

/* Floating Animation */
.floating-animation {
  animation: float 6s ease-in-out infinite;
}

/* Team Cards */
.card-team {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(127, 31, 41, 0.08);
  color: var(--text-dark);
}

.card-team h4 {
  color: var(--text-dark) !important;
}

.card-team .text-primary {
  color: var(--primary) !important;
}

.card-team .text-muted {
  color: var(--text-muted) !important;
}

.card-team:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-team .team-img {
  transition: var(--transition-normal);
}

.card-team:hover .team-img {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(127, 31, 41, 0.3);
}

/* Logos Section */
.grayscale-logos img {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
  cursor: pointer;
}

.grayscale-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* Ensure images in About are responsive */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* WhatsApp Float Container */
.whatsapp-container {
  position: fixed;
  bottom: 110px;
  right: 40px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.whatsapp-float {
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  margin-top: 10px;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  color: #FFF;
  transform: scale(1.1);
}

.whatsapp-bubble {
  background-color: white;
  color: #333;
  padding: 10px 15px;
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  pointer-events: none;
  /* Animation to show bubble */
  opacity: 1;
  visibility: visible;
  animation: fadeInBubble 1s ease-out 1s forwards;
}

.whatsapp-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid white;
}

@keyframes fadeInBubble {
  from {
    opacity: 0;
    transform: translate(-10px, -50%);
  }

  to {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 47px;
  width: 45px;
  height: 45px;
  background-color: #7f1f29;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: #5a1620;
  color: white;
  transform: translateY(-3px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .whatsapp-container {
    bottom: 90px;
    right: 20px;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 25px;
  }

  .whatsapp-bubble {
    display: none !important;
  }

  .back-to-top {
    bottom: 20px;
    right: 25px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* Mobile Stats Override */
@media (max-width: 576px) {
  .counter-wrapper[data-stat="users"] .counter-value {
    font-size: 0 !important;
  }

  .counter-wrapper[data-stat="users"] .counter-value::after {
    content: '23K+';
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    background: linear-gradient(135deg, #fff 0%, #d4a853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* Flag Icons */
.flag-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* reCAPTCHA badge scaling */
.grecaptcha-badge {
  transform: scale(0.85);
  transform-origin: bottom left;
  z-index: 100 !important;
}

@media (max-width: 768px) {
  .grecaptcha-badge {
    transform: scale(0.7);
  }
}
/* ===== Custom Kaminari Pagination ===== */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.pagination span, .pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-dark);
  background-color: var(--white);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.pagination .current {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 0.5rem 1rem rgba(127, 31, 41, 0.2);
}

.pagination .gap {
  box-shadow: none;
  background: transparent;
  color: var(--text-muted);
}

/* Partners & Agenzie Aderenti */
.partner-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.75rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.partner-marquee-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: partner-marquee-scroll 28s linear infinite;
}

.partner-marquee:hover .partner-marquee-track {
  animation-play-state: paused;
}

.partner-marquee-item {
  flex: 0 0 210px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
}

.partner-marquee-item img {
  display: block;
  max-width: 100%;
  max-height: 82px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.partner-marquee-item:hover img,
.partner-marquee-item:focus-visible img {
  filter: none;
  opacity: 1;
  transform: scale(1.06);
}

@keyframes partner-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 1.5rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .partner-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .partner-marquee-track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    animation: none;
  }

  .partner-marquee-item[aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 576px) {
  .partner-marquee-track {
    gap: 1.5rem;
  }

  .partner-marquee-item {
    flex-basis: 165px;
    height: 92px;
  }

  .partner-marquee-item img {
    max-height: 68px;
  }

  @keyframes partner-marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 0.75rem)); }
  }
}

/* === Video moduli RESTinCloud (hero + sezione Moduli in azione) === */
.ric-video-box {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #14090b;
  overflow: hidden;
}

/* Dentro un contenitore .ratio il box deve riempire il frame (Bootstrap
   posiziona i figli di .ratio in absolute: senza questa regola il box
   scende sotto lo pseudo-elemento e raddoppia l'altezza). */
.ratio > .ric-video-box {
  position: absolute;
  inset: 0;
}

.ric-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ric-video-box:hover .ric-video-poster,
.ric-video-box:focus-visible .ric-video-poster {
  transform: scale(1.045);
}

.ric-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 9, 11, 0) 55%, rgba(20, 9, 11, 0.55) 100%);
  pointer-events: none;
}

.ric-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #7f1f29;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  transition: transform 0.25s ease, background-color 0.25s ease;
  pointer-events: none;
}

.ric-play-btn-lg {
  width: 84px;
  height: 84px;
  font-size: 2.6rem;
}

.ric-video-box:hover .ric-play-btn,
.ric-video-box:focus-visible .ric-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #96242f;
}

.ric-video-duration {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  background: rgba(20, 9, 11, 0.75);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  pointer-events: none;
}

.module-video-card .ric-video-box {
  border-radius: 0;
}

.ric-hero-video-frame {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ric-hero-slide-label {
  position: absolute;
  left: 0.75rem;
  bottom: 0.65rem;
  background: rgba(20, 9, 11, 0.75);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  pointer-events: none;
}

#heroVideoCarousel .carousel-control-prev,
#heroVideoCarousel .carousel-control-next {
  width: 10%;
}

#heroVideoCarousel .carousel-control-prev-icon,
#heroVideoCarousel .carousel-control-next-icon {
  width: 2.6rem;
  height: 2.6rem;
  background-color: rgba(20, 9, 11, 0.6);
  border-radius: 50%;
  background-size: 50%;
}

.ric-hero-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.ric-modal-video {
  display: block;
  max-height: 82vh;
  background: #000;
}

@media (max-width: 767.98px) {
  .ric-modal-video {
    max-height: calc(100vh - 52px);
  }
}

/* === Pagine modulo e dropdown Moduli === */
.module-page-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #2d1a1a 50%, var(--gradient-mid) 100%);
  padding: 7.5rem 0 2.5rem;
}

.module-breadcrumb {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.75rem;
}

.module-breadcrumb .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.module-breadcrumb .breadcrumb-item.active {
  color: #fff;
}

.module-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.45);
}

.module-comparison-table thead th {
  background: #f4eeef;
  color: #7f1f29;
  font-weight: 700;
  border: 0;
  padding: 0.9rem 1.25rem;
}

.module-comparison-table thead th.th-after {
  background: #7f1f29;
  color: #fff;
}

.module-comparison-table tbody td {
  padding: 0.9rem 1.25rem;
}

.module-more-link {
  background: #faf7f4;
  color: #7f1f29;
  text-decoration: none;
  border-top: 1px solid rgba(127, 31, 41, 0.08);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.module-more-link:hover {
  background: #7f1f29;
  color: #fff;
}

.modules-dropdown-menu {
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
}

@media (min-width: 992px) {
  .modules-nav-dropdown:hover > .modules-dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* ===== Sezione video moduli: toggle "Scopri tutte le funzioni" ===== */
#moduli-video .module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(127, 31, 41, 0.12) !important;
}

.ric-modules-toggle .ric-toggle-less { display: none; }
.ric-modules-toggle[aria-expanded="true"] .ric-toggle-more { display: none; }
.ric-modules-toggle[aria-expanded="true"] .ric-toggle-less { display: inline; }

.ric-toggle-chevron {
  display: inline-block;
  transition: transform 0.3s ease;
}
.ric-modules-toggle[aria-expanded="true"] .ric-toggle-chevron { transform: rotate(180deg); }

/* ===== Scheda tecnica: Tutto quello che include ===== */
.ric-specsheet {
  background: #ffffff;
  border-top: 1px solid #ece8e2;
  border-bottom: 1px solid #ece8e2;
}

.ric-spec-index {
  display: flex;
  flex-direction: column;
  border-left: 2px solid #ece8e2;
}

@media (min-width: 992px) {
  .ric-spec-index { position: sticky; top: 96px; }
}

.ric-spec-index-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: #444;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ric-spec-index-link:hover { color: #7f1f29; }

.ric-spec-index-link:not(.collapsed) {
  color: #7f1f29;
  border-left-color: #7f1f29;
  background: rgba(127, 31, 41, 0.04);
}

.ric-spec-index-num {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: #b4841b;
  letter-spacing: 0.05em;
}

.ric-spec-index-count {
  margin-left: auto;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: #b0a89d;
}

.ric-spec-area {
  border: 1px solid #e8e3dc;
  background: #fff;
  margin-bottom: -1px;
}

.ric-spec-area:first-child { border-radius: 10px 10px 0 0; }
.ric-spec-area:last-child { border-radius: 0 0 10px 10px; }

.ric-spec-area-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.05rem 1.25rem;
  background: none;
  border: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  text-align: left;
}

.ric-spec-area-btn .ric-toggle-chevron { color: #b0a89d; }
.ric-spec-area-btn:not(.collapsed) { color: #7f1f29; }
.ric-spec-area-btn:not(.collapsed) .ric-toggle-chevron {
  transform: rotate(180deg);
  color: #7f1f29;
}

.ric-spec-list {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem 1.1rem;
}

.ric-spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0;
  border-top: 1px dashed #e8e3dc;
  font-size: 0.95rem;
  color: #3a3a3a;
}

.ric-spec-item-main {
  min-width: 0;
}

.ric-voip-compatibility {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(70, 185, 120, 0.25);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(70, 185, 120, 0.08), rgba(127, 31, 41, 0.04));
}

.ric-voip-compatibility-label {
  color: #4d514e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ric-voip-partners {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ric-voip-partner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.3rem 0.65rem 0.3rem 0.42rem;
  border: 1px solid #e3e6e4;
  border-radius: 999px;
  background: #fff;
  color: #26312b;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 0.2rem 0.7rem rgba(28, 38, 51, 0.06);
}

.ric-voip-partner img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.ric-voip-compatibility-compact {
  justify-content: flex-start;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.ric-voip-compatibility-compact .ric-voip-compatibility-label {
  font-size: 0.65rem;
}

.ric-voip-compatibility-compact .ric-voip-partner {
  min-height: 30px;
  padding: 0.18rem 0.5rem 0.18rem 0.28rem;
  font-size: 0.68rem;
  box-shadow: none;
}

.ric-voip-compatibility-compact .ric-voip-partner img {
  width: 22px;
  height: 22px;
}

@media (max-width: 575.98px) {
  .ric-spec-item {
    align-items: flex-start;
  }

  .ric-voip-compatibility,
  .ric-voip-partners {
    justify-content: flex-start;
  }
}

.ric-spec-tag {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.ric-spec-tag-included {
  color: #1a7f4e;
  border-color: rgba(26, 127, 78, 0.35);
  background: rgba(26, 127, 78, 0.07);
}

.ric-spec-tag-extra {
  color: #8a6413;
  border-color: rgba(180, 132, 27, 0.4);
  background: rgba(180, 132, 27, 0.08);
}

/* ===== Timeline: Cosa cambia, ora per ora ===== */
.ric-timeline {
  position: relative;
  max-width: 820px;
  padding-left: 2.25rem;
}

.ric-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(180, 132, 27, 0.9) 0%, rgba(127, 31, 41, 0.9) 100%);
}

.ric-tl-step {
  position: relative;
  padding-bottom: 3rem;
}

.ric-tl-step:last-child { padding-bottom: 1.5rem; }

.ric-tl-dot {
  position: absolute;
  left: -33px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b4841b;
  box-shadow: 0 0 0 4px rgba(180, 132, 27, 0.22);
}

.ric-tl-title {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.ric-tl-marker {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: #d9a92c;
  border: 1px dashed rgba(217, 169, 44, 0.5);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.9rem;
  background: rgba(217, 169, 44, 0.06);
  white-space: nowrap;
}

@media (min-width: 992px) {
  .ric-tl-marker {
    position: absolute;
    right: 0;
    top: 2px;
    margin-bottom: 0;
  }
}

.ric-tl-label {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 0.55rem;
  transform: translateY(-1px);
}

.ric-tl-label-after { color: #d9a92c; }

.ric-tl-section .ric-tl-today {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  max-width: 640px;
}

.ric-tl-today-text {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-decoration-thickness: 1px;
}

.ric-tl-section .ric-tl-after {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 0;
  max-width: 680px;
}

.ric-tl-after-text { color: #fff; }

.ric-tl-closing {
  margin-top: 2.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ric-tl-closing-big {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.ric-tl-section .ric-tl-closing-note {
  color: rgba(255, 255, 255, 0.55);
  max-width: 760px;
  font-size: 1rem;
  margin-bottom: 0;
}
