@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800;900&family=Open+Sans:wght@400;600&display=swap');

:root {
  --primary-color: #0c4a6b;     /* Deep Blue from logo */
  --secondary-color: #02c0a3;   /* Teal/Cyan Accent */
  --dark-bg: #061e2d;
  --light-bg: #ffffff;
  --gray-bg: #f4f7f6;
  --text-dark: #333333;
  --text-light: #ffffff;
  --text-gray: #6c757d;
  --transition-fast: all 0.3s ease;
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition-fast);
}

/* Header (Sticky & Transparent) */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  padding: 20px 0;
  transition: var(--transition-slow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
  background-color: var(--primary-color);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-bottom: 1px solid transparent;
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-wrapper nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo h2 {
  color: var(--text-light) !important;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  transition: var(--transition-slow);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
}

.logo span {
  color: var(--secondary-color) !important;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.9rem;
  letter-spacing: 1px;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary-color);
  transition: var(--transition-fast);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  background-color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 0; height: 100%;
  background-color: var(--primary-color);
  transition: var(--transition-fast);
  z-index: -1;
}

.btn:hover::before, .btn.is-clicked::before {
  width: 100%;
}

.btn:hover, .btn.is-clicked {
  border-color: var(--primary-color);
  color: var(--text-light);
}

.btn:focus, .btn:active {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
}

.btn::selection {
  background-color: var(--dark-bg);
  color: var(--text-light);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}
.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-secondary::before {
  background-color: var(--primary-color);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(to right, rgba(6, 30, 45, 0.9) 0%, rgba(6, 30, 45, 0.3) 100%), url('../img/IMG_8021.JPG') no-repeat center center/cover;
}

.hero-content {
  max-width: 800px;
  color: var(--text-light);
  animation: fadeUp 1s ease forwards;
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 5.5rem);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  line-height: 1.05;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--text-light);
}
.btn-outline::before {
  background-color: var(--text-light);
}
.btn-outline:hover {
  color: var(--primary-color);
  border-color: var(--text-light);
}

.btn-light {
  background-color: var(--light-bg);
  color: var(--primary-color);
  border-color: var(--light-bg);
}
.btn-light::before {
  background-color: var(--secondary-color);
}
.btn-light:hover {
  color: var(--text-light);
  border-color: var(--secondary-color);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page Hero for Internal Pages */
.page-hero {
  position: relative;
  height: 45vh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to right, rgba(6, 30, 45, 0.95), rgba(6, 30, 45, 0.7)), url('../img/IMG_8021.JPG') no-repeat center center/cover;
  color: var(--text-light);
  margin-bottom: 20px; /* Reduced from 60px to bring text/content up */
}

.page-hero-content {
  animation: fadeUp 0.8s ease forwards;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--secondary-color);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Overlapping Stats (Trust Indicators) */
.trust-indicators {
  background-color: var(--light-bg);
  position: relative;
  margin-top: -80px;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 40px 0;
  border-bottom: 4px solid var(--secondary-color);
}

.trust-flex {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  text-align: center;
}

.trust-item {
  padding: 10px 20px;
}

