/* ==========================================================================
   NITSOFT - Design System & Custom Styles
   "Digitalizamos tu visión"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary-blue: #0072FF;
  --primary-cyan: #00D2FF;
  --accent-cyan: #38bdf8;
  --bg-dark: #070b14;
  --bg-dark-card: rgba(15, 23, 42, 0.75);
  --bg-dark-border: rgba(56, 189, 248, 0.15);
  --text-dark: #f8fafc;
  --text-dark-muted: #94a3b8;
  
  --bg-light: #f8fafc;
  --bg-light-card: rgba(255, 255, 255, 0.85);
  --bg-light-border: rgba(2, 132, 199, 0.18);
  --text-light: #0f172a;
  --text-light-muted: #64748b;
  
  --glow-blue: rgba(0, 210, 255, 0.35);
  --glow-strong: rgba(0, 114, 255, 0.5);
  --font-heading: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Dark Mode (Default) */
body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Card Titles Hover Effect in Dark Mode - Cyan/Blue Color Change (#00D2FF) */
body.dark .project-card:hover h3,
body.dark .project-card:hover .group-hover\:text-cyan-400,
body.dark .glass-card:hover h3,
body.dark .group:hover h3,
body.dark .group:hover h4,
body.dark .group:hover .group-hover\:text-cyan-400,
body.dark .group:hover .group-hover\:text-cyan-300,
body.dark .group:hover .group-hover\:text-emerald-300,
body.dark .group:hover .group-hover\:text-blue-300,
body.dark a.group:hover span,
body.dark .group:hover .text-slate-200,
body.dark .glass-card:hover .text-white,
body.dark .project-card:hover .text-white {
  color: #00D2FF !important;
  text-shadow: 0 0 16px rgba(0, 210, 255, 0.6);
  transition: all 0.25s ease;
}

/* Header Navbar in Dark Mode - Deep Solid Dark (Sin transparencias molestas al scrollear) */
body.dark .glass-nav,
header.glass-nav,
.glass-nav {
  background: rgba(7, 11, 20, 0.97) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.16) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.75) !important;
}

/* Hover Illumination in Dark Mode (Iluminación azul completa en los cuadrados) */
body.dark .glass-card:hover,
body.dark .project-card:hover,
body.dark .border-gradient-wrapper:hover .border-gradient-inner,
body.dark .mockup-container:hover,
body.dark [class*="glass-card"]:hover,
body.dark #proyectos a.p-3\.5:hover,
body.dark #contacto a.p-3\.5:hover,
body.dark #cotizador label:hover {
  border-color: #00D2FF !important;
  box-shadow: 0 0 35px rgba(0, 210, 255, 0.45), 0 20px 45px -10px rgba(0, 114, 255, 0.35) !important;
  transform: translateY(-6px);
}

body.dark .glass-card,
body.dark .project-card,
body.dark .border-gradient-inner {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Comprehensive Typography & High Contrast */
body.light {
  background-color: #f8fafc;
  color: #0f172a;
}

body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light h5,
body.light h6 {
  color: #0f172a;
}

body.light .text-white {
  color: #0f172a;
}

body.light strong {
  color: #0f172a;
}

/* Card Titles Hover Effect in Light Mode - Blue Color Change (#0072FF) */
body.light .project-card:hover h3,
body.light .project-card:hover .group-hover\:text-cyan-400,
body.light .glass-card:hover h3,
body.light .group:hover h3,
body.light .group:hover h4,
body.light .group:hover .group-hover\:text-cyan-400,
body.light .group:hover .group-hover\:text-cyan-300,
body.light .group:hover .group-hover\:text-emerald-300,
body.light .group:hover .group-hover\:text-blue-300,
body.light a.group:hover span,
body.light .group:hover .text-slate-200,
body.light .glass-card:hover .text-white,
body.light .project-card:hover .text-white {
  color: #0072FF !important;
  transition: color 0.25s ease;
}

/* Subtitles & Taglines in Light Mode (Azul oficial del logo: #0072FF) */
body.light .section-subtitle,
body.light .project-subtitle,
body.light .card-subtitle,
body.light p.text-cyan-400\/90,
body.light .text-cyan-400\/90,
body.light .text-cyan-400,
body.light .text-cyan-300,
body.light p.font-medium,
body.light h2 + p,
body.light h3 + p {
  color: #0072FF !important;
}

body.light .text-slate-400 {
  color: #0072FF !important;
}

body.light p.text-slate-400 {
  color: #334155 !important; /* General paragraph body text */
}

body.light .text-slate-400.font-medium,
body.light p.font-medium.text-cyan-400\/90 {
  color: #0072FF !important;
}

body.light .text-slate-300 {
  color: #1e293b !important;
}

body.light .text-slate-500 {
  color: #64748b !important;
}

/* Navigation Links in Light Mode */
body.light .nav-link,
body.light .mobile-nav-link {
  color: #334155 !important;
  transition: color 0.25s ease;
}

body.light .nav-link:hover,
body.light .mobile-nav-link:hover {
  color: #0072FF !important;
}

/* Cards & Glassmorphism in Light Mode with Blue Glow on Hover */
body.light .glass-card,
body.light .border-gradient-inner,
body.light .project-card {
  background: #ffffff !important;
  border-color: rgba(0, 114, 255, 0.18) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover Illumination in Light Mode (Iluminación azul completa en los cuadrados) */
body.light .glass-card:hover,
body.light .project-card:hover,
body.light .border-gradient-wrapper:hover .border-gradient-inner,
body.light .mockup-container:hover,
body.light [class*="glass-card"]:hover {
  border-color: #0072FF !important;
  box-shadow: 0 0 35px rgba(0, 114, 255, 0.35), 0 20px 45px -10px rgba(0, 114, 255, 0.25) !important;
  transform: translateY(-6px);
}

/* Inner hover glowing aura in light mode */
body.light .project-card .bg-cyan-500\/10 {
  background-color: rgba(0, 114, 255, 0.1) !important;
}

body.light .project-card:hover .group-hover\:bg-cyan-500\/20 {
  background-color: rgba(0, 114, 255, 0.25) !important;
}

body.light .border-gradient-wrapper {
  background: linear-gradient(135deg, rgba(0, 114, 255, 0.35), rgba(0, 210, 255, 0.15), rgba(0, 114, 255, 0.25)) !important;
  transition: all 0.35s ease;
}

body.light .border-gradient-wrapper:hover {
  box-shadow: 0 0 40px rgba(0, 114, 255, 0.4);
}

body.light .glass-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06) !important;
}

