/* Variables using CSS custom properties */
:root {
  --primary-color: #6e42e5;
  --secondary-color: #3b9ae2;
  --accent-color: #f44c7f;
  --dark-bg: #0a0b14;
  --darker-bg: #060713;
  --card-bg: #12131e;
  --text-color: #e6e7ee;
  --text-muted: #8a8ea0;
  --text-muted-2: #c8ccdb; /* Made more white - changed from #a9adbf */
  --border-radius: 8px;
  --transition-speed: 0.4s;
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  background-color: var(--dark-bg);
}

.kfg-website {
  font-family: 'Poppins', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-color);
  overflow-x: hidden;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Animation Classes */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  transform: translateY(30px);
}

.fade-in {
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.2s;
}

.delay-2 {
  transition-delay: 0.4s;
}

.delay-3 {
  transition-delay: 0.6s;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(110, 66, 229, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Navigation - Fixed positioning and alignment issues */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(10, 11, 20, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  border-bottom: none;
}

/* Logo improvements */
.main-nav .logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1001;
  flex-shrink: 0; /* Prevent logo from shrinking */
}

/* Logo ancora più piccolo */
.main-nav .logo img {
  height: 35px; /* Ridotto ulteriormente da 40px a 35px */
  width: auto;
  display: block;
}

/* Nav links improvements - fixed visibility issues */
.main-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav .nav-links .nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  padding: 5px 0;
  cursor: pointer;
  transition: color 0.3s;
  white-space: nowrap; /* Prevent text wrapping */
}

.main-nav .nav-links .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s;
}

.main-nav .nav-links .nav-link:hover {
  color: white;
}

.main-nav .nav-links .nav-link:hover::after {
  width: 100%;
}

.main-nav .nav-links .nav-link.cta-link {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(110, 66, 229, 0.3);
}

.main-nav .nav-links .nav-link.cta-link::after {
  display: none;
}

.main-nav .nav-links .nav-link.cta-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(110, 66, 229, 0.5);
}

/* Improved mobile menu toggle */
.main-nav .mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001; /* Ensure toggle stays above mobile menu */
}

.main-nav .mobile-menu-toggle span {
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* Mobile improvements */
@media (max-width: 768px) {
  
  .main-nav {
    padding: 12px 5%;
  }
  
  .main-nav .logo img {
    height: 25px; /* Ridotto ulteriormente da 30px a 25px */
  }
  
  /* Improved mobile menu toggle */
  .main-nav .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
    cursor: pointer;
    z-index: 1002;
  }
  
  /* Fixed positioning of mobile dropdown menu */
  .main-nav .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(6, 7, 19, 0.98);
    display: none;
    flex-direction: column;
    justify-content: flex-start; /* Start from top */
    align-items: center;
    padding-top: 80px; /* Space below header */
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto; /* Allow scrolling if needed */
  }
  
  /* Show mobile menu properly */
  .main-nav .nav-links.show-mobile {
    display: flex;
    opacity: 1;
  }
  
  /* Improve menu item spacing and visibility */
  .main-nav .nav-links .nav-link {
    font-size: 20px;
    padding: 15px 0;
    margin: 5px 0;
    width: 80%; /* Make links wider for better tappability */
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Last item doesn't need border */
  .main-nav .nav-links .nav-link:last-child {
    border-bottom: none;
  }
  
  /* Make CTA button stand out */
  .main-nav .nav-links .nav-link.cta-link {
    margin-top: 20px;
    padding: 15px 30px;
    border: none;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  }
}

/* Small screen adjustments */
@media (max-width: 576px) {
  .main-nav {
    padding: 12px 5%;
  }
  
  .main-nav .logo {
    font-size: 22px;
  }
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0 5%;
  text-align: center;
  overflow: hidden;
  margin-top: 0;
  background-color: var(--dark-bg);
}

.hero-section .stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
              radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
              radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
              radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
              radial-gradient(circle at 90% 50%, rgba(255, 255, 255, 0.2) 1px, transparent 2px),
              var(--darker-bg);
  background-size: 100px 100px, 150px 150px, 100px 100px, 200px 200px, 300px 300px;
  opacity: 0.2;
  z-index: -1;
}

.hero-section .hero-content {
  max-width: 900px;
}

.hero-section .hero-content h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-section .hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-section .hero-content .typewriter-text {
  position: relative;
}

.hero-section .hero-content .typewriter-text::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-section .hero-content .cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

