/**
 * Elétrica Volts - Ultra Modern Custom Stylesheet
 * High performance, Core Web Vitals optimized, electric industry aesthetics
 */

:root {
  --ev-primary: #004b97;
  --ev-primary-dark: #002e61;
  --ev-primary-light: #0d6efd;
  --ev-secondary: #0a192f;
  --ev-accent: #ffb703;
  --ev-accent-hover: #fb8500;
  --ev-energy-cyan: #00d4ff;
  --ev-dark: #070e18;
  --ev-dark-surface: #0f1c2e;
  --ev-light-bg: #f8fafc;
  --ev-card-bg: #ffffff;
  --ev-text-main: #334155;
  --ev-text-heading: #0f172a;
  --ev-border-color: #e2e8f0;
  --ev-glow: 0 0 25px rgba(0, 212, 255, 0.25);
  --ev-shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --ev-shadow-hover: 0 20px 40px -15px rgba(0, 75, 151, 0.2);
}

/* Cross-Document View Transitions (MPA progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Base & Typography */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ev-text-main);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 1100;
  padding: 0.6rem 1.1rem;
  background-color: var(--ev-primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.skip-link:not(:focus):not(:focus-visible) {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Accessible focus indicators */
:focus-visible {
  outline: 3px solid var(--ev-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ev-text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Top utility bar */
.top-bar {
  background-color: var(--ev-secondary);
  color: #cbd5e1;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-bar a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}
.top-bar a:hover {
  color: var(--ev-energy-cyan);
}

/* Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding-block: 0.75rem;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.navbar-custom.is-scrolled {
  padding-block: 0.45rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.navbar-custom .navbar-brand img {
  height: 52px;
  width: auto;
  transition: transform 0.3s ease;
}
.navbar-custom .navbar-brand:hover img {
  transform: scale(1.02);
}
.navbar-custom .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: color 0.25s ease, background-color 0.25s ease;
  position: relative;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--ev-primary);
  background: rgba(0, 75, 151, 0.06);
}
.navbar-custom .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--ev-primary);
  border-radius: 2px;
}

/* Mobile navbar spacing fix */
@media (max-width: 991.98px) {
  .navbar-custom .navbar-collapse {
    margin-block-start: 0.9rem;
    padding-block-start: 0.75rem;
    padding-block-end: 0.25rem;
    border-top: 1px solid var(--ev-border-color);
  }
  .navbar-custom .navbar-nav {
    gap: 0.25rem;
  }
  .navbar-custom .nav-link {
    padding-block: 0.65rem !important;
  }
}

/* Curved Hero Section Divider */
.hero-wrapper {
  position: relative;
  background: linear-gradient(135deg, #070e18 0%, #0a192f 50%, #003366 100%);
  color: #ffffff;
  padding: 5rem 0 7rem;
  overflow: hidden;
}
.hero-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(255, 183, 3, 0.1) 0%, transparent 50%);
  pointer-events: none;
}
.curved-bottom-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  pointer-events: none;
}
.curved-bottom-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}
.curved-bottom-divider .shape-fill {
  fill: #ffffff;
}

.curved-top-divider {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.curved-top-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}
.curved-top-divider .shape-fill {
  fill: #ffffff;
}

/* Electric accents and badges */
.badge-energy {
  background-color: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 50rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem !important;
}
.badge-energy-dark {
  background-color: rgba(0, 75, 151, 0.1);
  color: var(--ev-primary);
  border: 1px solid rgba(0, 75, 151, 0.2);
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: 50rem;
  font-size: 0.82rem;
  display: inline-block;
  margin-bottom: 1rem !important;
}

/* Buttons */
.btn-electric {
  background: linear-gradient(135deg, #004b97 0%, #003366 100%);
  color: #ffffff;
  border: 1px solid #0056b3;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 75, 151, 0.3);
}
.btn-electric:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004080 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 75, 151, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #070e18;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(251, 133, 0, 0.3);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #ffc300 0%, #f77f00 100%);
  color: #070e18;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(251, 133, 0, 0.45);
}

.btn-whatsapp-modern {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-whatsapp-modern:hover {
  background-color: #20bd5a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
}

/* Modern Cards */
.card-modern {
  background: #ffffff;
  border: 1px solid var(--ev-border-color);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--ev-shadow-card);
  overflow: hidden;
  height: 100%;
}
.card-modern:hover {
  transform: translateY(-6px);
  box-shadow: var(--ev-shadow-hover);
  border-color: rgba(0, 75, 151, 0.3);
}

.feature-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 75, 151, 0.1) 0%, rgba(0, 212, 255, 0.15) 100%);
  color: var(--ev-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
}
.card-modern:hover .feature-icon-box {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--ev-primary) 0%, #0077b6 100%);
  color: #ffffff;
}

