.calendario-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  margin-bottom: 10px;
}

.calendario-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.5em;
}

.calendario-controles {
  display: flex;
  gap: 10px;
}

.mes-anterior,
.mes-siguiente {
  padding: 8px 16px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.mes-anterior:hover,
.mes-siguiente:hover {
  background: #357abd;
}

/* Para mejorar el espaciado general del calendario */
.calendario-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 10px;
}

.calendario-diasemana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 10px;
  background: #f8f9fa;
  font-weight: bold;
}

.diasemana {
  text-align: center;
  padding: 10px;
  color: #666;
}

.calendario-dia {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  min-height: 120px; /* Aumentamos un poco la altura mínima */
  padding: 8px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.calendario-dia:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.dia-numero {
  font-weight: bold;
  color: #333;
  padding: 2px;
  text-align: right;
  font-size: 0.9em;
  margin-bottom: 4px;
}

.calendario-evento {
  background: #4a90e2;
  color: white;
  padding: 8px;
  margin: 2px 0;
  border-radius: 3px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.2;
  /* Ajustes para el texto largo */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.calendario-evento:hover {
  background: #357abd;
  transform: scale(1.02);
}


.calendario-evento a {
  color: white;
  text-decoration: none;
  display: block;
  /* Ajustamos el texto largo */
  white-space: normal; /* Cambiado de nowrap a normal */
  overflow: visible; /* Cambiado de hidden a visible */
  text-overflow: clip;
  line-height: 1.2;
  font-size: 11px; /* Reducimos un poco el tamaño de la fuente */
}
.calendario-evento a:hover{
 color: white;

} 

.dia-actual {
  background: #fff3e0;
}

.dia-vacio {
  background: #f9f9f9;
}
/* Agrega esto al final de tu archivo calendario.css */

/* Tablets y pantallas pequeñas */
@media screen and (max-width: 768px) {
  .calendario-container {
      padding: 10px;
      margin: 0;
      width: 100%;
  }

  .calendario-grid {
      gap: 2px;
  }

  .calendario-dia {
      min-height: 80px;
      padding: 2px;
  }

  .diasemana {
      font-size: 0.8em;
      padding: 5px 2px;
  }

  .dia-numero {
      font-size: 0.8em;
      padding: 2px;
  }

  .calendario-evento {
      padding: 4px;
      margin: 1px 0;
  }

  .calendario-evento a {
      font-size: 9px;
      line-height: 1.1;
  }
}

/* Móviles pequeños */
@media screen and (max-width: 480px) {
  .calendario-header {
      padding: 10px;
      flex-direction: column;
      gap: 10px;
  }

  .calendario-header h2 {
      font-size: 1.2em;
  }

  .calendario-diasemana {
      padding: 5px 2px;
  }

  .diasemana {
      font-size: 0.7em;
      padding: 2px;
  }

  .mes-anterior,
  .mes-siguiente {
      padding: 5px 10px;
      font-size: 0.9em;
  }

  .calendario-evento {
      padding: 2px;
  }

  .calendario-evento a {
      font-size: 8px;
      line-height: 1;
  }

  .dia-numero {
      font-size: 0.7em;
  }

  .calendario-dia {
      min-height: 60px;
  }
}

/* Ajuste específico para dispositivos muy pequeños */
@media screen and (max-width: 320px) {
  .calendario-diasemana {
      padding: 2px;
  }

  .diasemana {
      font-size: 0.6em;
  }

  .calendario-evento a {
      font-size: 7px;
  }

  .calendario-dia {
      min-height: 50px;
  }
}

/* Orientación horizontal en móviles */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .calendario-dia {
      min-height: 70px;
  }

  .calendario-header {
      flex-direction: row;
  }

  .calendario-evento a {
      font-size: 8px;
  }
}