/* Form Inputs, Selects, and Textareas in Light Mode */
body.light input,
body.light select,
body.light textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light input::placeholder,
body.light textarea::placeholder {
  color: #64748b !important;
}

body.light input:focus,
body.light select:focus,
body.light textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

body.light label {
  color: #0f172a !important;
}

/* Sub-containers & Status Bars in Light Mode */
body.light .bg-slate-900,
body.light .bg-slate-900\/90,
body.light .bg-slate-900\/80,
body.light .bg-slate-900\/60,
body.light .bg-slate-950,
body.light .bg-slate-950\/90,
body.light .bg-slate-950\/80,
body.light .bg-slate-950\/50,
body.light .bg-slate-950\/40 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.light .border-slate-800,
body.light .border-slate-800\/80,
body.light .border-slate-700,
body.light .border-slate-700\/60,
body.light .border-slate-700\/50 {
  border-color: #e2e8f0 !important;
}

/* Tech Badges in Light Mode */
body.light .bg-slate-800,
body.light .bg-slate-800\/80,
body.light .bg-slate-800\/60,
body.light .bg-slate-800\/40 {
  background-color: #e2e8f0 !important;
  color: #0369a1 !important;
  border-color: #cbd5e1 !important;
}

body.light .text-cyan-400 {
  color: #0284c7 !important;
}

body.light .text-cyan-300 {
  color: #0369a1 !important;
}

body.light .text-emerald-400 {
  color: #059669 !important;
}

body.light .text-purple-400 {
  color: #7c3aed !important;
}

body.light .text-amber-400 {
  color: #d97706 !important;
}

body.light .text-blue-400 {
  color: #2563eb !important;
}

body.light .bg-cyan-950\/40,
body.light .bg-cyan-500\/10,
body.light .bg-cyan-500\/15 {
  background-color: rgba(2, 132, 199, 0.12) !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
  color: #0284c7 !important;
}

body.light .bg-emerald-500\/10,
body.light .bg-emerald-500\/20 {
  background-color: rgba(16, 185, 129, 0.14) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Mockup UI in Light Mode */
body.light .mockup-container {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

body.light .mockup-container .bg-slate-950\/90 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.light .mockup-container .bg-slate-900\/90,
body.light .mockup-container .bg-slate-900\/60 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

body.light .mockup-container span {
  color: #1e293b !important;
}

body.light .mockup-container .text-cyan-400 {
  color: #0284c7 !important;
}

body.light .mockup-container .text-emerald-400 {
  color: #059669 !important;
}

/* Modal in Light Mode */
body.light #project-modal .glass-card {
  background: #ffffff !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

body.light #close-modal-btn {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

body.light #close-modal-btn:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Footer in Light Mode */
body.light footer {
  background-color: #f1f5f9 !important;
  border-top-color: #e2e8f0 !important;
}

body.light footer h4 {
  color: #0f172a !important;
}

body.light footer p,
body.light footer li,
body.light footer a {
  color: #334155 !important;
}

body.light footer a:hover {
  color: #0284c7 !important;
}

/* Secondary Buttons in Light Mode */
body.light .btn-secondary {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.light .btn-secondary:hover {
  background-color: #f8fafc !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

/* Dynamic Square Logo in Light Mode (Hero Brand Logo) */
body.light .dynamic-brand-square {
  filter: drop-shadow(0 18px 40px rgba(0, 114, 255, 0.2)) !important;
}

body.light .hero-brand-logo {
  filter: drop-shadow(0 20px 40px rgba(0, 114, 255, 0.22)) !important;
  transform: scale(1.05);
  transform-origin: center center;
  transition: transform 0.4s ease, filter 0.4s ease;
}

@media (min-width: 640px) {
  body.light .hero-brand-logo {
    transform: scale(1.10);
  }
}

@media (min-width: 1024px) {
  body.light .hero-brand-logo {
    transform: scale(1.15);
  }
}

body.light .hero-brand-logo:hover {
  transform: scale(1.20) !important;
}

/* Primary Button text remains white */
.btn-primary,
body.light .btn-primary,
body.dark .btn-primary {
  color: #ffffff !important;
}

body.light .btn-primary span,
body.light .btn-primary i {
  color: #ffffff !important;
}

/* Method Steps in Light Mode */
body.light #metodologia .text-cyan-400\/40 {
  color: #38bdf8 !important;
}

/* Background Animated Grid & Tech Canvas */
#tech-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
}

body.light .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(2, 132, 199, 0.05) 1px, transparent 1px);
}

