/* === VARIABLES CSS OPTIMIZADAS === */
:root {
  --primary-color: #ffcc00;
  --primary-dark: #e6b800;
  --primary-light: #ffdd4d;
  --secondary-color: #6c63ff;
  --accent-color: #ff6b6b;

  --bg-dark: #0a0a0a;
  --bg-darker: #050505;
  --bg-card: rgba(20, 20, 20, 0.95);
  --bg-section: rgba(15, 15, 15, 0.92);
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --text-light: #ffffff;
  --text-bright: #f8f9fa;
  --text-paragraph: #e9ecef;
  --text-muted: #adb5bd;
  --text-warning: #ffd43b;

  --border-radius: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(255, 204, 0, 0.4);
  --shadow-glow-blue: 0 0 30px rgba(108, 99, 255, 0.4);

  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #4a44c9 100%);
  --gradient-dark: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
}

/* === RESET Y BASE OPTIMIZADOS === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background: rgb(0 0 0 / 30%);
  overflow-x: hidden;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TIPOGRAFÍA CON ALTO CONTRASTE === */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-light);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-warning) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-light);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-light);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-light);
}

h5 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-light);
}

h6 {
  font-size: 1rem;
  color: var(--text-muted);
}

p {
  color: var(--text-paragraph);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-weight: 400;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-bright);
  font-weight: 300;
}

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

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

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

/* === MATRIX BACKGROUND OPTIMIZADO === */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: var(--gradient-dark);
  pointer-events: none;
  opacity: 0.9;
}

.matrix-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 204, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(108, 99, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 107, 107, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.3;
}

/* === LAYOUT Y SECCIONES === */
section {
  position: relative;
  /* background: var(--bg-section);
  backdrop-filter: blur(10px); */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1.5rem;
}

/* === NAVBAR MEJORADO === */
.navbar {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 204, 0, 0.3);
  padding: 0.75rem 0;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.98) !important;
  box-shadow: var(--shadow-lg);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: var(--transition-fast);
}

.navbar-brand:hover {
  color: var(--primary-light) !important;
  transform: translateY(-1px);
}

.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  background: rgba(255, 204, 0, 0.1);
  transform: translateY(-1px);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover::before {
  width: 80%;
}

.perfil-img {
  width: 45px;
  height: 45px;
  border: 2px solid var(--primary-color);
  transition: var(--transition-normal);
  box-shadow: var(--shadow-glow);
}

.perfil-img:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary-light);
  box-shadow: 0 0 25px rgba(255, 204, 0, 0.6);
}

/* === HERO SECTION MEJORADO === */
#hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.1);
  transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(10, 10, 10, 0.9) 0%,
      rgba(10, 10, 10, 0.7) 50%,
      rgba(10, 10, 10, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--text-light);
  max-width: 800px;
  padding: 0 2rem;
}

#nombre-completo {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease-out 0.3s forwards;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-warning) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 204, 0, 0.3);
}

#descripcion-profesion {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-bright);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease-out 0.6s forwards;
}

.hero-dinamico {
  margin: 2rem 0;
}

#hero-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
  min-height: 1.4em;
}

#hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-paragraph);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#hero-subtitle.show {
  opacity: 1;
  transform: translateY(0);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.9);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition-normal);
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 2rem;
}

.hero-control.next {
  right: 2rem;
}

.hero-control:hover {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-glow);
}

.hero-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 20;
}

.hero-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hero-indicator.active {
  background: var(--primary-color);
  transform: scale(1.3);
  box-shadow: var(--shadow-glow);
}

.hero-indicator:hover {
  background: var(--primary-light);
  transform: scale(1.2);
}

/* === CARDS MEJORADAS === */
.card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

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

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

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(255, 204, 0, 0.3);
}

.card-img-top {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 3px solid var(--primary-color);
  transition: var(--transition-normal);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  background: transparent;
}