@media (max-width: 568px) {
  .hero-section .hero-content .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

.hero-section .scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-section .scroll-indicator .mouse {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-section .scroll-indicator .mouse .wheel {
  width: 6px;
  height: 10px;
  background-color: white;
  border-radius: 3px;
  animation: wheel 1.5s infinite;
}

@keyframes wheel {
  0% { transform: translateY(-10px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

.hero-section .scroll-indicator .arrow-down {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(45deg);
  margin-top: 10px;
  animation: arrow 1.5s infinite;
}

@keyframes arrow {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2.2rem;
  }
}

/* Portfolio Section */
.portfolio-section {
  padding: 100px 5%;
  background-color: var(--darker-bg);
}

@media (max-width: 768px) {
  .portfolio-section {
    padding: 70px 5%;
  }
}

.portfolio-section .video-container {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 60px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.portfolio-section .video-container:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .portfolio-section .video-container {
    height: 300px;
  }
}

.portfolio-section .video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-section .video-container .video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.portfolio-section .video-container .video-overlay h3 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .portfolio-section .video-container .video-overlay h3 {
    font-size: 1.5rem;
  }
}

.portfolio-section .video-container .video-overlay .play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.portfolio-section .video-container .video-overlay .play-btn:hover {
  transform: scale(1.1);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.portfolio-section .video-container .video-overlay .play-btn i {
  font-size: 30px;
  color: white;
}

.portfolio-section .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-section .portfolio-grid .portfolio-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.portfolio-section .portfolio-grid .portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image {
  width: 350px;
  height: 250px;
  overflow: hidden;
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image .portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 20, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image .portfolio-overlay h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.portfolio-section .portfolio-grid .portfolio-item .portfolio-image .portfolio-overlay p {
  color: var(--text-muted-2);
  margin-bottom: 20px;
}

/* Pulsanti portfolio migliorati */
.portfolio-item .more-details-btn {
  background: rgba(110, 66, 229, 0.2);
  border: 2px solid var(--primary-color);
  color: white;
  padding: 18px 22px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.portfolio-item .more-details-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: all 0.5s ease;
  z-index: -1;
}

/* Attualmente il pulsante si attiva solo quando ci passa sopra col mouse */
.portfolio-item .more-details-btn:hover {
  box-shadow: 0 10px 25px rgba(110, 66, 229, 0.6); /* Ombra più intensa e ampia */
  color: white;
  transform: translateY(-3px); /* Leggero effetto di sollevamento */
  filter: brightness(1.2); /* Leggero aumento di luminosità */
}

.portfolio-item .more-details-btn:hover::before {
  left: 0;
}

/* Modifica: attiva l'effetto hover del pulsante quando passi col mouse sulla card */
.portfolio-item:hover .more-details-btn {
  box-shadow: 0 10px 20px rgba(110, 66, 229, 0.4);
  color: white;
}

.portfolio-item:hover .more-details-btn::before {
  left: 0;
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* About Us Section */
.about-section {
  padding: 100px 5%;
}

@media (max-width: 768px) {
  .about-section {
    padding: 70px 5%;
  }
}

.about-section .about-content {
  max-width: 1200px;
  margin: 0 auto;
}

.about-section .team-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 20px;
  gap: 25px;
  margin-bottom: 60px;
  position: relative;
  max-width: calc(100% - 40px);
  margin-left: auto;
  margin-right: auto;
  
  /* Prevent horizontal scrolling on wheel - key property */
  overscroll-behavior-x: none;
}

/* Ensure team member cards display correctly */
.about-section .team-grid .team-member {
  flex: 0 0 320px;
  scroll-snap-align: start;
  margin-right: 0;
  margin-bottom: 10px;
  z-index: 5; /* Make sure cards appear above gradients */
  position: relative;
}

@media (max-width: 992px) {
  .about-section .team-grid .team-member {
    flex: 0 0 300px;
  }
}

@media (max-width: 768px) {
  .about-section .team-grid .team-member {
    flex: 0 0 280px;
  }
}

@media (max-width: 576px) {
  .about-section .team-grid .team-member {
    flex: 0 0 260px;
  }
}

.about-section .team-grid .team-member {
  background: rgba(18, 19, 30, 0.6);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(110, 66, 229, 0.1);
}

.about-section .team-grid .team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.about-section .team-grid .team-member .member-info {
  padding: 0 20px 25px;
}

.about-section .team-grid .team-member .member-info .member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(110, 66, 229, 0.2);
  min-height: 60px;
}

.about-section .team-grid .team-member .member-info .member-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  line-height: 1.2;
  color: var(--text-color);
  max-width: 75%;
}

.about-section .team-grid .team-member .member-info h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.about-section .team-grid .team-member .member-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.about-section .team-grid .team-member .member-info p strong {
  color: white;
  font-weight: 600;
}

.about-section .team-grid .team-member .member-info ul {
  margin-left: 5px;
  padding-left: 15px;
  margin-bottom: 20px;
}

.about-section .team-grid .team-member .member-info ul li {
  margin-bottom: 10px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.about-section .team-grid .team-member .member-info ul li strong {
  color: white;
  font-weight: 600;
}

.about-section .values-container .values-header {
  text-align: center;
  margin-bottom: 40px;
}

.about-section .values-container .values-header h2 {
  font-size: 2.5rem;
}

.about-section .values-container .values-header h3 {
  font-size: 2rem;
}

.about-section .values-container .values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  justify-content: center;
  margin: 0 auto;
}

.about-section .values-container .values-grid .value-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.about-section .values-container .values-grid .value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.about-section .values-container .values-grid .value-card .value-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(45deg, rgba(110, 66, 229, 0.1), rgba(59, 154, 226, 0.1));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.about-section .values-container .values-grid .value-card .value-icon i {
  font-size: 28px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-section .values-container .values-grid .value-card h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.about-section .values-container .values-grid .value-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* Contact Section */
.contact-section {
  padding: 100px 5%;
  background-color: var(--darker-bg);
}

.contact-section .contact-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Aggiusta padding interno senza disallineamento */
.contact-section .contact-info {
  padding: 25px 20px 25px 20px;
  box-sizing: border-box; /* Assicura che il padding sia incluso nelle dimensioni */
  width: calc(100% - 40px); /* Compensa il padding laterale */
  margin-left: auto;
  margin-right: auto;
}

/* Aumenta spaziatura interna delle card */
.contact-section .contact-info .info-card {
  margin: -15px 10px; /* Margine laterale per distanziarle dai bordi */
}

/* Migliora background del contenitore */
.contact-section .contact-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  width: 100%;
  margin-bottom: 20px;
  grid-column: 1 / -1;
  background: linear-gradient(145deg, 
    rgba(25, 26, 36, 0.6), 
    rgba(15, 16, 22, 0.4)
  );
  border-radius: var(--border-radius);
  padding: 25px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Ombra sottile */
}

/* Leggero effetto hover per le card */
.contact-section .contact-info .info-card:hover {
  background: rgba(255, 255, 255, 0.02); /* Leggera illuminazione al passaggio */
}

/* Adatta dimensioni card per rispettare padding ridotto */
.contact-section .contact-info .info-card {
  padding: 20px 15px;
}

/* Adatta padding dei metodi di contatto */
.contact-methods {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 40px;
  padding: 0; /* Rimuove eventuali padding */
}

/* Card uniformi con dimensioni fisse */
.contact-section .contact-info .info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border-radius: var(--border-radius);
  padding: 15px;
  height: 160px;
  border: none;
  box-shadow: none;
  transition: transform 0.3s ease;
}

/* Fix per le icone e l'effetto hover */
.contact-section .contact-info .info-icon {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: transparent; /* Rimuove background dal contenitore esterno */
  box-shadow: none; /* Rimuove ombra dal contenitore esterno */
}

/* Effetti avanzati per le icone */
.contact-section .contact-info .info-icon .icon-circle {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, rgba(110, 66, 229, 0.15), rgba(59, 154, 226, 0.1));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

/* Effetto brillantezza al passaggio */
.contact-section .contact-info .info-icon .icon-circle::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  top: -50%;
  left: -50%;
  opacity: 0;
  transition: all 0.6s ease;
  transform: scale(0);
  filter: blur(5px);
}

/* Hover più elegante e moderno */
.contact-section .contact-info .info-card:hover .info-icon .icon-circle {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 25px rgba(110, 66, 229, 0.25),
    0 0 15px rgba(110, 66, 229, 0.15);
  background: linear-gradient(145deg, 
    rgba(110, 66, 229, 0.25), 
    rgba(59, 154, 226, 0.15),
    rgba(110, 66, 229, 0.20)
  );
}

/* Attivazione effetto brillantezza */
.contact-section .contact-info .info-card:hover .info-icon .icon-circle::after {
  opacity: 0.4;
  transform: scale(3);
  top: -20%;
  left: -20%;
}

/* Effetto pulsazione elegante per l'icona */
@keyframes gentle-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.contact-section .contact-info .info-card:hover .info-icon i {
  animation: gentle-pulse 1.5s infinite ease-in-out;
  text-shadow: 0 0 10px rgba(110, 66, 229, 0.5);
}

.contact-section .contact-info .info-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.contact-section .contact-info .info-content h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: white;
}