/* Ambient Radial Glows */
.ambient-glow-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.15) 0%, rgba(0, 114, 255, 0.05) 50%, transparent 70%);
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-glow-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 114, 255, 0.12) 0%, rgba(99, 102, 241, 0.04) 50%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
}

/* Animated Border Gradient */
.border-gradient-wrapper {
  position: relative;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.4), rgba(0, 114, 255, 0.1), rgba(56, 189, 248, 0.3));
  padding: 1px;
}

.border-gradient-inner {
  border-radius: calc(1.25rem - 1px);
}

/* Neon Pulse Keyframes */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.65), 0 0 50px rgba(0, 114, 255, 0.3);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

.animate-float {
  animation: floatSlow 6s ease-in-out infinite;
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(1000%);
  }
}

.scanline-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00D2FF, transparent);
  animation: scanline 4s linear infinite;
  opacity: 0.7;
}

/* Circuit Line Nodes (Echoing the logo style) */
.circuit-dot {
  width: 10px;
  height: 10px;
  background: #00D2FF;
  border-radius: 50%;
  box-shadow: 0 0 12px #00D2FF, 0 0 20px #0072FF;
  position: relative;
}

.circuit-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 1px solid rgba(0, 210, 255, 0.5);
  border-radius: 50%;
}

/* Badge styles */
.badge-tech {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Project Cards Hover Tilt & Shine */
.project-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  transform: translateY(-6px);
}

body.dark .project-card:hover {
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 20px 40px -15px rgba(0, 210, 255, 0.18);
}

body.light .project-card:hover {
  border-color: #0072FF !important;
  box-shadow: 0 0 35px rgba(0, 114, 255, 0.35), 0 20px 45px -10px rgba(0, 114, 255, 0.25) !important;
}

/* Project Mockup UI Container */
.mockup-container {
  background: linear-gradient(145deg, #0b1120 0%, #070a12 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.85rem;
  position: relative;
  overflow: hidden;
}

body.light .mockup-container {
  background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

/* Modal styles */
.modal-backdrop {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.5), 0 0 45px rgba(0, 114, 255, 0.3);
  transform: translateY(-2px);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.25s ease;
}

body.dark .btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
}

body.dark .btn-secondary:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

body.light .btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: rgba(2, 132, 199, 0.3);
}

body.light .btn-secondary:hover {
  background: #f8fafc;
  border-color: #0284c7;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.15);
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(6deg);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Brand Banner Responsive & Adaptive Sizing */
.brand-logo-container {
  display: flex;
  align-items: center;
  position: relative;
}

.dynamic-brand-banner {
  transition: transform 0.3s ease, height 0.3s ease, filter 0.3s ease;
  object-fit: contain;
}

/* Navbar Logo Sizing with compensation for canvas aspect ratios */
.navbar-brand-logo {
  width: auto;
  display: block;
}

body.dark .navbar-brand-logo {
  height: 66px; /* Mobile height */
  max-width: 350px;
  margin-top: -6px;
  margin-bottom: -6px;
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.3));
}

@media (min-width: 640px) {
  body.dark .navbar-brand-logo {
    height: 86px; /* Slightly larger, crisp and impactful */
    max-width: 420px;
    margin-top: -9px;
    margin-bottom: -9px;
  }
}

body.light .navbar-brand-logo {
  height: 36px; /* Slightly enlarged mobile height */
  max-width: 210px;
}

@media (min-width: 640px) {
  body.light .navbar-brand-logo {
    height: 44px; /* Slightly enlarged desktop height */
    max-width: 260px;
  }
}

/* Footer Logo Sizing */
.footer-brand-logo {
  width: auto;
}

body.dark .footer-brand-logo {
  height: 84px;
  max-width: 380px;
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.25));
}

body.light .footer-brand-logo {
  height: 42px;
  max-width: 250px;
}

/* Interactive Tabs */
.filter-btn.active {
  background: linear-gradient(135deg, #00D2FF 0%, #0072FF 100%);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}
