/* ============================================
   ESTILOS GENERALES
   ============================================ */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px 0;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
}

.card-hero {
  background: white;
  border: none;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 600px;
  width: 100%;
}

.card-hero:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.card-header-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 20px;
  text-align: center;
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo-image {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 200px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}

.card-title-hero {
  color: white;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.card-body-hero {
  padding: 40px 30px;
  text-align: center;
  color: #333;
}

.card-text-hero {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.8;
  color: #555;
  margin-bottom: 30px;
}

.btn-group-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .btn-group-hero {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }
}

.btn-hero {
  padding: 12px 30px;
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 180px;
}

.btn-primary-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.btn-primary-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.btn-secondary-hero {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary-hero:hover {
  background: #667eea;
  color: white;
  text-decoration: none;
  transform: translateY(-3px);
}

/* ============================================
   RESPONSIVIDAD
   ============================================ */

@media (max-width: 768px) {
  .hero-section {
    padding: 30px 15px;
    min-height: auto;
  }

  .card-header-hero {
    padding: 30px 15px;
  }

  .card-body-hero {
    padding: 30px 20px;
  }

  .card-title-hero {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .card-text-hero {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .card-header-hero {
    padding: 20px 15px;
  }

  .card-body-hero {
    padding: 20px 15px;
  }

  .card-title-hero {
    font-size: 1.3rem;
  }

  .btn-hero {
    min-width: 100%;
    padding: 10px 20px;
  }

  .btn-group-hero {
    gap: 10px;
  }
}

/* ============================================
   TABLA Y LISTADOS
   ============================================ */

.table-responsive {
  border-radius: 10px;
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  border: none;
}

.table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
  color: #333;
  margin-bottom: 8px;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: white !important;
  transition: transform 0.3s ease;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s ease;
  margin-left: 10px;
  font-weight: 500;
}

.nav-link:hover {
  color: white !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* ============================================
   PÁGINA DE LISTADO
   ============================================ */

.list-page-container {
  padding: 30px 0;
  min-height: 100vh;
}

.list-title {
  color: #333;
  font-weight: 700;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

.filter-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.filter-label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.btn-new {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-new:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.table-container {
  background: white;
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table {
  color: #333;
}

.table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table thead th {
  color: white;
  font-weight: 600;
  border: none;
  padding: 15px;
  font-size: 0.95rem;
}

.table tbody td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.95rem;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

.btn-action {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-action:hover {
  transform: scale(1.05);
}

.empty-state {
  background: white;
  padding: 50px 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.empty-state-icon {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 20px;
}

.empty-state h4 {
  color: #333;
  margin-bottom: 15px;
  font-weight: 700;
}

.empty-state p {
  color: #666;
  margin-bottom: 20px;
}

/* ============================================
   VISTA DE FORMULARIO
   ============================================ */

.form-container {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 30px auto;
}

.form-title {
  color: #333;
  font-weight: 700;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  outline: none;
}

.btn-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 8px;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* ============================================
   RESPONSIVIDAD AVANZADA
   ============================================ */

@media (max-width: 768px) {
  .filter-section {
    padding: 20px;
  }

  .filter-label {
    font-size: 0.9rem;
  }

  .list-page-container {
    padding: 20px 0;
  }

  .btn-new {
    width: 100%;
    margin-top: 15px;
  }

  .table thead {
    font-size: 0.85rem;
  }

  .table tbody td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }

  .btn-action {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .form-container {
    padding: 25px 20px;
    margin: 20px 10px;
  }
}

@media (max-width: 576px) {
  .filter-section {
    padding: 15px;
  }

  .list-title {
    font-size: 1.3rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .table thead th {
    padding: 10px;
  }

  .table tbody td {
    padding: 8px 5px;
  }

  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .btn-action {
    width: 100%;
  }

  .form-container {
    padding: 20px 15px;
    margin: 15px 10px;
  }

  .empty-state-icon {
    font-size: 3rem;
  }
}

/* ============================================
   ESTILOS ADICIONALES
   ============================================ */

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 0;
}

/* Secciones con fondo blanco */
.container,
.list-page-container,
.form-container {
  background: transparent;
}

/* Badges personalizados */
.badge {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.bg-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Enfoque en elementos interactivos */
button:focus,
a:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-hero {
  animation: fadeIn 0.6s ease-out;
}
