:root {
  --primary-color: #0d6efd;
  --bg-color: #030712;
  --text-color: #f8f9fa;
  --card-bg: #111827;
  --border-color: #374151;
  --navbar-bg: rgba(3, 7, 18, 0.7);
  --section-bg: rgba(3, 7, 18, 0.5);
  --muted-text: #adb5bd;
}

[data-bs-theme="light"] {
  --bg-color: #f8f9fa;
  --text-color: #030712;
  --card-bg: #ffffff;
  --border-color: #dee2e6;
  --navbar-bg: rgba(248, 249, 250, 0.7);
  --section-bg: rgba(248, 249, 250, 0.5);
  --muted-text: #495057;
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

#neural-network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

.navbar {
  background-color: var(--navbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.hero-section {
  position: relative;
}

/* --- NUEVA SECCIÓN DE SERVICIOS --- */
.service-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 123, 253, 0.1);
}

.service-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--muted-text);
  font-weight: 500;
}

/* --- PROYECTOS Y CONTACTO --- */
.projects-section,
.contact-section,
footer {
  background-color: var(--section-bg);
  backdrop-filter: blur(5px);
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-section .form-control {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-color);
}

.social-links .social-icon {
  font-size: 2rem;
  color: var(--text-color);
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-links .social-icon:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* --- GALERÍA DE CARTELERÍA --- */
.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-grid .card {
  background: transparent;
}

/* Modal image styling */
#galleryModal img,
#modalImage {
  max-height: 80vh;
  object-fit: contain;
}

/* Galería: forzar cuadros uniformes (1:1) y recorte consistente */
.gallery-grid .card {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  display: block;
}

.gallery-grid .card .gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ajustes: centrado y separación uniforme */
.gallery-grid {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.gallery-grid .col-sm-6,
.gallery-grid .col-md-4,
.gallery-grid .col-lg-3 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

@media (max-width: 576px) {
  .service-icon {
    font-size: 2.2rem;
  }
  .hero-section {
    padding: 3rem 0;
  }
}

/* Reset para anchors que envuelven tarjetas de servicio */
.service-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.service-link .service-card {
  text-decoration: none;
  color: inherit;
}
.service-link:hover .service-card {
  text-decoration: none;
}

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
  color: #FFF;
}

@media (max-width: 576px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 25px;
  }
}
/* --- ASISTENTE DE IA (IA WIZARD) --- */
.ia-wizard-card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color) !important;
  border-radius: 20px;
}

[data-bs-theme="dark"] .ia-wizard-card {
  background: rgba(17, 24, 39, 0.8);
}

.ia-wizard-card .form-control, 
.ia-wizard-card .form-select {
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.75rem 1rem;
}

[data-bs-theme="dark"] .ia-wizard-card .form-control,
[data-bs-theme="dark"] .ia-wizard-card .form-select {
  background-color: rgba(255, 255, 255, 0.05);
}

.watermark-badge {
  position: absolute;
  top: 20px;
  right: -10px;
  background: var(--primary-color);
  color: white;
  padding: 5px 20px;
  font-weight: 800;
  font-size: 1.2rem;
  transform: rotate(15deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
  border-radius: 4px;
}

.design-preview-container {
  overflow: hidden;
  border-radius: 15px;
}

#ia-generated-img {
  transition: transform 0.5s ease;
}

#ia-generated-img:hover {
  transform: scale(1.02);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#ia-output {
  animation: fadeIn 0.8s ease forwards;
}

/* --- WIZARD STEP INDICATORS --- */
.wizard-steps {
  margin-bottom: 2rem;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  background: var(--border-color);
  color: var(--muted-text);
  transition: all 0.3s ease;
  position: relative;
}

.step-indicator.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
}

.step-indicator:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: 20px;
  height: 3px;
  background: var(--border-color);
  transform: translateY(-50%);
}

.step-indicator.active:not(:last-child)::after {
  background: var(--primary-color);
}

/* Wizard step transitions */
.wizard-step {
  animation: fadeIn 0.4s ease forwards;
}

/* Validation styles */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Checkbox styling for IA wizard */
.ia-wizard-card .form-check-input {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.15em;
  border: 2px solid var(--border-color);
  background-color: transparent;
}

.ia-wizard-card .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.ia-wizard-card .form-check-label {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Large input styling */
.ia-wizard-card .form-control-lg {
  font-size: 1.1rem;
  padding: 1rem 1.25rem;
}

/* Better button hover states */
.ia-wizard-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.ia-wizard-card .btn-outline-secondary:hover {
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .step-indicator {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  
  .step-indicator:not(:last-child)::after {
    width: 12px;
  }
  
  .ia-wizard-card {
    padding: 1.5rem !important;
  }
}

/* --- PORTFOLIO SECTION --- */
.portfolio-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 110, 253, 0.2);
  border-color: var(--primary-color);
}

.portfolio-img-wrapper {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-bg) 0%, #1f2937 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-placeholder {
  color: var(--primary-color);
  opacity: 0.5;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-placeholder {
  transform: scale(1.1);
  opacity: 0.8;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-content {
  border-top: 1px solid var(--border-color);
  background: linear-gradient(to bottom, transparent, rgba(0, 110, 253, 0.05));
}

.portfolio-content .badge {
  font-weight: 500;
  padding: 0.5em 1em;
  border-radius: 50px;
}


/* --- PORTFOLIO IMAGES --- */
.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img {
  transform: scale(1.05);
}

