/* Stile futuristico nero e giallo per il sito PCTO */

/* Importazione font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Exo+2:wght@300;400;600;700&family=Rajdhani:wght@300;400;500;700&display=swap');

/* Reset CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variabili colori */
:root {
  --primary: #ffcc00;
  --primary-dark: #e6b800;
  --secondary: #111111;
  --accent: #ff9900;
  --bg-dark: #000000;
  --bg-dark-2: #0a0a0a;
  --bg-dark-3: #121212;
  --text-light: #ffffff;
  --text-gray: #aaaaaa;
  --neon-glow: 0 0 10px rgba(255, 204, 0, 0.7), 0 0 20px rgba(255, 204, 0, 0.5), 0 0 30px rgba(255, 204, 0, 0.3);
  --shadow: rgba(0, 0, 0, 0.5);
  --border-glow: 0 0 5px rgba(255, 204, 0, 0.7);
}

/* Stili generali */
body {
  font-family: 'Exo 2', sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(40, 40, 40, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(40, 40, 40, 0.2) 0%, transparent 50%);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

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

a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
  box-shadow: var(--neon-glow);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary);
  color: var(--secondary);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--neon-glow);
}

.btn:hover::before {
  left: 100%;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--secondary);
}

.btn-accent {
  background-color: var(--accent);
}

.btn-accent:hover {
  background-color: var(--primary);
}

/* Header e navigazione */
header {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: var(--text-light);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--primary);
  box-shadow: 0 2px 10px var(--shadow);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--neon-glow);
  letter-spacing: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu a {
  color: var(--text-light);
  font-weight: 600;
  position: relative;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 1px;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  bottom: -5px;
  left: 0;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
  box-shadow: var(--neon-glow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary) 100%);
  color: var(--text-light);
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(45deg, var(--primary) 0%, transparent 10%),
    linear-gradient(135deg, transparent 90%, var(--primary) 100%);
  opacity: 0.1;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 204, 0, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 204, 0, 0.1) 0%, transparent 20%);
  z-index: 2;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 3;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-shadow: var(--neon-glow);
  position: relative;
}

.hero h1::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 4px;
  background-color: var(--primary);
  bottom: -10px;
  left: 0;
  box-shadow: var(--neon-glow);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-light);
  max-width: 600px;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 100px auto;
  padding: 20px;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: var(--primary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 10px;
  box-shadow: var(--neon-glow);
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background-color: var(--bg-dark);
  border: 4px solid var(--primary);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: var(--neon-glow);
}

.left {
  left: 0;
}

.right {
  left: 50%;
}

.left::after {
  right: -17px;
}

.right::after {
  left: -16px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: var(--bg-dark-2);
  position: relative;
  border-radius: 0;
  box-shadow: 0 5px 15px var(--shadow);
  border: 1px solid var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.timeline-content h2 {
  color: var(--primary);
  text-shadow: var(--neon-glow);
}

.timeline-content .date {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--primary);
  color: var(--secondary);
  border-radius: 0;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-weight: bold;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%);
}

/* Sezioni anni */
.year-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.year-section:nth-child(odd) {
  background-color: var(--bg-dark-2);
}

.year-section:nth-child(even) {
  background-color: var(--bg-dark);
}

.year-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(45deg, var(--primary) 0%, transparent 10%),
    linear-gradient(135deg, transparent 90%, var(--primary) 100%);
  opacity: 0.05;
  z-index: 0;
}

.year-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.year-header h2 {
  font-size: 2.5rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
  text-shadow: var(--neon-glow);
}

.year-header h2::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  background-color: var(--primary);
  bottom: -10px;
  left: 25%;
  border-radius: 2px;
  box-shadow: var(--neon-glow);
}

.year-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.year-text {
  flex: 1;
  padding: 0 20px;
  min-width: 300px;
}

.year-image {
  flex: 1;
  padding: 0 20px;
  min-width: 300px;
  text-align: center;
}

.year-image img {
  max-width: 100%;
  border-radius: 0;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease;
  border: 2px solid var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.year-image img:hover {
  transform: scale(1.05);
  box-shadow: var(--neon-glow);
}

.image-placeholder {
  width: 100%;
  height: 300px;
  background-color: var(--bg-dark-3);
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
  font-size: 1.2rem;
  box-shadow: 0 5px 15px var(--shadow);
  border: 1px solid var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

/* Card design */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 50px 0;
  position: relative;
  z-index: 1;
}

.card {
  width: calc(33.333% - 20px);
  margin-bottom: 30px;
  background-color: var(--bg-dark-2);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--neon-glow);
}

.card-image {
  height: 200px;
  background-color: var(--bg-dark-3);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--primary);
  box-shadow: var(--neon-glow);
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  margin-bottom: 10px;
  color: var(--primary);
  text-shadow: var(--neon-glow);
}

/* Competenze */
.skills {
  padding: 80px 0;
  background-color: var(--bg-dark-2);
  position: relative;
  overflow: hidden;
}

.skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 204, 0, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 204, 0, 0.1) 0%, transparent 20%);
  z-index: 0;
}

.skills-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  z-index: 1;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.skill-item {
  width: 200px;
  margin: 20px;
  text-align: center;
}

.skill-icon {
  width: 80px;
  height: 80px;
  line-height: 80px;
  margin: 0 auto 20px;
  background-color: var(--bg-dark-3);
  color: var(--primary);
  border-radius: 0;
  font-size: 2rem;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  box-shadow: var(--neon-glow);
  clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

.skill-item:hover .skill-icon {
  transform: rotateY(180deg);
  background-color: var(--primary);
  color: var(--secondary);
}

/* Counter */
.counter-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary) 100%);
  color: var(--text-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.counter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(45deg, var(--primary) 0%, transparent 10%),
    linear-gradient(135deg, transparent 90%, var(--primary) 100%);
  opacity: 0.1;
  z-index: 0;
}

.counter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  position: relative;
  z-index: 1;
}

.counter-item {
  margin: 20px;
}

.counter {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
  text-shadow: var(--neon-glow);
  font-family: 'Orbitron', sans-serif;
}

/* Galleria */
.gallery {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-gap: 20px;
}

.gallery-item {
  height: 250px;
  background-color: var(--bg-dark-3);
  border-radius: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--primary);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: var(--primary);
  padding: 10px;
  transform: translateY(100%);
  transition: all 0.3s ease;
  border-top: 1px solid var(--primary);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Footer */
footer {
  background-color: var(--bg-dark-3);
  color: var(--text-light);
  padding: 50px 0 20px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--primary);
  box-shadow: var(--neon-glow);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.footer-section {
  width: calc(33.333% - 30px);
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--primary);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  text-shadow: var(--neon-glow);
}

.footer-section h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
  bottom: 0;
  left: 0;
  box-shadow: var(--neon-glow);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 204, 0, 0.2);
  position: relative;
  z-index: 1;
}

/* Diagramma interattivo */
.diagram {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.diagram svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.5));
}

.diagram-component {
  cursor: pointer;
  transition: all 0.3s ease;
  stroke: var(--primary);
  stroke-width: 2;
}

.diagram-component:hover {
  fill: var(--primary);
}

.diagram-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.9);
  color: var(--primary);
  padding: 10px;
  border-radius: 0;
  font-size: 0.9rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border: 1px solid var(--primary);
  box-shadow: var(--neon-glow);
}

.diagram-tooltip.visible {
  opacity: 1;
}

/* Responsive design */
@media screen and (max-width: 992px) {
  .card {
    width: calc(50% - 15px);
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item::after {
    left: 15px;
  }
  
  .left::after, .right::after {
    left: 15px;
  }
  
  .right {
    left: 0;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    background-color: rgba(0, 0, 0, 0.9);
    width: 100%;
    flex-direction: column;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px var(--shadow);
    border-bottom: 1px solid var(--primary);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    margin: 0;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 204, 0, 0.1);
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .year-content {
    flex-direction: column;
  }
  
  .year-text, .year-image {
    width: 100%;
    margin-bottom: 30px;
  }
  
  .footer-section {
    width: 100%;
  }
}

@media screen and (max-width: 576px) {
  .card {
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .timeline-content {
    padding: 15px;
  }
  
  .timeline-item {
    padding-left: 50px;
  }
}

/* Animazioni */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.glow-effect {
  animation: glowPulse 2s infinite;
}

/* Elementi futuristici aggiuntivi */
.tech-border {
  position: relative;
}

.tech-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--primary);
  clip-path: polygon(0 0, 20px 0, 20px 20px, calc(100% - 20px) 20px, calc(100% - 20px) calc(100% - 20px), 20px calc(100% - 20px), 20px 100%, 0 100%);
  pointer-events: none;
}

.tech-border::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--primary);
  clip-path: polygon(100% 0, 100% 100%, calc(100% - 20px) 100%, calc(100% - 20px) calc(100% - 20px), 20px calc(100% - 20px), 20px 20px, calc(100% - 20px) 20px, calc(100% - 20px) 0);
  pointer-events: none;
}

.tech-angle {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.tech-corner {
  position: relative;
}

.tech-corner::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 0;
  left: 0;
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
}

.tech-corner::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}

.neon-text {
  color: var(--primary);
  text-shadow: var(--neon-glow);
}

.neon-border {
  border: 1px solid var(--primary);
  box-shadow: var(--neon-glow);
}

.circuit-bg {
  position: relative;
}

.circuit-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M10,10 L30,10 L30,30 L50,30 L50,50 L70,50 L70,70 L90,70" fill="none" stroke="%23ffcc00" stroke-width="0.5" opacity="0.2"/><path d="M90,10 L70,10 L70,30 L50,30 L50,50 L30,50 L30,70 L10,70" fill="none" stroke="%23ffcc00" stroke-width="0.5" opacity="0.2"/></svg>');
  opacity: 0.05;
  z-index: 0;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark-3);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
