@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;600;700;800&display=swap');

:root {
  --primary-blue: #005DFF;
  --secondary-blue: #009DFF;
  --purple: #7B2EFF;
  --magenta: #D61B9C;
  --orange: #FF8A00;
  --dark-navy: #061B3B;
  --darker-navy: #030D1E;
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --medium-gray: #E9ECEF;
  --dark-gray: #495057;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--purple) 100%);
  --gradient-purple-magenta: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
  --gradient-orange-magenta: linear-gradient(135deg, var(--orange) 0%, var(--magenta) 100%);
  --gradient-dark: linear-gradient(180deg, var(--dark-navy) 0%, var(--darker-navy) 100%);
  --gradient-glass: rgba(6, 27, 59, 0.75);

  /* Fonts */
  --font-headings: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
body {
  font-family: var(--font-body);
  color: var(--dark-navy);
  background-color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 800;
  letter-spacing: -0.5px;
}

a {
  text-decoration: none;
  color: var(--primary-blue);
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--purple);
}

/* Typography Overrides */
.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  /* -webkit-text-fill-color: transparent; */
}

.text-gradient-purple-magenta {
  background: var(--gradient-purple-magenta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-orange {
  background: var(--gradient-orange-magenta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navigation */
.navbar {
  padding: 20px 0;
  transition: var(--transition-smooth);
  z-index: 1030;
}

.navbar-brand .brand-text {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -1px;
}

.navbar.scrolled {
  padding:15px;
  background: rgba(3, 13, 30, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0 12px;
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition-smooth);
  transform-origin: right;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white) !important;
}

.lang-selector {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 50px;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-selector:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-blue);
}

/* Custom Buttons */
.btn-custom {
  font-family: var(--font-headings);
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 50px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-custom-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 93, 255, 0.4);
}

.btn-custom-primary:hover {
  color: var(--white);
  box-shadow: 0 6px 25px rgba(123, 46, 255, 0.6);
  transform: translateY(-2px);
}

.btn-custom-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-custom-secondary:hover {
  background: var(--white);
  color: var(--dark-navy) !important;
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-custom-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-custom-outline:hover {
  background: var(--gradient-primary);
  color: var(--white);
  border-color: transparent;
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background-color: #0076d2; !important;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.45;
}

.hero-fallback-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: linear-gradient(to bottom, rgba(3, 13, 30, 0.8) 0%, rgba(3, 13, 30, 0.95) 100%); */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 100px;
}

/* Section Common Styles */
.section-padding {
  padding: 100px 0;
}

.section-title-wrapper {
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 15px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--dark-gray);
  max-width: 700px;
  margin: 0 auto;
}

/* Operations Map styling */
.map-container {
  position: relative;
  width: 100%;
  height: 550px;
  background: rgba(6, 27, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moz-map-svg {
  width: 100%;
  height: 100%;
  max-height: 520px;
  padding: 20px;
}

.map-pin {
  cursor: pointer;
  transition: var(--transition-smooth);
}

.map-pin circle {
  transition: var(--transition-smooth);
}

.map-pin:hover circle.pin-dot {
  fill: var(--orange);
  r: 8px;
}

.map-pin:hover circle.pin-pulse {
  stroke: var(--orange);
  r: 22px;
  opacity: 0.8;
}

.map-pin.active circle.pin-dot {
  fill: var(--magenta);
}

.map-pin.active circle.pin-pulse {
  stroke: var(--magenta);
  animation: map-pulse 2s infinite;
}

@keyframes map-pulse {
  0% {
    r: 6px;
    opacity: 1;
  }
  100% {
    r: 28px;
    opacity: 0;
  }
}

/* Map tooltip */
.map-tooltip-box {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(3, 13, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--white);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 5;
}

.map-tooltip-box.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Form Styling */
.form-floating > .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.form-floating > .form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-blue);
  box-shadow: 0 0 15px rgba(0, 93, 255, 0.25);
  color: var(--white);
}

.form-floating > label {
  color: rgba(255, 255, 255, 0.6);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--primary-blue);
}

.form-select-custom {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-radius: 12px;
  height: 58px;
  padding: 0 15px;
  transition: var(--transition-smooth);
}

.form-select-custom:focus {
  background-color: rgba(6, 27, 59, 0.95);
  border-color: var(--primary-blue);
  box-shadow: 0 0 15px rgba(0, 93, 255, 0.25);
  color: var(--white);
  outline: none;
}

.form-select-custom option {
  background-color: var(--dark-navy);
  color: var(--white);
}

/* Testimonials Swiper */
.testimonials-slider {
  padding: 40px 0 60px;
}

.testimonial-card {
  background: var(--light-gray);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--medium-gray);
  transition: var(--transition-smooth);
  height: 100%;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 93, 255, 0.08);
  border-color: rgba(0, 93, 255, 0.2);
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--dark-gray);
  margin-bottom: 25px;
  position: relative;
}

.testimonial-quote::before {
  content: '"';
  font-family: var(--font-headings);
  font-size: 5rem;
  color: rgba(0, 93, 255, 0.1);
  position: absolute;
  top: -40px;
  left: -20px;
  font-weight: 800;
}