.trust-item h4 {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.trust-item h4 span {
  color: var(--secondary-color);
}

.trust-item p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Global Sections */
.service-content { padding: 80px 0; }

section {
  padding: 50px 0; /* Reduced to bring everything up */
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  position: relative;
  line-height: 1.1;
}

.section-head {
  display: flex;
  flex-direction: column; align-items: center; text-align: center; justify-content: center;
  
  margin-bottom: 4rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 20px;
}

.section-head p {
  max-width: 700px; margin: 15px auto 0;
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* Modern Image Cards Quanta Built */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.img-card {
  position: relative;
  height: 480px;
  overflow: hidden;
  background-color: var(--dark-bg);
  display: block;
}

.img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
  opacity: 1;
}

.img-card:hover img {
  transform: scale(1.1);
  opacity: 0.4; /* Darkens on hover by making it semi-transparent against the dark-bg */
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 30px; text-align: center;
  background: linear-gradient(to top, rgba(6,30,45,0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column; align-items: center; text-align: center;
  justify-content: flex-end;
  transition: var(--transition-slow);
}

.img-card:hover .card-content {
  background: rgba(6,30,45,0.8);
}

.card-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
  display: block;
}

.card-content h3 {
  color: var(--text-light);
  font-size: 1.8rem;
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.card-content p {
  color: #ccc;
  font-size: 1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: var(--transition-slow);
}

.img-card:hover .card-content p {
  max-height: 200px;
  opacity: 1;
  margin-top: 15px;
}

.img-card:hover h3 {
  color: var(--secondary-color);
}

.img-card .arrow-link {
  position: absolute;
  top: 30px;
  right: 30px;
  color: var(--text-light);
  font-size: 1.8rem;
  opacity: 0;
  transform: translateX(-20px) rotate(-45deg);
  transition: var(--transition-slow);
}

.img-card:hover .arrow-link {
  opacity: 1;
  transform: translateX(0) rotate(0deg);
  color: var(--secondary-color);
}

/* Why Us / Value Prop */
.why-us {
  background-color: var(--gray-bg);
  position: relative;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.why-features {
  display: flex;
  flex-direction: column; align-items: center; text-align: center;
  gap: 30px;
}

.feature-block {
  display: flex;
  gap: 20px;
  background: var(--light-bg);
  padding: 30px;
  border-left: 5px solid var(--secondary-color);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: var(--transition-fast);
}

.feature-block:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 2.8rem;
  color: var(--primary-color);
}

.feature-text h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.feature-text p {
  color: var(--text-gray);
  font-size: 1rem;
}

.why-image-wrapper {
  position: relative;
}
.why-image-wrapper img {
  width: 100%;
  height: 680px; /* Малко по-голяма по височина от първоначалната */
  object-fit: cover;
  object-position: center;
  image-rendering: high-quality; /* Подсказка към браузъра за по-добро скалиране */
  /* Синият фон (box-shadow) е премахнат */
}
.why-image-wrapper::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  background-color: var(--secondary-color);
  z-index: -1;
  display: none; /* Скриваме и малкия зелен квадрат, за да остане само чистата снимка */
}

/* Call to Action Banner */
.cta-banner {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(2, 192, 163, 0.4) 100%);
}

.cta-banner h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.cta-banner p {
  position: relative;
  z-index: 2;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 15px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 15px;
}

.footer-col a, .footer-col p {
  color: #a0aec0;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.footer-col a:hover {
  color: var(--secondary-color);
  padding-left: 8px;
}

.footer-col i {
  color: var(--secondary-color);
  margin-right: 15px;
  width: 20px;
  text-align: center;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
  color: #6c757d;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* Responsive */

/* Mobile Navigation Hamburger */
.hamburger {
  display: none;
  font-size: 2rem;
  color: var(--text-light);
  cursor: pointer;
  z-index: 1100;
  transition: var(--transition-fast);
}

.hamburger:hover {
  color: var(--secondary-color);
}

@media (max-width: 1024px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-image-wrapper img { height: 400px; box-shadow: none; margin-top: 50px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Navigation */
  .hamburger { display: block; }
  
  nav .btn { display: none; } /* Hide the button in nav on mobile to save space, or we can keep it */
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--primary-color);
    flex-direction: column; align-items: center; text-align: center;
    align-items: flex-start;
    padding: 100px 30px 40px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 1050;
    display: flex;
    gap: 1.5rem;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.2rem;
    width: 100%;
    display: inline-block;
  }

  /* Hero & Typography */
  .hero h1 { font-size: clamp(2.2rem, 8vw, 3rem); line-height: 1.2; }
  .hero p { font-size: 1rem; }
  .hero-btns { flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 100%; gap: 15px; }
  .hero-btns .btn { width: 100%; text-align: center; }
  .page-hero { height: auto; padding: 120px 20px 60px; min-height: unset; overflow: hidden; }
  .page-hero h1 { font-size: clamp(1.3rem, 6.5vw, 2.2rem); white-space: normal; word-break: keep-all; width: 100%; text-align: center; margin-left: auto; margin-right: auto; line-height: 1.3; }
  .page-hero p { font-size: 0.8rem; letter-spacing: 1px; }

  /* Sections & Layout */
  section { padding: 40px 0; }
  .service-content { padding: 40px 0 !important; }
  
  /* Fix long headings in mobile services */
  .service-content h2, .privacy-content h2 {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    text-align: left !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
  }
  .service-content h3, .privacy-content h3 {
    font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
    text-align: left !important;
  }
  .service-content p, .privacy-content p {
    font-size: 1rem !important;
    text-align: left !important;
  }
  .service-content ul {
    font-size: 1rem !important;
    justify-content: center !important;
  }

  .section-title { font-size: 2rem; margin-bottom: 1rem; line-height: 1.2; }
  .section-head { flex-direction: column; align-items: center; text-align: center; align-items: center; gap: 15px; margin-bottom: 2rem; }
  .section-head p { max-width: 100%; font-size: 1rem; }
  
  /* Trust Indicators */
  .trust-indicators { margin-top: 0; box-shadow: none; border-bottom: none; }
  .trust-flex { flex-direction: column; align-items: center; text-align: center; gap: 30px; }
  .trust-item h4 { font-size: 3rem; }

  /* Forms & Grids */
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { padding-top: 20px; font-size: 0.75rem; text-align: center; }
  
  /* Modals/Form resets */
  input, textarea, button { font-size: 16px !important; } /* prevents iOS zoom */
  form > div { flex-direction: column; align-items: center; text-align: center; gap: 15px !important; }
}

@media (max-width: 480px) {
  /* Small Mobile Adjustments */
  .logo img { height: 60px !important; }
  .hero h1 { font-size: 2rem; }
  .img-card { height: auto !important; min-height: 380px; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* Контейнер за SVG, балансиращ дясната част */
.circuit-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.circuit-board {
    width: 100%;
    height: auto;
    display: block;
}

.circuit-base-paths path {
    fill: none;
    stroke: rgba(51, 51, 51, 0.2);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.circuit-animated-paths path {
    fill: none;
    stroke: #40E0D0;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pulse {
    stroke-dasharray: 50 1000;
    animation: flowPulse linear infinite;
}

.pulse-1 { animation-duration: 3s; animation-delay: 0s; }
.pulse-2 { animation-duration: 4s; animation-delay: 1.5s; }
.pulse-3 { animation-duration: 3.5s; animation-delay: 0.5s; }

@keyframes flowPulse {
    from { stroke-dashoffset: 1050; }
    to { stroke-dashoffset: 0; }
}

.node {
    fill: #111;
    stroke: rgba(51, 51, 51, 0.5);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.interactive-node {
    fill: #222;
    stroke: #40E0D0;
    cursor: pointer;
}

.interactive-node:hover {
    fill: #40E0D0;
    filter: drop-shadow(0 0 8px #40E0D0);
    transform: scale(1.5);
    transform-origin: center;
}

.circuit-tooltip {
    position: absolute;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid #40E0D0;
    color: #40E0D0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(64, 224, 208, 0.5));
    white-space: nowrap;
    z-index: 10;
}

.circuit-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -20px);
}

/* INDUSTRIAL AUTOMATION SECTION (DARK MODE) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

.industrial-automation {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 800px;
    background-color: #000000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    color: #00E5FF;
}

/* Background Parallax Grid */
.tech-grid-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.1, 0.7, 0.1, 1);
}

/* Base structural heartbeat pulse */
@keyframes tech-pulse {
    0%   { filter: brightness(0.8); }
    50%  { filter: brightness(1.2); }
    100% { filter: brightness(0.8); }
}

#interactive-core {
    animation: tech-pulse 4s linear infinite;
    cursor: crosshair;
}

#arcing-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.automation-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.power-core-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.power-core {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 0 20px #00E5FF);
}

