/* --- RESET E VARIABILI --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0c1116; 
    --text-color: #e0e0e0;
    --accent-color: #d4af37;
    --accent-hover: #f2d06b;
    --card-bg: rgba(255, 255, 255, 0.03);
    --font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- SFONDO PARTICELLE --- */
#techCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; 
}

/* --- HEADER & NAV --- */
header {
    background: rgba(12, 17, 22, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.header-logo img {
    height: 45px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li { margin-left: 25px; }

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

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

.lang-switcher {
    font-size: 0.8rem;
    color: #666;
    margin-left: 20px;
}

.lang-switcher button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-weight: 400;
    transition: 0.3s;
}

.lang-switcher button.active {
    color: var(--accent-color);
    font-weight: 700;
}

/* --- HERO SECTION --- */
#hero {
    position: relative;
    padding: 180px 0 30px;
    z-index: 10;
}

.hero-content { max-width: 600px; }

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(90deg, #d4af37, #f2d06b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 35px;
}

/* --- LAVA LAMP CANVAS --- */
.lava-lamp-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.btn-cta {
    display: inline-block;
    padding: 16px 32px;
    background: var(--accent-color);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: 0.3s;
    border: none;
}

.btn-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* --- DIVIDER --- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    z-index: 10;
    position: relative;
}

.section-divider .line {
    height: 1px;
    width: 100px;
    background: var(--accent-color);
    opacity: 0.5;
}

.section-divider .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.divider-title {
    font-size: 1rem;
    letter-spacing: 5px;
    font-weight: 700;
    color: var(--accent-color);
}

/* --- CARDS --- */
#servizi {
    position: relative;
    padding-bottom: 30px;
    z-index: 10;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 40px;
    border-radius: 15px;
    transition: 0.4s;
}

.card:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-10px);
}

.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Icona Automation */
.robot-icon {
    background-image: url('./icon_rob.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 32px;
    height: 32px;
}

/* Icona Web */
.web-icon {
    background-image: url('./icon_web.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 32px;
    height: 32px;
}

/* Icona Software */
.software-icon {
    background-image: url('./icon_sw.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 32px;
    height: 32px;
}

/* Icona Consulenza */
.consultation-icon {
    background-image: url('./icon_cons.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 32px;
    height: 32px;
}

/* Icona HMI */
.hmi-icon {
    background-image: url('./icon_hmi.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 32px;
    height: 32px;
}

.card h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.card p { font-size: 0.9rem; color: #888; }

/* --- MODAL / POPUP --- */
.modal, .popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.modal-content, .popup-content {
    background: #161b22;
    border: 1px solid var(--accent-color);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    margin: 80px auto;
    border-radius: 15px;
    position: relative;
}

.gold-text { color: var(--accent-color); }

.contact-section {
    padding-top: 20px;
}

.close-modal, .close-btn {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 30px;
    color: var(--accent-color);
    cursor: pointer;
}

.hours-list { list-style: none; margin: 20px 0; }
.hours-list li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #30363d; }
.closed { color: #ff4d4d; }

.chat-buttons { display: flex; gap: 10px; margin-top: 20px; }
.chat-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: 700;
}
.whatsapp { background: #25D366; }
.telegram { background: #0088cc; }
.mail     { background: #d4af37;}

/* --- FOOTER --- */
footer {
    padding: 60px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 10;
}

.footer-info {
    width: 100%;
    display: flex;
    justify-content: space-around;
    color: #555;
    font-size: 0.8rem;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .container { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 2rem; }
    .cards-container { grid-template-columns: 1fr; }
    .lava-lamp-container { width: 300px; height: 300px; margin-top: 30px; }
    .lava-lamp-container {display: none;}
    nav ul { margin-top: 20px; flex-wrap: wrap; justify-content: center; }
    nav ul li { margin: 5px 10px; }
    .footer-info {flex-direction: column;}
}



.modal, .popup-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-label {
    font-size: 12px;
    font-weight: 800;
    transition: all 0.3s ease;
}

.privacy-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 12px;
    color: #888;
}

#privacyCheck {
    accent-color: var(--accent-color);
    cursor: pointer;
}




.language-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
}

.lang-label {
  font-size: 14px;
  color: #888;
  transition: color 0.3s ease;
  min-width: 30px;
}

/* Stile base dello switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333;
  transition: .4s;
  border-radius: 24px;
  border: 1px solid #444;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 3px;
  background-color: #FFD700;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* LOGICA DI ILLUMINAZIONE DELLE SCRITTE */

.lang-left {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.language-switch:has(input:checked) .lang-left {
  color: #888;
  text-shadow: none;
}

.language-switch:has(input:checked) .lang-right {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}