.contact-section .contact-info .info-content p {
  color: var(--text-muted);
  line-height: 1.4;
  font-size: 0.85rem;
  text-align: center;
}

/* Layout responsive ottimizzato */
@media (max-width: 992px) {
  .contact-section .contact-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 15px;
  }
  
  .contact-section .contact-info .info-card {
    height: 150px;
  }
}

@media (max-width: 576px) {
  .contact-section .contact-info {
    grid-template-columns: 1fr;
  }
  
}

/* Position map on the right side */
.map-container {
  grid-column: 2 / 3;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: auto;
  min-height: 350px;
  max-height: 400px;
  margin-top: 20px;
  align-self: start;
}

.contact-method-card {
  background: linear-gradient(145deg, var(--card-bg), rgba(18, 19, 30, 0.7));
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  min-height: 350px;
  justify-content: flex-start;
}

.contact-method-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.contact-method-card .method-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(45deg, rgba(110, 66, 229, 0.1), rgba(59, 154, 226, 0.1));
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.contact-method-card .method-icon i {
  font-size: 30px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-method-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.contact-method-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.contact-method-card .method-button {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-top: auto;
  align-self: center;
}

.contact-method-card .method-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(110, 66, 229, 0.3);
}

/* Add underline to text only on hover */
.contact-method-card .method-button:hover span {
  text-decoration: underline;
}