.spin-slow {
    transform-origin: 50px 50px;
    animation: spin 8s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.pulse-core {
    transform-origin: 50px 50px;
    animation: corePulse 2s ease-in-out infinite alternate;
}

@keyframes corePulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; filter: brightness(1.5); }
}

/* Floating Nodes */
.floating-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.4;
    transition: all 0.4s ease;
    z-index: 5;
}

/* Node layout positioning */
.node-tl { top: 15%; left: 10%; flex-direction: row; }
.node-tr { top: 15%; right: 10%; flex-direction: row-reverse; }
.node-bl { bottom: 15%; left: 10%; flex-direction: row; }
.node-br { bottom: 15%; right: 10%; flex-direction: row-reverse; }

.node-indicator {
    width: 15px;
    height: 15px;
    border: 2px solid #00E5FF;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px transparent;
}

.node-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 15px 20px;
    border-radius: 8px;
    width: 250px;
    transform: scale(0.95);
    transform-origin: center;
    transition: all 0.4s ease;
}

/* Node Text Styles */
.node-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.node-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

/* Hover/Powered State */
.floating-node:hover, .floating-node.powered {
    opacity: 1;
    z-index: 15;
}

.floating-node:hover .node-indicator, .floating-node.powered .node-indicator {
    background-color: #00E5FF;
    box-shadow: 0 0 15px #00E5FF;
    transform: scale(1.3);
}