.testimonial-client {
  display: flex;
  align-items: center;
  gap: 15px;
}

.testimonial-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-blue);
}

.testimonial-info h5 {
  font-size: 1rem;
  margin-bottom: 2px;
  font-weight: 700;
}

.testimonial-info p {
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin-bottom: 0;
}

.swiper-pagination-bullet-active {
  background: var(--primary-blue) !important;
  width: 25px !important;
  border-radius: 10px !important;
}

/* Footer styling */
.footer {
  background: var(--gradient-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-title {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient-primary);
}

.footer-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-contact-item {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-contact-icon {
  color: var(--primary-blue);
  font-size: 1.2rem;
}

.footer-social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-icon:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

/* Service Detail Common Elements */
.service-hero {
  position: relative;
  padding: 180px 0 100px;
  background-color: var(--darker-navy);
  color: var(--white);
  overflow: hidden;
}

.service-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(3, 13, 30, 0.95) 0%, rgba(6, 27, 59, 0.8) 100%);
  z-index: 1;
}

.service-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
}

.service-hero-content {
  position: relative;
  z-index: 2;
}

.breadcrumb-custom {
  display: flex;
  gap: 10px;
  list-style: none;
  padding-left: 0;
  font-size: 0.9rem;
  font-family: var(--font-headings);
  font-weight: 600;
  margin-bottom: 20px;
}

.breadcrumb-custom a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-custom a:hover {
  color: var(--white);
}

.breadcrumb-custom .active {
  color: var(--primary-blue);
}

.breadcrumb-custom li + li::before {
  content: '/';
  color: rgba(255, 255, 255, 0.4);
  margin-right: 10px;
}

/* Partner Logos */
.partner-logo-wrapper {
  background: var(--light-gray);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  border: 1px solid var(--medium-gray);
  transition: var(--transition-smooth);
}

.partner-logo-wrapper:hover {
  background: var(--white);
  border-color: rgba(0, 93, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 93, 255, 0.05);
}

.partner-logo-svg {
  max-width: 100%;
  max-height: 45px;
  fill: var(--dark-gray);
  opacity: 0.6;
  transition: var(--transition-smooth);
}

.partner-logo-wrapper:hover .partner-logo-svg {
  fill: var(--primary-blue);
  opacity: 1;
}

/* Custom validation states */
.is-invalid-custom {
  border-color: #dc3545 !important;
  box-shadow: 0 0 15px rgba(220, 53, 69, 0.25) !important;
}

.is-valid-custom {
  border-color: #198754 !important;
  box-shadow: 0 0 15px rgba(25, 135, 84, 0.25) !important;
}

/* ============================================================
   Language Switcher (PT | EN)
   ============================================================ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-headings);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-switcher:hover {
  border-color: rgba(0, 157, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 18px rgba(0, 93, 255, 0.35);
  transform: translateY(-1px);
}

.lang-switcher:focus-visible {
  outline: 2px solid var(--secondary-blue);
  outline-offset: 3px;
}

.lang-switcher .lang-opt {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 50px;
  line-height: 1;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.lang-switcher .lang-opt.active {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 93, 255, 0.45);
}

.lang-switcher .lang-opt:not(.active):hover {
  color: var(--white);
}

/* Em ecrãs pequenos o menu colapsado tem fundo claro/escuro variável:
   garante contraste dentro do menu mobile */
@media (max-width: 991.98px) {
  .navbar .lang-switcher {
    margin: 10px 0;
  }
}

/* Crédito do desenvolvedor no footer */
.footer-credit {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px !important;
}
.footer-credit strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-credit-link {
  color: inherit;
}
.footer-credit-link:hover strong {
  color: var(--secondary-blue);
}


/* ============================================================
   Partner Logo Hover Swap (mostra imagem alternativa no hover)
   ============================================================ */
.partner-logo-wrapper {
  position: relative;
  overflow: hidden;
}

/* As duas imagens ficam EXATAMENTE no mesmo lugar (sobrepostas) */
.partner-logo-wrapper .partner-logo-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-smooth);
  max-width: 80%;
  max-height: 45px;
}

/* Imagem padrão: visível por padrão */
.partner-logo-wrapper .logo-default {
  opacity: 1;
}

/* Imagem hover: escondida por padrão */
.partner-logo-wrapper .logo-hover {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
}

/* Ao passar o mouse: troca a visibilidade */
.partner-logo-wrapper:hover .logo-default {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
}

.partner-logo-wrapper:hover .logo-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
   Partners Carousel (movimento infinito automático)
   ============================================================ */
.partners-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 200px;
  width: max-content;
  animation: partners-scroll var(--partners-duration, 5s) linear infinite;
}

.partners-carousel:hover .partners-track {
  animation-play-state: paused;
}

@keyframes partners-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(var(--partners-scroll-distance, -50%));
  }
}

.partners-carousel .partner-logo-wrapper {
  flex: 0 0 auto;
  width: 200px;
}