/* Add span around button text in HTML */
.contact-method-card .method-button i {
  font-size: 16px;
}

/* Update specific method buttons to maintain consistency */
.contact-method-card.whatsapp .method-button,
.contact-method-card.phone .method-button,
.contact-card.email .method-button {
  text-decoration: none;
}

.contact-method-card.whatsapp .method-button:hover,
.contact-method-card.phone .method-button:hover,
.contact-method-card.email .method-button:hover {
  text-decoration: none;
}

.contact-method-card.whatsapp .method-icon {
  background: linear-gradient(45deg, rgba(37, 211, 102, 0.1), rgba(37, 211, 102, 0.2));
}

.contact-method-card.whatsapp .method-icon i {
  background: linear-gradient(90deg, #25d366, #128c7e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-method-card.whatsapp .method-button {
  background: linear-gradient(45deg, #25d366, #128c7e);
}

.contact-method-card.phone .method-icon {
  background: linear-gradient(45deg, rgba(59, 154, 226, 0.1), rgba(59, 154, 226, 0.2));
}

.contact-method-card.phone .method-icon i {
  background: linear-gradient(90deg, #3b9ae2, #2a7bbf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-method-card.phone .method-button {
  background: linear-gradient(45deg, #3b9ae2, #2a7bbf);
}

.contact-method-card.email .method-icon {
  background: linear-gradient(45deg, rgba(110, 66, 229, 0.1), rgba(110, 66, 229, 0.2));
}

.contact-method-card.email .method-icon i {
  background: linear-gradient(90deg, var(--primary-color), #8a65f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-method-card.email .method-button {
  background: linear-gradient(45deg, var(--primary-color), #8a65f0);
}

/* Responsive design for contact methods */
@media (max-width: 992px) {
  .contact-methods {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .contact-methods {
    grid-template-columns: 1fr;
  }
  
  .contact-method-card {
    padding: 25px;
  }
  
  .contact-method-card .method-icon {
    width: 60px;
    height: 60px;
  }
}

/* Cooler Social Links */
.contact-section .contact-info .social-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: none; /* Rimuove bordo originale */
  position: relative;
  width: 100%;
}

/* Crea linea perfettamente centrata */
.contact-section .contact-info .social-links::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%); /* Centra perfettamente */
  width: 90%; /* Aumentata dall'80% al 95% */
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.contact-section .contact-info .social-links .social-link {
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  z-index: 1;
}

.contact-section .contact-info .social-links .social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

/* Effetto di brillantezza aggiunto */
.contact-section .contact-info .social-links .social-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  top: 0;
  left: 0;
  opacity: 0;
  transition: all 0.5s ease;
  transform: scale(0.5);
  filter: blur(10px);
  z-index: -1;
}

.contact-section .contact-info .social-links .social-link:hover {
  transform: translateY(-7px) scale(1.05);
  box-shadow: 
    0 12px 25px rgba(110, 66, 229, 0.25),
    0 0 12px rgba(110, 66, 229, 0.1),
    0 0 20px rgba(110, 66, 229, 0.05);
}

.contact-section .contact-info .social-links .social-link:hover::before {
  opacity: 1;
}

/* Attivazione dell'effetto di brillantezza al passaggio del mouse */
.contact-section .contact-info .social-links .social-link:hover::after {
  opacity: 0.25;
  transform: scale(1.5);
}

.contact-section .contact-info .social-links .social-link i {
  font-size: 20px;
  color: var(--text-muted);
  transition: all 0.4s ease;
  z-index: 2;
  position: relative;
}

/* Aggiunta di un leggero effetto di pulsazione */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.contact-section .contact-info .social-links .social-link:hover i {
  color: white;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: pulse 1.5s infinite;
}

/* Enhanced Map Container */
.map-container {
  grid-column: 1 / -1;
  height: 320px;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
  transform: perspective(1000px) rotateX(3deg);
  transition: all 0.5s ease;
}

.map-container:hover {
  transform: perspective(1000px) rotateX(0deg);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(1) invert(0.9) contrast(1.2);
  transition: all 0.5s ease;
}

.map-container:hover iframe {
  filter: grayscale(0.5) invert(0.9) contrast(1.2);
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, 
    rgba(110, 66, 229, 0.15), 
    rgba(59, 154, 226, 0.1),
    rgba(18, 19, 30, 0.2)
  );
  pointer-events: none;
  border-radius: var(--border-radius);
}

.map-container::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 5%;
  width: 90%;
  height: 20px;
  background: var(--primary-color);
  filter: blur(20px);
  opacity: 0.3;
  border-radius: 50%;
  z-index: -1;
  transition: all 0.5s ease;
}

.map-container:hover::after {
  opacity: 0.5;
  filter: blur(15px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .contact-section .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-section .contact-info {
    grid-column: 1 / -1;
  }
  
  .map-container {
    grid-column: 1 / -1;
    margin-top: 15px;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .contact-section .contact-info {
    grid-column: 1 / -1;
  }
  
  .map-container {
    height: 250px;
  }
}

/* Footer avanzato con animazioni */
.site-footer {
  padding: 60px 5% 30px;
  background-color: var(--darker-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

/* Effetto nebuloso nel background */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(110, 66, 229, 0.05), transparent 60%),
              radial-gradient(circle at bottom left, rgba(59, 154, 226, 0.05), transparent 60%);
  pointer-events: none;
}

/* Tech Stack Showcase */
.tech-stack-showcase {
  margin-bottom: 40px;
}

.tech-stack-title {
  text-align: center;
  margin-bottom: 25px;
}

.tech-stack-title h3 {
  font-size: 1.8rem;
  margin: 0;
}

/* Carosello dei loghi tecnologici */
.tech-stack-carousel {
  overflow: visible;
  position: relative;
  padding: 15px 0 10px;
  margin: 0 -5%;
  width: 110%;
}

.tech-logos {
  display: flex;
  animation: infiniteScroll 30s linear infinite;
  width: max-content;
}

/* Raddoppia i loghi nel DOM per un loop continuo */
.tech-logos::after {
  content: "";
  display: block;
  width: 20px; /* Spazio tra le due serie di loghi */
}

/* Nuova animazione per loop infinito */
@keyframes infiniteScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 10px)); } /* Scorre esattamente metà dei loghi + lo spazio */
}