.floating-node:hover .node-content, .floating-node.powered .node-content {
    background: rgba(0, 229, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 229, 255, 0.8);
    transform: scale(1);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.2) inset;
}

.floating-node:hover .node-desc, .floating-node.powered .node-desc {
    max-height: 100px;
    opacity: 1;
    margin-top: 10px;
}
/* ENGINEERING DASHBOARD BENTO SECTION */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;800&family=Montserrat:wght@700;900&display=swap');

.engineering-dashboard {
    position: relative;
    width: 100%;
    min-height: 80vh;
    background-color: #001d3d;
    padding: 80px 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
}

.bento-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.bento-cell {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(64, 224, 208, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    position: relative;
}

.bento-cell:hover {
    transform: scale(1.05); /* per requirements scale-105 is roughly 1.05 */
    box-shadow: inset 0 0 20px rgba(64, 224, 208, 0.3);
    z-index: 10;
}

.bento-content {
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Cell 1: Main Visual */
.bento-main {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 30px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffffff, #40E0D0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
}

.oscilloscope-wrapper {
    width: 100%;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.sine-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Extanded sine wave path to allow simple scrolling effect via transform */
.sine-wave {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    filter: drop-shadow(0 0 8px rgba(64, 224, 208, 0.8));
    will-change: transform;
}

.animate-wave {
    animation: drawWave 2s ease-in-out forwards, waveScroll 4s linear infinite;
    animation-delay: 0s, 2s; /* start scrolling after drawing */
}

.sine-2 {
    filter: drop-shadow(0 0 4px rgba(64, 224, 208, 0.4));
}

@keyframes drawWave {
    to { stroke-dashoffset: 0; }
}

@keyframes waveScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Cell 2: Stats */
.bento-stats {
    grid-column: span 1;
    grid-row: span 1;
    text-align: center;
}

.center-content {
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    color: #40E0D0;
    text-shadow: 0 0 20px rgba(64, 224, 208, 0.6);
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cell 3: Status Indicator */
.bento-status {
    grid-column: span 1;
    grid-row: span 1;
    text-align: center;
}

.status-pulse-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.status-dot {
    width: 16px;
    height: 16px;
    background-color: #4CAF50;
    border-radius: 50%;
    box-shadow: 0 0 10px #4CAF50, 0 0 20px #4CAF50;
    position: relative;
    z-index: 2;
}

.status-pulse-ring::before, .status-pulse-ring::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(76, 175, 80, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: 1;
}

.status-pulse-ring::after {
    animation-delay: 1s;
}

.bento-status:hover .status-pulse-ring::before, 
.bento-status:hover .status-pulse-ring::after {
    animation-duration: 0.8s;
    background-color: rgba(76, 175, 80, 0.6);
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.status-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
}

.status-ok {
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-top: 5px;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

/* Cell 4: Ticker */
.bento-ticker {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 !important; /* overrides bento-content if any */
}

.ticker-wrapper {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.1);
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 25s linear infinite;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: #40E0D0;
}

.ticker-content::after {
    content: " ЕНЕРГИЕН МЕНИДЖМЪНТ • АВТОМАТИЗАЦИЯ • PLC ПРОГРАМИРАНЕ • ЕЛЕКТРИЧЕСКИ ТАБЛА • СМАРТ КОНТРОЛ ";
    padding-left: 50px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Responsive Mobile */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .bento-main, .bento-stats, .bento-status {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .bento-title {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}

/* Scroll to Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scrollToTopBtn:hover {
  background-color: var(--light-bg);
  transform: translateY(-3px);
}
