/*
 * CodigoConstructor - Estilos Personalizados
 * Tema: Ingeniería Civil + Tecnología
 */

/* ===== VARIABLES CSS ===== */
:root {
  /* Colores principales */
  --primary-color: #0d6efd;
  --primary-light: #6ea8fe;
  --primary-dark: #0a58ca;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  
  /* Colores de fondo */
  --bg-primary-soft: rgba(13, 110, 253, 0.1);
  --bg-success-soft: rgba(25, 135, 84, 0.1);
  --bg-warning-soft: rgba(255, 193, 7, 0.1);
  
/* Tipografía */
--font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Espaciado */
  --section-padding: 5rem 0;
  --container-padding: 1rem;
  
  /* Sombras */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transiciones */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ===== ESTILOS BASE ===== */
body {
  font-family: var(--font-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
  color: #1f2937;
}

/* Mejorar contraste general */
.text-muted {
  color: #6b7280 !important;
}

.text-primary {
  color: #1e3a8a !important;
}

.bg-primary {
  background-color: #1e3a8a !important;
}

.bg-primary-soft {
  background-color: rgba(30, 58, 138, 0.1) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.05em;
}

/* ===== UTILIDADES ===== */
.bg-primary-soft { background-color: var(--bg-primary-soft) !important; }
.bg-success-soft { background-color: var(--bg-success-soft) !important; }
.bg-warning-soft { background-color: var(--bg-warning-soft) !important; }

/* Badge personalizado para hero */
.badge {
  font-weight: 600;
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.badge.bg-primary-soft {
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.3);
  backdrop-filter: blur(10px);
}

.hover-lift {
  transition: transform var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-primary {
  transition: color var(--transition-fast);
}

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

/* ===== NAVEGACIÓN ===== */
.navbar {
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(30, 58, 138, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: var(--font-primary);
  padding: 1rem 0;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
  color: #1e3a8a !important;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: -0.025em;
}

.navbar-brand img {
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav {
  gap: 0.5rem;
}

.navbar-nav .nav-link {
  color: #374151 !important;
  font-weight: 500;
  font-family: var(--font-primary);
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
  letter-spacing: 0.025em;
}

.navbar-nav .nav-link:hover {
  color: #1e3a8a !important;
  background-color: rgba(30, 58, 138, 0.08);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: #1e3a8a !important;
  background-color: rgba(30, 58, 138, 0.12);
  font-weight: 600;
}

.navbar-nav .nav-link i {
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  transition: transform var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #1e3a8a;
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

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

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://images.unsplash.com/photo-1590579491624-f98f36d4c763?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center/cover;
  opacity: 0.15;
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 58, 138, 0.6) 50%, rgba(59, 130, 246, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--font-size-4xl);
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

/* Estilos más específicos para forzar el cambio */
.hero-section .hero-content .hero-title .text-primary,
.hero-section h1.display-4 .text-primary,
.display-4 .text-primary {
  color: #fbbf24 !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 900 !important;
  position: relative !important;
  display: inline-block !important;
  text-shadow: none !important;
  animation: none !important;
  filter: none !important;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(255, 255, 0, 1), 0 0 30px rgba(255, 255, 0, 1), 0 0 40px rgba(255, 255, 0, 0.8);
  }
  to {
    text-shadow: 0 0 30px rgba(255, 255, 0, 1), 0 0 45px rgba(255, 255, 0, 1), 0 0 60px rgba(255, 255, 0, 0.9);
  }
}

/* Eliminar subrayado */
.hero-section .hero-content .hero-title .text-primary::after,
.hero-section h1.display-4 .text-primary::after,
.display-4 .text-primary::after {
  display: none !important;
}

@keyframes underlineGlow {
  from {
    box-shadow: 0 0 25px rgba(255, 255, 0, 1), 0 2px 8px rgba(0, 0, 0, 0.5);
  }
  to {
    box-shadow: 0 0 35px rgba(255, 255, 0, 1), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

.hero-description {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  max-width: 600px;
  font-weight: 500;
  line-height: 1.7;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-hero-img {
  border: 8px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.floating-element {
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

.floating-1 {
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.floating-2 {
  top: 60%;
  right: 5%;
  animation-delay: 1s;
}

.floating-3 {
  bottom: 20%;
  left: 5%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===== FEATURES CARDS ===== */
.feature-card {
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* ===== BOTONES PERSONALIZADOS ===== */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.875rem 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-size: var(--font-size-base);
  letter-spacing: 0.025em;
  text-transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

/* Estilos específicos de botones */
.btn-primary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e3a8a;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
  color: #1e3a8a;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.btn-floating {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.btn-floating:hover {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
}

/* ===== FORMULARIOS ===== */
.form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ===== MODAL PERSONALIZADO ===== */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-radius: 15px 15px 0 0;
  border-bottom: none;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}

footer .text-muted {
  opacity: 0.8;
}

footer .hover-primary:hover {
  color: var(--primary-light) !important;
  transform: translateY(-2px);
}

/* ===== ANIMACIONES PERSONALIZADAS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
    text-align: center;
  }
  
  .floating-element {
    display: none;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .display-6 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
  
  .feature-card {
    margin-bottom: 1rem;
  }
}

/* ===== SCROLL BAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* ===== BADGES PERSONALIZADOS ===== */
.badge {
  font-weight: 500;
  border-radius: 20px;
}

/* ===== CARDS ESPECIALES ===== */
.card-hover {
  transition: all var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===== GRADIENTES ===== */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

.gradient-success {
  background: linear-gradient(135deg, var(--success-color), #20c997);
}

.gradient-warning {
  background: linear-gradient(135deg, var(--warning-color), #fd7e14);
}

/* ===== EFECTOS DE TEXTO ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--success-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ICONOS ===== */
.icon-lg {
  font-size: 3rem;
}

.icon-xl {
  font-size: 4rem;
}

.icon-2xl {
  font-size: 5rem;
}

/* ===== ESPACIADO PERSONALIZADO ===== */
.py-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.py-7 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.py-8 { padding-top: 6rem !important; padding-bottom: 6rem !important; }

.my-6 { margin-top: 4rem !important; margin-bottom: 4rem !important; }
.my-7 { margin-top: 5rem !important; margin-bottom: 5rem !important; }
.my-8 { margin-top: 6rem !important; margin-bottom: 6rem !important; }

/* ===== OVERRIDE ESPECÍFICO PARA "DEL FUTURO" ===== */
.hero-section span.text-primary,
.hero-section .text-primary,
span.text-primary.d-block,
.text-primary.d-block {
  color: #fbbf24 !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 900 !important;
  position: relative !important;
  display: inline-block !important;
  text-shadow: none !important;
  animation: none !important;
  filter: none !important;
}

/* Eliminar cualquier pseudo-elemento de subrayado */
.hero-section span.text-primary::after,
.hero-section .text-primary::after,
span.text-primary.d-block::after,
.text-primary.d-block::after {
  display: none !important;
}

/* ===== DROPDOWNS NAVEGACIÓN ===== */
.dropdown-menu {
  border: none;
  border-radius: 12px;
  padding: 0.75rem;
  margin-top: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  font-family: var(--font-primary);
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  font-weight: 500;
  color: #374151;
  letter-spacing: 0.025em;
}

.dropdown-item:hover {
  background-color: rgba(30, 58, 138, 0.08);
  color: #1e3a8a;
  transform: translateX(4px);
}

.dropdown-item i {
  color: #6b7280;
  transition: color var(--transition-fast);
}

.dropdown-item:hover i {
  color: #1e3a8a;
}

/* ===== FORMULARIOS DE CONTACTO ===== */
.form-control {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
  transform: translateY(-1px);
}

.form-select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-select:focus {
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.form-label {
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: var(--font-primary);
}

/* ===== BOTONES REDES SOCIALES ===== */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Colores específicos por red social */
.social-facebook {
  background: linear-gradient(135deg, #1877f2, #166fe5);
}

.social-facebook:hover {
  background: linear-gradient(135deg, #166fe5, #1463d3);
  color: white;
}

.social-instagram {
  background: linear-gradient(135deg, #e4405f, #833ab4, #fcb045);
}

.social-instagram:hover {
  background: linear-gradient(135deg, #d6336c, #8a2387, #f09433);
  color: white;
}

.social-tiktok {
  background: linear-gradient(135deg, #000000 0%, #ff0050 30%, #00f2ea  70%, #ff0050 100%);
  position: relative;
}

.social-tiktok::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff0050, #00f2ea, #ff0050);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.social-tiktok:hover::after {
  opacity: 0.8;
}

.social-tiktok:hover {
  background: linear-gradient(135deg, #1a1a1a 0%, #ff0050 30%, #00f2ea 70%, #ff0050 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(255, 0, 80, 0.4);
}

.social-tiktok i {
  position: relative;
  z-index: 1;
  color: white;
  text-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.social-linkedin {
  background: linear-gradient(135deg, #0077b5, #005885);
}

.social-linkedin:hover {
  background: linear-gradient(135deg, #005885, #004670);
  color: white;
}

.social-youtube {
  background: linear-gradient(135deg, #ff0000, #cc0000);
}

.social-youtube:hover {
  background: linear-gradient(135deg, #cc0000, #990000);
  color: white;
}

/* Modal de Formulario Temporal */
.modal-content {
  backdrop-filter: blur(10px);
}

.bg-primary-soft {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

#formTempModal .modal-body {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

#formTempModal .fa-cogs {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#formTempModal .btn-success {
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
  transition: all 0.3s ease;
}

#formTempModal .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.4);
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Logo específico */
.navbar-brand img {
  max-height: 40px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Etiqueta HTML - solo color para los brackets */
.tag-bracket {
  color: #6b7280; /* Gris para < /> */
}

/* Aumentar tamaño de la marca */
.navbar-brand {
  font-size: 1.4rem !important;
}