/* Aumenta la durata dell'animazione per renderla più fluida */
.tech-logo {
  width: 70px;
  height: 70px;
  margin: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  color: var(--text-muted);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
  animation: float 3s ease-in-out infinite;
}

/* Effetto glow sul hover */
.tech-logo::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(110, 66, 229, 0.4), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: blur(10px);
}

/* Effetto hover avanzato */
.tech-logo:hover {
  color: white;
  transform: scale(1.4) rotate(360deg);
  text-shadow: 0 0 20px rgba(110, 66, 229, 0.8);
}

.tech-logo:hover::before {
  opacity: 1;
  transform: scale(1.5);
}

/* Tooltip posizionato ancora più in alto */
.tech-logo::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -16px; /* Ridotto da -22px per posizionarlo più in alto */
  left: 50%;
  transform: translateX(-50%) scale(0);
  padding: 3px 7px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 10px;
  font-size: 8px;
  font-weight: 400;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.tech-logo:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  bottom: -12px; /* Ridotto da -18px per mostrare il tooltip ancora più vicino all'icona */
}

/* Background scintillante per l'icona hover */
@keyframes sparkle {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.tech-logo:hover i {
  background: linear-gradient(90deg, #f5576c, #f093fb, #4facfe, #00f2fe, #6e42e5);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sparkle 3s ease infinite;
  font-weight: bold;
}

/* Divisore */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 30px 0;
}

/* Contenuto del footer */
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}


/* Parte inferiore del footer */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
}

.footer-copyright p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-copyright a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copyright a:hover {
  color: var(--primary-color);
}

