/* Primary Colors - SEDACAJ Institutional */
:root {
  --primary-color: #0099CC;
  --primary-dark: #0077AA;
  --primary-light: #33AADD;
  --secondary-color: #FF6B35;
  --success-color: #28A745;
  --warning-color: #FFC107;
  --danger-color: #DC3545;
  --info-color: #17A2B8;
  --light-color: #F8F9FA;
  --dark-color: #343A40;
  --white: #FFFFFF;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
}

/* Base Styles */
body {
  background-color: var(--light-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Header Styles - SEDACAJ Institutional Colors */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: relative;
  min-height: 90px;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="0.8" fill="rgba(255,255,255,0.08)"/></svg>');
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.header-logo {
  height: 50px;
  width: auto;
  flex-shrink: 0;
}

.header-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.header-title {
  text-align: center;
}

.header h1 {
  margin: 0;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1.3;
}

.header h1 .main-title {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.header h1 .sub-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  opacity: 0.9;
}

.header-info {
  display: none; /* Ocultar información de contacto */
}

/* Card Styles - Enhanced */
.card {
  border-radius: 15px;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-body {
  padding: 2rem;
}

/* Button Styles - Touch Friendly with SEDACAJ Colors */
.btn {
  border-radius: 30px;
  font-weight: 600;
  padding: 12px 30px;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  min-height: 48px; /* Touch target minimum */
}

.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;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(0,153,204,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #005588);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,153,204,0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(0,153,204,0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--primary-dark), #005588);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,153,204,0.4);
}

/* Voting Button Specific Styles */
.btn-vote {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(0,153,204,0.3);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 15px 25px;
  border-radius: 30px;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-vote:hover {
  background: linear-gradient(135deg, var(--primary-dark), #005588);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,153,204,0.4);
  color: white;
}

.btn-vote::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;
}

.btn-vote:hover::before {
  left: 100%;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
  color: white;
  box-shadow: 0 4px 15px rgba(108,117,125,0.3);
}

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.btn-link:hover {
  background-color: rgba(0,153,204,0.1);
  color: var(--primary-dark);
}

/* Form Styles - Enhanced */
.form-control {
  border-radius: 25px;
  border: 2px solid var(--gray-200);
  padding: 15px 20px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  min-height: 48px; /* Touch target minimum */
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0,153,204,0.25);
  transform: scale(1.02);
}

/* Actions Container */
.actions {
  text-align: center;
  margin-top: 25px;
}

/* Voter Info Card */
.voter-info {
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.voter-info h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.voter-info .info-item {
  display: flex;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.voter-info .info-label {
  font-weight: 600;
  color: var(--gray-700);
  min-width: 100px;
  margin-right: 10px;
}

.voter-info .info-value {
  color: var(--gray-900);
}

/* Voting Cards Grid */
.voting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.voting-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.voting-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: var(--primary-color);
}

.voting-card h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.voting-card .description {
  color: var(--gray-600);
  margin-bottom: 20px;
  font-size: 1rem;
}

.voting-card .card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Alert Styles */
.alert {
  border-radius: 15px;
  border: none;
  padding: 20px;
  font-weight: 500;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #a8dadc);
  color: #0c5460;
}

/* Modal Enhancements */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 15px 15px 0 0;
  padding: 20px;
}

.modal-title {
  font-weight: 600;
}

.btn-close {
  filter: invert(1);
}

.modal-body {
  padding: 25px;
}

/* List Group Enhancements */
.list-group-item {
  border: none;
  border-radius: 10px !important;
  margin-bottom: 10px;
  padding: 15px 20px;
  background: var(--gray-100);
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background: var(--gray-200);
  transform: translateX(5px);
}

.list-group-item strong {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.list-group-item .text-muted {
  color: var(--gray-600) !important;
  font-size: 0.95rem;
}

/* Summary Page Enhancements */
.summary-section {
  background: white;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.summary-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: 10px;
}

.summary-item {
  display: flex;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.summary-label {
  font-weight: 600;
  color: var(--gray-700);
  min-width: 120px;
  margin-right: 10px;
}

.summary-value {
  color: var(--gray-900);
  flex: 1;
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--gray-600);
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 15px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  
  .header-title {
    order: 2;
  }
  
  .header-logo {
    order: 1;
    height: 35px;
  }
  
  .header-info {
    order: 3;
    align-items: center;
    min-width: auto;
  }
  
  .header h1 {
    font-size: 1.2rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 15px;
    font-size: 1.1rem;
  }
  
  .form-control {
    font-size: 1.2rem;
    padding: 18px 20px;
  }
  
  .voting-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .voting-card {
    padding: 20px;
  }
  
  .voter-info {
    padding: 15px;
  }
  
  .voter-info .info-item {
    flex-direction: column;
    margin-bottom: 12px;
  }
  
  .voter-info .info-label {
    min-width: auto;
    margin-bottom: 5px;
    font-size: 0.9rem;
  }
  
  .summary-item {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .summary-label {
    min-width: auto;
    margin-bottom: 5px;
    font-size: 0.9rem;
  }
  
  .modal-dialog {
    margin: 10px;
  }
  
  .modal-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .header {
    padding: 12px 15px;
  }
  
  .header h1 {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .voting-card {
    padding: 15px;
  }
  
  .btn {
    padding: 18px;
    font-size: 1.2rem;
  }
  
  .form-control {
    padding: 20px;
  }
  
  .voter-info {
    padding: 12px;
  }
  
  .summary-section {
    padding: 20px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header-logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .header {
    background: var(--primary-color) !important;
    -webkit-print-color-adjust: exact;
  }
  
  .btn {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles for Keyboard Navigation */
.btn:focus,
.form-control:focus,
.btn-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
    padding: 15px 25px;
  }
  
  .form-control {
    min-height: 48px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .voting-card:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
}
