/* 
 * Nelo Studio Premium Stylesheet
 * Integrates directly with Bootstrap 5
 * Emphasizes dark mode, neon accents, curves, and fluid motion.
 */

:root {
  --primary-color: #9333ea;
  /* Vibrant Purple */
  --secondary-color: #f8fafc;
  /* Polished White/Silver */
  --accent-color: #c084fc;
  /* Light Purple Accent */
  --bg-dark: #09090b;
  --bg-card: #18181b;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(9, 9, 11, 0.7);
}

body.nelo-studio-theme {
  background-color: var(--bg-dark);
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* WCAG Contrast Overrides: bring text-white-50 and opacity-75 above 4.5:1 threshold */
.text-white-50 {
  color: rgba(255, 255, 255, 0.72) !important;
}

.nelo-studio-theme .opacity-75 {
  opacity: 0.85 !important;
}

/* Base Fonts */
.outfit-font {
  font-family: 'Outfit', sans-serif;
}

.inter-font {
  font-family: 'Inter', sans-serif;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.custom-container {
  max-width: 1400px;
}

.transition {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-text-primary:hover {
  color: var(--primary-color) !important;
}

/* Navbar overrides */
.sleek-navbar {
  background: transparent;
  transition: all 0.4s ease;
  padding: 2.2rem 0;
}

.sleek-navbar.scrolled-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.sleek-navbar .nav-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
  position: relative;
  font-size: 0.95rem;
  margin: 0 0.25rem;
  white-space: nowrap;
}

.sleek-navbar .nav-link:hover,
.sleek-navbar .nav-link.active {
  color: #fff;
}

.sleek-navbar .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.sleek-navbar .nav-link:hover::after,
.sleek-navbar .nav-link.active::after {
  width: 100%;
}

/* Base Mobile Responsive Fixes */
@media (max-width: 991px) {
  .sleek-navbar {
    padding: 0.5rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
  }

  .sleek-navbar .navbar-brand img {
    max-height: 44px !important;
    /* Logo on phone */
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .sleek-navbar .navbar-brand img {
    max-height: 90px !important;
    /* Logo on tablet - same as default */
  }

  .hero-section {
    padding-top: 60px !important;
    padding-bottom: 2rem !important;
  }

  .hero-section .display-3 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.1;
  }

  .hero-section .lead {
    font-size: clamp(0.95rem, 4vw, 1.1rem) !important;
    margin-bottom: 2rem !important;
  }

  /* Make giant buttons smaller on mobile */
  .hero-section .btn {
    padding: 0.85rem 1.5rem !important;
    font-size: 1rem !important;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .bento-item {
    padding: 1.5rem !important;
  }

  .display-5 {
    font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
  }

  .display-4 {
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
  }

  /* Hamburger Toggle Logic */
  .navbar-toggler[aria-expanded="true"] .menu-open-icon {
    display: none !important;
  }

  .navbar-toggler[aria-expanded="true"] .menu-close-icon {
    display: inline-flex !important;
  }

  .navbar-toggler {
    z-index: 1060;
    position: relative;
  }

  .mobile-phone-btn {
    text-decoration: none;
    transition: transform 0.2s;
  }

  .mobile-phone-btn:active {
    transform: scale(0.9);
  }
}


/* Language Dropdown Override */
.language-wrapper {
  position: relative;
  z-index: 1050;
}

.language-wrapper .btn-link {
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.language-wrapper .dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  z-index: 1060 !important;
  margin-top: 10px !important;
}

@media (min-width: 992px) {
  .language-wrapper .dropdown-menu {
    right: 0 !important;
    left: auto !important;
  }
}

@media (max-width: 991px) {
  .language-wrapper {
    position: relative;
    z-index: 1050;
  }

  .language-wrapper .language-select {
    padding: 6px 12px;
    font-size: 1rem;
    min-height: auto;
    min-width: auto;
    border-radius: 8px;
  }

  .language-wrapper .dropdown-menu {
    left: auto !important;
    right: 0 !important;
    min-width: 120px;
    margin-top: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  }
}

.language-wrapper .dropdown-item {
  color: #fff;
}

.language-wrapper .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Oferta Page & Global Mobile Specific Overrides */
@media (max-width: 767px) {
  .oferta-showcase-img {
    height: 200px !important;
    min-height: auto !important;
    object-fit: contain !important;
  }

  .oferta-section-pt {
    padding-top: 80px !important;
  }

  /* Force bento cards and fonts down to a manageable size on mobile */
  .bento-item {
    padding: 1.25rem !important;
  }

  .offer-pricing-card {
    padding: 1.25rem !important;
  }

  /* Aggressive compression for Pricing Cards exclusively on mobile */
  .offer-pricing-card img,
  .offer-pricing-card svg {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 0.5rem !important;
  }

  .offer-pricing-card h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0.25rem !important;
  }

  .offer-pricing-card .display-6 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  .offer-pricing-card hr {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .offer-pricing-card .feature-list {
    margin-bottom: 0.5rem !important;
  }

  .offer-pricing-card .feature-list li {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
    gap: 0.5rem !important;
  }

  .offer-pricing-card .feature-list i {
    font-size: 1rem !important;
  }

  .feature-list li {
    font-size: 0.9rem !important;
  }

  .display-4,
  .display-5,
  .display-6 {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
  }

  .h2,
  h3 {
    font-size: 1.5rem !important;
  }

  /* Buttons */
  .btn-primary.px-5,
  .btn-primary.py-4 {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
  }

  /* Form / Quote Bento Mobile Compression (100% width) */
  #contact .p-5 {
    padding: 1.5rem 5vw !important;
    /* Internal padding so text doesn't touch screen edges */
  }

  #contact .bento-item {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    /* Break out of container */
    margin-right: calc(-50vw + 50%) !important;
    border-radius: 0 !important;
    /* Flat edges for full bleed */
    border-left: none !important;
    border-right: none !important;
  }

  #contact .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  #contact .p-4 {
    padding: 1.25rem 4vw !important;
    /* Feature box paddings */
  }

  /* Make text generally smaller */
  #contact .display-4 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  #contact h3,
  #contact h4,
  #contact h5 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  #contact .fs-4 {
    font-size: 0.85rem !important;
    /* Scaled down heavily for side-by-side */
  }

  #contact .fs-5 {
    font-size: 0.9rem !important;
  }

  /* Force Side-by-Side Project Type Buttons */
  #dynamicQuoteForm .row.g-3.mb-4:first-of-type .col-12 {
    width: 50% !important;
    /* Force 50% width on mobile so they sit side by side */
    padding: 0 0.25rem !important;
  }

  #dynamicQuoteForm .project-type-label.py-4 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    gap: 0.25rem !important;
    /* Less gap between icon and text */
  }

  /* Multilingual Buttons Side-by-Side */
  #dynamicQuoteForm .d-flex.justify-content-center.gap-3.flex-wrap {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }

  #dynamicQuoteForm .d-flex.justify-content-center.gap-3.flex-wrap>* {
    flex: 1;
    /* Distribute available width evenly */
    padding: 0.5rem !important;
    justify-content: center;
  }

  /* Shrink elements & gaps */
  #contact .type-icon {
    width: 24px !important;
    /* Smaller icons for side-by-side */
    height: 24px !important;
  }

  #contact .g-3 {
    --bs-gutter-y: 0.5rem;
    --bs-gutter-x: 0.5rem;
  }

  #contact .gap-3 {
    gap: 0.5rem !important;
  }

  #contact .mb-5 {
    margin-bottom: 1.5rem !important;
  }

  #contact .mb-4 {
    margin-bottom: 1rem !important;
  }

  /* Make inputs smaller */
  .dark-input.py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 0.9rem !important;
  }

  #dynamicQuoteForm .btn.py-3 {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    font-size: 0.95rem !important;
  }

  #contact .custom-checkbox {
    font-size: 0.85rem !important;
  }
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  z-index: -1;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-glow {
  box-shadow: 0 0 15px rgba(147, 51, 234, 0.4);
}