.made-with {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.made-with i {
  color: #ff416c;
}

/* Animazione cuore battente */
.beating {
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.3); }
  60% { transform: scale(1); }
  100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
  .tech-stack-title h3 {
    font-size: 1.5rem;
  }
  
  .footer-info {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* Style for the step images */
.step-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Specific sizing for hero section image */
.hero-section .step-image {
  max-width: 500px;
  margin-bottom: 30px;
}

/* Specific sizing for section header images */
.section-header .step-image {
  max-width: 600px;
  margin: 30px auto;
  display: block;
}

/* Media queries for step images on smaller screens */
@media (max-width: 768px) {
  .step-image {
    max-width: 90%;
  }
  
  .hero-section .step-image {
    max-width: 90%;
  }
  
  .section-header .step-image {
    max-width: 90%;
  }
}

.contact-section .contact-container .contact-form-container .contact-form .form-group textarea {
  resize: none;
  height: 120px;
}

/* Media queries for the values grid */
@media (max-width: 992px) {
  .about-section .values-container .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .about-section .values-container .values-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 0 auto;
  }
}

/* Stili forzati per il portfolio grid */
#portfolio-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .hero-section .hero-content h1 {
    font-size: 2.8rem; /* Riduci la dimensione del testo per mobile */
    line-height: 1.2;
  }
  
  .hero-section .hero-content h1 .gradient-text {
    font-size: 2.8rem; /* Leggermente più grande del testo normale */
    line-height: 1.2;
  }
}

/* Stile per foto profilo circolari */
.team-member .member-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 20px auto 20px;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  background: transparent;
  padding: 0;
}

.team-member .member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Mantiene le proporzioni riempiendo il cerchio */
  border-radius: 50%;
  transition: transform 0.5s ease;
}

.team-member:hover .member-photo img {
  transform: scale(1.1); /* Leggero zoom sull'hover */
}

/* Migliora anche l'effetto dell'icona LinkedIn */
.team-member .member-header .linkedin-icon {
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.team-member .member-header .linkedin-icon:hover {
  color: #0077B5; /* Colore ufficiale di LinkedIn */
  transform: translateY(-3px);
}

/* Team navigation arrows - Fixed viewport positioning with preserved styling */
.team-nav-arrows {
  position: fixed; /* Change to fixed for viewport positioning */
  width: 100%;
  height: 100vh; /* Full viewport height */
  top: 0; /* Position at the top of the viewport */
  left: 0;
  z-index: 50; /* Higher z-index to appear above content */
  pointer-events: none;
  display: none; /* Hidden by default, shown via JS when team section is in view */
}

/* Keep all the existing arrow styling unchanged */
.team-arrow {
  position: absolute;
  top: 50%; /* Center in the fixed container */
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: rgba(10, 11, 20, 0.85);
  border: 1px solid rgba(110, 66, 229, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  pointer-events: auto;
  opacity: 0.9;
  animation: pulse-arrow 2s infinite ease-in-out;
}

/* Keep all the hover styles */
.team-arrow:hover {
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(110, 66, 229, 0.5);
  animation: none;
}

/* Keep icon styling */
.team-arrow i {
  color: white;
  font-size: 20px;
}

/* Keep positioning */
.team-arrow.left {
  left: 20px;
}

.team-arrow.right {
  right: 20px;
}

/* Don't hide arrows by default */
.team-nav-arrows {
  opacity: 1;
}

/* Add pulsing animation to make arrows more noticeable */
@keyframes pulse-arrow {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.05); }
  100% { transform: translateY(-50%) scale(1); }
}

.team-arrow {
  animation: pulse-arrow 2s infinite ease-in-out;
}

.team-arrow:hover {
  animation: none;
}

/* Media query for smaller screens - with much more space */
@media (max-width: 768px) {
  .team-nav-arrows {
    margin-top: -210px;
    margin-bottom: 310px; /* Increased from 290px */
  }
  
  .team-arrow {
    width: 40px;
    height: 40px;
  }
  
  .team-arrow.left {
    left: 15px;
  }
  
  .team-arrow.right {
    right: 15px;
  }
}

@media (max-width: 576px) {
  .team-nav-arrows {
    margin-top: -190px;
    margin-bottom: 290px; /* Increased from 270px */
  }
  
  .team-arrow {
    width: 38px;
    height: 38px;
  }
  
  .team-arrow.left {
    left: 10px;
  }
  
  .team-arrow.right {
    right: 10px;
  }
}

/* For very large screens, move arrows even closer to center */
@media (min-width: 1400px) {
  .team-arrow.left {
    left: 5%;
  }
  
  .team-arrow.right {
    right: 5%;
  }
}

/* Enhanced What We Do Section - Advanced styling */
.what-we-do-section {
  padding: 120px 5%;
  background-color: var(--darker-bg);
  position: relative;
  overflow: hidden;
  perspective: 800px;
}

