:root {
  /* Paleta de colores basada en el PDF */
  --primary: #19507F;
  /* Color principal más oscuro */
  --primary-light: #649FBE;
  /* Color principal más claro */
  --primary-dark: #111011;
  /* Color oscuro para texto */
  --secondary: #195C9A;
  /* Color secundario */
  --accent: #1C68A9;
  /* Color de acento */
  --light: #f8f9fa;
  --gray: #7f8c8d;
  --success: #2ecc71;
  --danger: #e74c3c;
  --facebook: #1877f2;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  --radius: 15px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  color: var(--primary-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.eventos-header {
  text-align: center;
  padding: 60px 20px 30px;
  color: var(--primary-dark);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.eventos-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.eventos-header h1 {
  font-size: 2.5rem;
  margin: 0 0 10px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.eventos-header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
}

.eventos-header p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 600px;
  margin: 20px auto 0;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(25, 80, 127, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(25, 80, 127, 0.4);
  background: var(--secondary);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(46, 204, 113, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.btn-facebook {
  background: var(--facebook);
  color: white;
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(24, 119, 242, 0.4);
  background: #166fe5;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.agregar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  margin: 20px auto;
  box-shadow: 0 6px 20px rgba(25, 80, 127, 0.4);
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
}

.agregar-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(25, 80, 127, 0.5);
}

.form-agregar {
  display: none;
  max-width: 700px;
  margin: 0 auto 40px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.form-agregar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

.form-agregar h3 {
  text-align: center;
  color: var(--primary-dark);
  margin-top: 0;
  margin-bottom: 25px;
  font-weight: 600;
}

.form-agregar label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-dark);
}

.form-agregar input,
.form-agregar textarea {
  width: 100%;
  padding: 12px 15px;
  margin: 8px 0 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: 'Montserrat', sans-serif;
}

.form-agregar input:focus,
.form-agregar textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 80, 127, 0.1);
}

.emoji-picker-container {
  position: relative;
  margin-bottom: 15px;
}

.emoji-trigger {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray);
  transition: color 0.3s;
}

.emoji-trigger:hover {
  color: var(--primary);
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 100;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  width: 250px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-picker span {
  cursor: pointer;
  padding: 5px;
  text-align: center;
  border-radius: 5px;
  transition: background 0.2s;
}

.emoji-picker span:hover {
  background: #f0f0f0;
}

.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin: 40px auto;
  max-width: 1400px;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.media-container {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--primary);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
}

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

.info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.info h3 {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
}

.fecha {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.descripcion {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acciones {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.acciones .btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #bdc3c7;
}

.empty-state h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.file-info {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 5px;
}

@media (max-width: 768px) {
  .eventos-header {
    padding: 50px 15px 25px;
  }

  .eventos-header h1 {
    font-size: 2rem;
  }

  .eventos-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 15px;
  }

  .form-agregar {
    margin: 0 15px 30px;
    padding: 20px;
  }

  .acciones {
    flex-direction: column;
  }

  .acciones .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .eventos-grid {
    grid-template-columns: 1fr;
  }
}

/* Añade estos estilos para el modo oscuro */
body.dark-mode {
  background: #1a202c !important;
  color: #f0f0f0 !important;
}

body.dark-mode .form-agregar {
  background: #2d3748 !important;
  color: #f0f0f0 !important;
  border: 1px solid #4a5568 !important;
}

body.dark-mode form input[type="text"],
body.dark-mode form input[type="date"],
body.dark-mode form input[type="file"],
body.dark-mode form textarea {
  background: #4a5568 !important;
  color: #f0f0f0 !important;
  border-color: #718096 !important;
}

body.dark-mode .file-info {
  color: #a0aec0 !important;
}

body.dark-mode .empty-state {
  color: #a0aec0 !important;
}

body.dark-mode .empty-state h3 {
  color: #f0f0f0 !important;
}

/* Estilos para el checkbox de Facebook */
body.dark-mode input[type="checkbox"] {
  filter: brightness(0.8);
}

body.dark-mode .text-muted {
  color: #a0aec0 !important;
}

/* Asegurar que los cards tengan el fondo correcto en modo oscuro */
body.dark-mode .card {
  background: #2d3748 !important;
}

body.dark-mode .info h3 {
  color: #f0f0f0 !important;
}

body.dark-mode .fecha {
  color: #a0aec0 !important;
}

body.dark-mode .descripcion {
  color: #a0aec0 !important;
}

/* Estilos para los botones en modo oscuro */
body.dark-mode .btn {
  opacity: 0.9;
}

body.dark-mode .btn:hover {
  opacity: 1;
}

/* TOAST Styles*/
.media-container {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--primary);
}

.toast-container {
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
}

.toast {
  padding: 15px 20px;
  border-radius: 10px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background: linear-gradient(135deg, #4CAF50, #43A047);
  border-left: 5px solid #2E7D32;
}

.toast.error {
  background: linear-gradient(135deg, #f44336, #e53935);
  border-left: 5px solid #b71c1c;
}

.toast.info {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  border-left: 5px solid #0D47A1;
}

.toast-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  margin-left: 12px;
}