.btn-glow:hover {
  box-shadow: 0 0 25px rgba(147, 51, 234, 0.7);
  transform: translateY(-2px);
}

/* Animations / Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

/* Sections */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Background Gradients & Glows */
.bg-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.3;
}

.glow-primary {
  background: var(--primary-color);
  width: 400px;
  height: 400px;
  top: 10%;
  left: -10%;
}

.glow-secondary {
  background: var(--secondary-color);
  width: 300px;
  height: 300px;
  bottom: 20%;
  right: -5%;
}

/* Minimalistic Luxury Background */
.minimal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Animated Logo Lines */
.logo-lines-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}

.swoop {
  stroke: url(#line-gradient);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  animation: draw-swoop 15s ease-in-out infinite alternate, float-swoop 18s ease-in-out infinite alternate;
  transform: translateZ(0);
  will-change: transform, stroke-dashoffset;
}

.swoop-outer {
  stroke-dasharray: 800 2400;
}

.swoop-middle {
  stroke-dasharray: 600 1800;
}

.swoop-inner {
  stroke-dasharray: 400 1200;
}

@keyframes draw-swoop {
  0% {
    stroke-dashoffset: 3200;
  }

  100% {
    stroke-dashoffset: -3200;
  }
}

@keyframes float-swoop {
  0% {
    transform: translateY(-20px) scale(0.98);
  }

  100% {
    transform: translateY(20px) scale(1.02);
  }
}

/* Tubelight Navbar Styles */
.tubelight-navbar {
  position: relative;
  z-index: 50;
  border-radius: 9999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (min-width: 992px) {
  .tubelight-navbar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

.tubelight-menu {
  position: relative;
  border-radius: 9999px;
  background: transparent;
  padding: 4px;
}

@media (max-width: 991px) {
  .tubelight-navbar {
    border-radius: 12px;
    padding: 8px;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .tubelight-menu {
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: 12px;
    gap: 8px;
  }

  .tubelight-lamp {
    display: none !important;
  }
}

.tubelight-item {
  position: relative;
  cursor: pointer;
  padding: 8px 24px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.3s ease;
  z-index: 2;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 992px) and (max-width: 1536px) {
  .tubelight-item {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }
  /* Logo sizing restored by removing clamp constraints */
  /* .contact-header-block is now allowed to show as a pill */
  .sleek-navbar .gap-3 {
    gap: 0.5rem !important;
  }
  .sleek-navbar .language-select {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
  }
  .sleek-navbar .btn-primary { 
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
  }
  .sleek-navbar .pe-4 {
    padding-right: 1rem !important; /* Reduce padding before language button */
  }
}

@media (max-width: 991px) {
  .tubelight-item {
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
  }

  .tubelight-item:hover,
  .tubelight-item.active {
    background: rgba(147, 51, 234, 0.15) !important;
    color: #fff !important;
  }
}

.tubelight-item:hover,
.tubelight-item.active {
  color: #fff !important;
}

@media (min-width: 1651px) {
  .contact-block-tubelight {
    display: none !important;
  }
}

@media (max-width: 1650px) {
  .contact-block-right {
    display: none !important;
  }
}

.sleek-navbar .tubelight-item::after {
  display: none !important;
  /* Override standard underline */
}

.tubelight-lamp {
  pointer-events: none;
  height: 100%;
  top: 0;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.08);
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.lamp-bar {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 9999px;
}

.lamp-glow-1,
.lamp-glow-2,
.lamp-glow-3 {
  position: absolute;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.3);
}

.lamp-glow-1 {
  width: 48px;
  height: 24px;
  top: -10px;
  left: -8px;
  filter: blur(8px);
}

.lamp-glow-2 {
  width: 32px;
  height: 24px;
  top: -6px;
  left: 0px;
  filter: blur(6px);
}

.lamp-glow-3 {
  width: 16px;
  height: 16px;
  top: -4px;
  left: 8px;
  filter: blur(4px);
}

/* Removed Scroll Snapping */

/* Custom Language Switcher */
.language-wrapper .ds-dropdown-title {
  display: none !important;
}

.language-wrapper #language {
  margin: 0;
  padding: 0;
}

.language-wrapper .ds-switcher {
  background: transparent !important;
  padding: 0 !important;
  gap: 5px;
}

.language-wrapper .language-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 18px;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.language-wrapper .language-select:hover,
.language-wrapper .language-select.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.language-wrapper .language-select img {
  display: none;
}

/* Hide flags, keep text */

/* Remove orphaned code */
/* Island Layouts */
.island {
  position: relative;
  z-index: 2;
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.island-left {
  background: linear-gradient(135deg, rgba(24, 24, 27, 0.95) 0%, rgba(9, 9, 11, 0.8) 100%);
}

.island-right {
  background: linear-gradient(225deg, rgba(24, 24, 27, 0.95) 0%, rgba(9, 9, 11, 0.8) 100%);
}

/* Slide Reveal Animations */
.reveal-slide-left {
  opacity: 0;
  transform: translateX(-100px);
}

.reveal-slide-right {
  opacity: 0;
  transform: translateX(100px);
}

.reveal-slide-left.active,
.reveal-slide-right.active {
  opacity: 1;
  transform: translateX(0);
}

.letter-spacing-1 {
  letter-spacing: 1px;
}

/* Forms */
.form-control.dark-input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.form-control.dark-input:focus {
  background: var(--bg-card);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(147, 51, 234, 0.25);
  color: #fff;
}

/* Footer elements */
.social-icon {
  width: 45px;
  height: 45px;
}

.social-icon:hover {
  background-color: var(--primary-color) !important;
  transform: translateY(-3px);
}

/* Custom Form & Placeholder Visibility */
.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
  opacity: 1;
}

.custom-floating>.form-control:focus~label,
.custom-floating>.form-control:not(:placeholder-shown)~label {
  color: rgba(255, 255, 255, 0.7) !important;
}

.custom-floating>label {
  color: rgba(255, 255, 255, 0.4) !important;
}

.form-control {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(147, 51, 234, 0.25) !important;
  color: #fff !important;
}