/* Subtle background pattern */
.what-we-do-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(110, 66, 229, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(59, 154, 226, 0.08) 0%, transparent 55%);
  pointer-events: none;
  opacity: 0.7;
  animation: pulse-bg 20s infinite alternate ease-in-out;
}

/* Refined particles effect - more subtle */
.what-we-do-section .particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.what-we-do-section .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary-color);
  opacity: 0.15;
  animation: float-particle 20s infinite linear;
}

/* Professional section heading */
.what-we-do-section .section-header h2 {
  position: relative;
  z-index: 2;
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.what-we-do-section .section-header h2::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 3px;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
}

.what-we-do-section .section-header {
  position: relative;
  margin-bottom: 60px;
}

.what-we-do-section .section-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 25px auto 0;
  line-height: 1.6;
  font-weight: 400;
}

/* Professional container styling */
.what-we-do-section .container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Refined service cards */
.services-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1000px;
  margin: 40px auto 0;
  transform-style: preserve-3d;
}

.service-card {
  display: flex;
  background: linear-gradient(135deg, 
    rgba(18, 19, 30, 0.8), 
    rgba(12, 13, 22, 0.95)
  );
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 12px 30px rgba(0, 0, 0, 0.15),
    0 5px 10px rgba(0, 0, 0, 0.08);
  transform: translateZ(0);
}

/* Subtle glass effect */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.03), 
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 12px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Light effect - more subtle */
.service-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(90deg, 
    transparent, 
    rgba(110, 66, 229, 0.2),
    rgba(59, 154, 226, 0.2),
    transparent
  );
  border-radius: 12px;
  z-index: -1;
  transform: translateX(-100%);
  transition: transform 1s ease;
}

/* Professional hover effects */
.service-card:hover {
  transform: translateY(-8px) translateZ(5px);
  box-shadow: 
    0 18px 35px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.1),
    0 0 10px rgba(110, 66, 229, 0.1);
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:hover::before {
  transform: translateX(100%);
}

/* Professional icon container */
.service-icon {
  flex: 0 0 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(110, 66, 229, 0.12), 
    rgba(59, 154, 226, 0.06)
  );
  z-index: 2;
}

/* Refined icon background */
.service-icon .icon-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: radial-gradient(
    circle at center, 
    rgba(110, 66, 229, 0.2) 0%, 
    transparent 70%
  ); */
  opacity: 0;
  transition: all 0.6s ease;
  transform: scale(0.5);
}

/* Subtle glow effect */
.service-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  /* background: radial-gradient(
    circle at center, 
    rgba(110, 66, 229, 0.25) 0%, 
    transparent 60%
  ); */
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.8);
  filter: blur(8px);
}

.service-card:hover .service-icon::after {
  opacity: 0.8;
  transform: scale(1.1);
  animation: subtle-pulse-glow 3s infinite alternate ease-in-out;
}

.service-card:hover .service-icon .icon-background {
  opacity: 0.9;
  transform: scale(1.6);
}

/* Professional icon styling */
.service-icon i {
  font-size: 36px;
  background: linear-gradient(135deg, #ffffff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 3;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.service-card:hover .service-icon i {
  transform: scale(1.2) rotate(5deg);
  background: linear-gradient(135deg, 
    var(--primary-color), 
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(110, 66, 229, 0.3));
}

/* Professional content area */
.service-content {
  flex: 1;
  padding: 30px 35px;
  position: relative;
  z-index: 2;
  background: linear-gradient(
    to right,
    rgba(18, 19, 30, 0), 
    rgba(12, 13, 22, 0.3)
  );
}

/* Professional heading */
.service-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  background: linear-gradient(to right, white, rgba(255, 255, 255, 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.4s ease;
  position: relative;
  display: inline-block;
}

/* Subtle underline effect */
.service-content h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  border-radius: 2px;
  opacity: 0.8;
}

.service-card:hover .service-content h3::after {
  width: 100%;
}

.service-card:hover .service-content h3 {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateX(3px);
}

/* Professional paragraph styling */
.service-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.service-card:hover .service-content p {
  color: rgba(255, 255, 255, 0.85);
}

/* Refined indicator dots */
.service-indicator {
  position: absolute;
  bottom: 22px;
  right: 30px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.service-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
}

/* Subtle glow effect */
.service-indicator span::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary-color);
  opacity: 0;
  filter: blur(4px);
  transform: scale(1.3);
  transition: opacity 0.4s ease;
}

.service-card:hover .service-indicator span {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 0 6px rgba(110, 66, 229, 0.3);
}

.service-card:hover .service-indicator span::after {
  opacity: 0.4;
}