/* Image wrappers for zoom */
.img-zoom-container {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}
.img-zoom-container img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-modern:hover .img-zoom-container img,
[data-lightbox-gallery] .img-zoom-container:hover img {
  transform: scale(1.06);
}

/* Lightbox hover zoom trigger */
[data-lightbox-gallery] .img-zoom-container {
  cursor: zoom-in;
}
.img-zoom-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: rgba(7, 14, 24, 0.42);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: zoom-in;
  transition: opacity 0.25s ease;
}
.img-zoom-trigger .img-zoom-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 75, 151, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: scale(0.9);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
[data-lightbox-gallery] .img-zoom-container:hover .img-zoom-trigger,
.img-zoom-trigger:focus-visible {
  opacity: 1;
}
[data-lightbox-gallery] .img-zoom-container:hover .img-zoom-icon,
.img-zoom-trigger:focus-visible .img-zoom-icon {
  transform: scale(1);
}
.img-zoom-trigger:hover .img-zoom-icon {
  background: var(--ev-accent);
  color: var(--ev-dark);
  border-color: #ffffff;
}

/* Native <dialog> image lightbox */
dialog.lightbox-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  overflow: visible;
  margin: auto;
}
dialog.lightbox-dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
dialog.lightbox-dialog:modal {
  overscroll-behavior: contain;
}
dialog.lightbox-dialog::backdrop {
  background-color: rgba(7, 14, 24, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}
.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}
.lightbox-close-form {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  margin: 0;
}
.lightbox-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: var(--ev-dark-surface);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover {
  background: var(--ev-accent);
  color: var(--ev-dark);
  transform: scale(1.06);
}
.lightbox-img {
  display: block;
  max-width: min(90vw, 1060px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  background: var(--ev-dark);
}
.lightbox-caption {
  margin: 0;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  max-width: 68ch;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
@media (max-width: 575.98px) {
  .lightbox-close-form {
    top: 8px;
    right: 8px;
  }
}

/* Client Logo Carousel / Grid */
.client-logo-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  transition: all 0.3s ease;
  filter: grayscale(80%);
  opacity: 0.85;
}
.client-logo-box:hover {
  filter: grayscale(0%);
  opacity: 1;
  border-color: var(--ev-primary);
  box-shadow: 0 6px 18px rgba(0, 75, 151, 0.12);
  transform: translateY(-3px);
}
.client-logo-box img {
  max-height: 55px;
  max-width: 130px;
  object-fit: contain;
}

/* Floating WhatsApp quick button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1050;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  transition: all 0.3s ease;
  text-decoration: none;
}
.floating-whatsapp:hover {
  background-color: #20bd5a;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

/* Stats Counter Box */
.stat-box {
  border-inline-start: 3px solid var(--ev-accent);
  padding-inline-start: 1.2rem;
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

/* Dark Section with glow */
.section-dark {
  background-color: var(--ev-dark-surface);
  color: #f1f5f9;
  position: relative;
}

/* Contact Card direct items */
.contact-item-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  height: 100%;
}
.contact-item-card:hover {
  border-color: var(--ev-primary);
  box-shadow: 0 10px 25px rgba(0, 75, 151, 0.1);
  transform: translateY(-4px);
}
.contact-icon-wrapper {
  background: rgba(0, 75, 151, 0.1);
  color: var(--ev-primary);
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* CTA Section Styling */
.section-cta {
  background: linear-gradient(135deg, #071220 0%, #002e61 100%);
  color: #ffffff;
}
.section-cta h2,
.section-cta h3,
.section-cta .h2,
.section-cta .display-6 {
  color: #ffffff !important;
}
.section-cta p,
.section-cta .lead {
  color: #e2e8f0 !important;
}

/* Below-the-fold rendering optimization */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 32rem;
}

/* Footer styling */
footer.main-footer {
  background-color: #070e18;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
footer.main-footer h2.h6,
footer.main-footer h6 {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}
footer.main-footer p,
footer.main-footer li,
footer.main-footer .text-muted,
footer.main-footer .small {
  color: #cbd5e1 !important;
}
footer.main-footer a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
}
footer.main-footer a:hover {
  color: var(--ev-energy-cyan) !important;
}
footer.main-footer .netplex-link {
  color: #00d4ff !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer.main-footer .netplex-link:hover {
  color: #ffffff !important;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