.card-title {
  color: var(--text-light) !important;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-text {
  color: var(--text-paragraph) !important;
  line-height: 1.6;
}

.card ul {
  color: var(--text-paragraph);
  padding-left: 1.2rem;
}

.card ul li {
  color: var(--text-paragraph);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* === BOTONES MEJORADOS === */
.btn {
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.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;
}

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

.btn-warning {
  background: var(--gradient-primary);
  color: var(--bg-dark) !important;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: var(--bg-dark) !important;
}

.btn-outline-warning {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-warning:hover {
  background: var(--primary-color);
  color: var(--bg-dark) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-animado {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: slideInUp 0.8s ease-out 0.9s forwards;
}

.btn-animado:hover {
  transform: translateY(-3px) scale(1.02);
}

/* === SECCIONES ESPECÍFICAS === */
#perfil .card,
#experiencia .card,
#habilidades .card,
#proyectos .card,
#disenos .card,
#videos .card,
#informes .card,
#servicios .card,
#comentarios .card {
  background: var(--gradient-card);
  backdrop-filter: blur(15px);
}

#servicios .card-text {
  font-size: 0.95rem;
  color: var(--text-paragraph) !important;
}

#servicios img {
  max-height: 240px;
  object-fit: cover;
}

/* === FORMULARIOS MEJORADOS === */
.form-control {
  background: rgba(30, 30, 30, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  color: var(--text-light) !important;
  padding: 0.75rem 1rem;
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
}

.form-control:focus {
  background: rgba(40, 40, 40, 0.95) !important;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 204, 0, 0.25);
  color: var(--text-light) !important;
}

.form-floating label {
  color: var(--text-muted);
}

.form-floating>.form-control:focus~label {
  color: var(--primary-color);
}

/* === TARJETAS DE CONTACTO === */
.contact-card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-normal);
  backdrop-filter: blur(15px);
  height: 100%;
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.contact-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: rgba(255, 204, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary-color);
  transition: var(--transition-normal);
}

.contact-card:hover .contact-icon {
  background: var(--primary-color);
  color: var(--bg-dark);
  transform: scale(1.1);
}

/* === COMENTARIOS === */
#comentarios-container .card {
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#comentarios-container .card-body {
  background: transparent;
}

/* === FOOTER MEJORADO === */
footer {
  background: rgba(5, 5, 5, 0.98) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 204, 0, 0.3);
  color: var(--text-paragraph);
}

footer p {
  color: var(--text-muted);
  margin: 0;
}

/* === ANIMACIONES OPTIMIZADAS === */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

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

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* === UTILIDADES DE CONTRASTE === */
.high-contrast {
  color: var(--text-light) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.contrast-border {
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* === SCROLLBAR PERSONALIZADO === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

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

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

/* === MEDIA QUERIES OPTIMIZADAS === */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .hero-content {
    padding: 0 1rem;
  }

  #nombre-completo {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  #descripcion-profesion {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .hero-control {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .hero-control.prev {
    left: 1rem;
  }

  .hero-control.next {
    right: 1rem;
  }

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

  .btn:hover {
    transform: translateY(-2px);
  }

  .navbar-collapse {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .container {
    padding: 0 0.75rem;
  }

  #hero {
    min-height: 500px;
  }

  .hero-control {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }

  .card-body {
    padding: 1.25rem;
  }
}

/* === ACCESIBILIDAD Y REDUCCIÓN DE MOVIMIENTO === */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card::before,
  .btn::before {
    display: none;
  }
}

/* === MODAL MEJORADO === */
.modal-content {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: var(--border-radius-lg);
  color: var(--text-light);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close {
  filter: invert(1);
}

/* === LOADER OPTIMIZADO === */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease-out;
}

.loader-content {
  text-align: center;
  color: var(--text-light);
}

.loader-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  border-radius: 20px;
  animation: pulse 2s ease-in-out infinite;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-light);
  opacity: 0.9;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* === ESTADOS DE CARGA === */