.service-card:hover .service-indicator span:nth-child(1) {
  transform: translateY(-4px);
  transition-delay: 0s;
}

.service-card:hover .service-indicator span:nth-child(2) {
  transform: translateY(-4px);
  transition-delay: 0.1s;
}

.service-card:hover .service-indicator span:nth-child(3) {
  transform: translateY(-4px);
  transition-delay: 0.2s;
}

/* Refined animations */
@keyframes pulse-bg {
  0% { opacity: 0.6; }
  100% { opacity: 0.8; }
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

@keyframes subtle-pulse-glow {
  0% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 0.4; }
}

/* Mobile hover simulation with refined professional effects */
@media (max-width: 768px) {
  .what-we-do-section {
    padding: 90px 5%;
  }
  
  .service-card {
    flex-direction: column;
  }
  
  .service-icon {
    flex: 0 0 90px;
    width: 100%;
    height: 90px;
  }
  
  .service-content {
    padding: 25px 22px;
  }
  
  .service-content h3 {
    font-size: 1.35rem;
  }
  
  .service-indicator {
    bottom: 15px;
    right: 20px;
  }
  
  /* Refined mobile is-visible effects */
  .service-card.is-visible {
    transform: translateY(-8px) translateZ(5px);
    box-shadow: 
      0 18px 35px rgba(0, 0, 0, 0.2),
      0 8px 20px rgba(0, 0, 0, 0.1),
      0 0 10px rgba(110, 66, 229, 0.1);
  }
  
  .service-card.is-visible::after {
    opacity: 1;
  }
  
  .service-card.is-visible::before {
    transform: translateX(100%);
  }
  
  .service-card.is-visible .service-icon .icon-background {
    opacity: 0.9;
    transform: scale(1.6);
  }
  
  .service-card.is-visible .service-icon::after {
    opacity: 0.8;
    transform: scale(1.1);
    animation: subtle-pulse-glow 3s infinite alternate ease-in-out;
  }
  
  .service-card.is-visible .service-icon i {
    transform: scale(1.2) rotate(5deg);
    background: linear-gradient(135deg, 
      var(--primary-color), 
      var(--secondary-color)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(110, 66, 229, 0.3));
  }
  
  .service-card.is-visible .service-content h3 {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(3px);
  }
  
  .service-card.is-visible .service-content h3::after {
    width: 100%;
  }
  
  .service-card.is-visible .service-content p {
    color: rgba(255, 255, 255, 0.85);
  }
  
  .service-card.is-visible .service-indicator span {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 6px rgba(110, 66, 229, 0.3);
  }
  
  .service-card.is-visible .service-indicator span::after {
    opacity: 0.4;
  }
  
  .service-card.is-visible .service-indicator span:nth-child(1) {
    transform: translateY(-4px);
    transition-delay: 0s;
  }
  
  .service-card.is-visible .service-indicator span:nth-child(2) {
    transform: translateY(-4px);
    transition-delay: 0.1s;
  }
  
  .service-card.is-visible .service-indicator span:nth-child(3) {
    transform: translateY(-4px);
    transition-delay: 0.2s;
  }
}

@media (max-width: 576px) {
  .what-we-do-section {
    padding: 70px 5%;
  }
  
  .what-we-do-section .section-header h2 {
    font-size: 2.2rem;
  }
  
  .service-content h3 {
    font-size: 1.25rem;
  }
  
  .service-content p {
    font-size: 0.9rem;
  }
}

/* Per mobile: attiva l'effetto hover di base quando la card diventa visibile durante lo scroll */
.portfolio-item.is-visible .more-details-btn {
  box-shadow: 0 10px 20px rgba(110, 66, 229, 0.4);
  color: white;
}

.portfolio-item.is-visible .more-details-btn::before {
  left: 0;
}

/* Per mobile: effetto intensificato quando l'utente tocca il pulsante */
.portfolio-item.is-visible .more-details-btn:active {
  box-shadow: 0 10px 25px rgba(110, 66, 229, 0.6); 
  color: white;
  transform: translateY(-3px);
  filter: brightness(1.2);
}

.language-selector {
  display: flex;
  align-items: center;
  margin-left: 20px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 14px;
  padding: 5px 8px;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 4px;
}

.lang-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
  font-weight: bold;
  color: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .language-selector {
    margin: 10px 0 0;
    justify-content: center;
  }
}

/* Add these styles for more compact team member profiles */
.compact-list {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
}

.compact-list li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.education-awards {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.education-awards .column {
  flex: 1;
}

.education-awards p {
  margin-bottom: 0.25rem;
}

/* This will truncate overly long text with ellipsis */
.member-info li {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}