.loading-state {
  opacity: 0.7;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* === EFECTOS ESPECIALES === */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

/* === ALERTAS Y NOTIFICACIONES === */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.alert-center {
  background: var(--gradient-card);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
  text-align: center;
  border-left: 4px solid var(--primary-color);
  animation: slideInUp 0.4s ease-out;
}

/* === OPTIMIZACIONES DE RENDIMIENTO === */
.will-change {
  will-change: transform, opacity;
}

.transform-gpu {
  transform: translateZ(0);
}

.backface-hidden {
  backface-visibility: hidden;
}

/* === ESTILOS PARA reCAPTCHA === */
.g-recaptcha {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

/* Dark theme para reCAPTCHA */
.grecaptcha-badge {
  visibility: visible !important;
}

/* === ESTADOS DE UI MEJORADOS === */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled:hover {
  transform: none !important;
}

/* Spinner animations */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Estados de carga mejorados */
.loading-state {
  position: relative;
  pointer-events: none;
}

.loading-state::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: inherit;
}

/* Transiciones suaves para elementos de autenticación */
#auth-section {
  transition: all 0.3s ease;
}

#usuario-info {
  transition: all 0.3s ease;
}

/* Mejoras para el textarea de comentarios */
#comentario-texto {
  resize: vertical;
  min-height: 100px;
  transition: all 0.3s ease;
}

#comentario-texto:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 204, 0, 0.25);
}

/* === RESPONSIVE PARA reCAPTCHA === */
@media (max-width: 480px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
  }
}

/* === ANIMACIONES DE ESTADO === */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-scale {
  animation: fadeInScale 0.3s ease-out;
}

/* === ESTILOS PARA ERRORES Y ADVERTENCIAS === */
.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: var(--text-warning);
}

.alert-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #51cf66;
}

.glow-text-animated {
  background: linear-gradient(90deg, #fff, #ffcc00, #fff);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 3s linear infinite, pulseGlow 2.5s ease-in-out infinite;
}


@keyframes pulseGlow {

  0%,
  100% {
    text-shadow:
      0 0 5px #ffcc00,
      0 0 10px #ffcc00,
      0 0 20px #ffd84d,
      0 0 30px #ffe680;
    opacity: 1;
  }

  50% {
    text-shadow:
      0 0 2px #ffcc00,
      0 0 5px #ffcc00,
      0 0 10px #ffd84d,
      0 0 15px #ffe680;
    opacity: 0.8;
  }
}


@keyframes shine {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}


/* === ESTILOS PARA IMPRESIÓN === */
@media print {

  .navbar,
  .hero-control,
  .hero-indicators,
  footer {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .card {
    background: white !important;
    color: black !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
}

/* === NAVBAR HIDE-ON-SCROLL === */
.navbar {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
}

.navbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.navbar-visible {
  transform: translateY(0);
  opacity: 1;
}

/* === IMPROVED COMMENT STYLES === */
.text-muted {
  color: #9ca3af !important;
  /* Color gris más visible */
}

#comentarios-container .card-text {
  line-height: 1.6;
}

#comentarios-container img.rounded-circle {
  object-fit: cover;
  border: 2px solid rgba(255, 204, 0, 0.3);
}

/* === PERFORMANCE OPTIMIZATIONS === */
.card,
.btn,
.hero-slide,
.nav-link {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimized animations */
@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

/* === FIX: Outline Buttons Borders === */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
  border-width: 2px !important;
  border-style: solid !important;
}

.btn-outline-primary {
  border-color: #0d6efd !important;
  color: #0d6efd !important;
}

.btn-outline-primary:hover {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.btn-outline-success {
  border-color: #25d366 !important;
  color: #25d366 !important;
}

.btn-outline-success:hover {
  background-color: #25d366 !important;
  color: #fff !important;
}

.btn-outline-info {
  border-color: #0dcaf0 !important;
  color: #0dcaf0 !important;
}

.btn-outline-info:hover {
  background-color: #0dcaf0 !important;
  color: #000 !important;
}

.btn-outline-danger {
  border-color: #dc3545 !important;
  color: #dc3545 !important;
}

.btn-outline-danger:hover {
  background-color: #dc3545 !important;
  color: #fff !important;
}